@cdktf/provider-databricks
Version:
Prebuilt databricks Provider for Terraform CDK (cdktf)
1,266 lines • 225 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlertV2 = exports.AlertV2ScheduleOutputReference = exports.AlertV2RunAsOutputReference = exports.AlertV2EvaluationOutputReference = exports.AlertV2EvaluationThresholdOutputReference = exports.AlertV2EvaluationThresholdValueOutputReference = exports.AlertV2EvaluationThresholdColumnOutputReference = exports.AlertV2EvaluationSourceOutputReference = exports.AlertV2EvaluationNotificationOutputReference = exports.AlertV2EvaluationNotificationSubscriptionsList = exports.AlertV2EvaluationNotificationSubscriptionsOutputReference = exports.AlertV2EffectiveRunAsOutputReference = void 0;
exports.alertV2EffectiveRunAsToTerraform = alertV2EffectiveRunAsToTerraform;
exports.alertV2EffectiveRunAsToHclTerraform = alertV2EffectiveRunAsToHclTerraform;
exports.alertV2EvaluationNotificationSubscriptionsToTerraform = alertV2EvaluationNotificationSubscriptionsToTerraform;
exports.alertV2EvaluationNotificationSubscriptionsToHclTerraform = alertV2EvaluationNotificationSubscriptionsToHclTerraform;
exports.alertV2EvaluationNotificationToTerraform = alertV2EvaluationNotificationToTerraform;
exports.alertV2EvaluationNotificationToHclTerraform = alertV2EvaluationNotificationToHclTerraform;
exports.alertV2EvaluationSourceToTerraform = alertV2EvaluationSourceToTerraform;
exports.alertV2EvaluationSourceToHclTerraform = alertV2EvaluationSourceToHclTerraform;
exports.alertV2EvaluationThresholdColumnToTerraform = alertV2EvaluationThresholdColumnToTerraform;
exports.alertV2EvaluationThresholdColumnToHclTerraform = alertV2EvaluationThresholdColumnToHclTerraform;
exports.alertV2EvaluationThresholdValueToTerraform = alertV2EvaluationThresholdValueToTerraform;
exports.alertV2EvaluationThresholdValueToHclTerraform = alertV2EvaluationThresholdValueToHclTerraform;
exports.alertV2EvaluationThresholdToTerraform = alertV2EvaluationThresholdToTerraform;
exports.alertV2EvaluationThresholdToHclTerraform = alertV2EvaluationThresholdToHclTerraform;
exports.alertV2EvaluationToTerraform = alertV2EvaluationToTerraform;
exports.alertV2EvaluationToHclTerraform = alertV2EvaluationToHclTerraform;
exports.alertV2RunAsToTerraform = alertV2RunAsToTerraform;
exports.alertV2RunAsToHclTerraform = alertV2RunAsToHclTerraform;
exports.alertV2ScheduleToTerraform = alertV2ScheduleToTerraform;
exports.alertV2ScheduleToHclTerraform = alertV2ScheduleToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function alertV2EffectiveRunAsToTerraform(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 {
service_principal_name: cdktf.stringToTerraform(struct.servicePrincipalName),
user_name: cdktf.stringToTerraform(struct.userName),
};
}
function alertV2EffectiveRunAsToHclTerraform(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 = {
service_principal_name: {
value: cdktf.stringToHclTerraform(struct.servicePrincipalName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_name: {
value: cdktf.stringToHclTerraform(struct.userName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EffectiveRunAsOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._servicePrincipalName !== undefined) {
hasAnyValues = true;
internalValueResult.servicePrincipalName = this._servicePrincipalName;
}
if (this._userName !== undefined) {
hasAnyValues = true;
internalValueResult.userName = this._userName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._servicePrincipalName = undefined;
this._userName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._servicePrincipalName = value.servicePrincipalName;
this._userName = value.userName;
}
}
get servicePrincipalName() {
return this.getStringAttribute('service_principal_name');
}
set servicePrincipalName(value) {
this._servicePrincipalName = value;
}
resetServicePrincipalName() {
this._servicePrincipalName = undefined;
}
// Temporarily expose input value. Use with caution.
get servicePrincipalNameInput() {
return this._servicePrincipalName;
}
get userName() {
return this.getStringAttribute('user_name');
}
set userName(value) {
this._userName = value;
}
resetUserName() {
this._userName = undefined;
}
// Temporarily expose input value. Use with caution.
get userNameInput() {
return this._userName;
}
}
exports.AlertV2EffectiveRunAsOutputReference = AlertV2EffectiveRunAsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AlertV2EffectiveRunAsOutputReference[_a] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EffectiveRunAsOutputReference", version: "15.7.0" };
function alertV2EvaluationNotificationSubscriptionsToTerraform(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 {
destination_id: cdktf.stringToTerraform(struct.destinationId),
user_email: cdktf.stringToTerraform(struct.userEmail),
};
}
function alertV2EvaluationNotificationSubscriptionsToHclTerraform(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 = {
destination_id: {
value: cdktf.stringToHclTerraform(struct.destinationId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_email: {
value: cdktf.stringToHclTerraform(struct.userEmail),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationNotificationSubscriptionsOutputReference 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._destinationId !== undefined) {
hasAnyValues = true;
internalValueResult.destinationId = this._destinationId;
}
if (this._userEmail !== undefined) {
hasAnyValues = true;
internalValueResult.userEmail = this._userEmail;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._destinationId = undefined;
this._userEmail = 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._destinationId = value.destinationId;
this._userEmail = value.userEmail;
}
}
get destinationId() {
return this.getStringAttribute('destination_id');
}
set destinationId(value) {
this._destinationId = value;
}
resetDestinationId() {
this._destinationId = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationIdInput() {
return this._destinationId;
}
get userEmail() {
return this.getStringAttribute('user_email');
}
set userEmail(value) {
this._userEmail = value;
}
resetUserEmail() {
this._userEmail = undefined;
}
// Temporarily expose input value. Use with caution.
get userEmailInput() {
return this._userEmail;
}
}
exports.AlertV2EvaluationNotificationSubscriptionsOutputReference = AlertV2EvaluationNotificationSubscriptionsOutputReference;
_b = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationNotificationSubscriptionsOutputReference[_b] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationNotificationSubscriptionsOutputReference", version: "15.7.0" };
class AlertV2EvaluationNotificationSubscriptionsList 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 AlertV2EvaluationNotificationSubscriptionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AlertV2EvaluationNotificationSubscriptionsList = AlertV2EvaluationNotificationSubscriptionsList;
_c = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationNotificationSubscriptionsList[_c] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationNotificationSubscriptionsList", version: "15.7.0" };
function alertV2EvaluationNotificationToTerraform(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 {
notify_on_ok: cdktf.booleanToTerraform(struct.notifyOnOk),
retrigger_seconds: cdktf.numberToTerraform(struct.retriggerSeconds),
subscriptions: cdktf.listMapper(alertV2EvaluationNotificationSubscriptionsToTerraform, false)(struct.subscriptions),
};
}
function alertV2EvaluationNotificationToHclTerraform(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 = {
notify_on_ok: {
value: cdktf.booleanToHclTerraform(struct.notifyOnOk),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
retrigger_seconds: {
value: cdktf.numberToHclTerraform(struct.retriggerSeconds),
isBlock: false,
type: "simple",
storageClassType: "number",
},
subscriptions: {
value: cdktf.listMapperHcl(alertV2EvaluationNotificationSubscriptionsToHclTerraform, false)(struct.subscriptions),
isBlock: true,
type: "list",
storageClassType: "AlertV2EvaluationNotificationSubscriptionsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationNotificationOutputReference 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;
// subscriptions - computed: false, optional: true, required: false
this._subscriptions = new AlertV2EvaluationNotificationSubscriptionsList(this, "subscriptions", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._notifyOnOk !== undefined) {
hasAnyValues = true;
internalValueResult.notifyOnOk = this._notifyOnOk;
}
if (this._retriggerSeconds !== undefined) {
hasAnyValues = true;
internalValueResult.retriggerSeconds = this._retriggerSeconds;
}
if (this._subscriptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.subscriptions = this._subscriptions?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._notifyOnOk = undefined;
this._retriggerSeconds = undefined;
this._subscriptions.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._notifyOnOk = value.notifyOnOk;
this._retriggerSeconds = value.retriggerSeconds;
this._subscriptions.internalValue = value.subscriptions;
}
}
get notifyOnOk() {
return this.getBooleanAttribute('notify_on_ok');
}
set notifyOnOk(value) {
this._notifyOnOk = value;
}
resetNotifyOnOk() {
this._notifyOnOk = undefined;
}
// Temporarily expose input value. Use with caution.
get notifyOnOkInput() {
return this._notifyOnOk;
}
get retriggerSeconds() {
return this.getNumberAttribute('retrigger_seconds');
}
set retriggerSeconds(value) {
this._retriggerSeconds = value;
}
resetRetriggerSeconds() {
this._retriggerSeconds = undefined;
}
// Temporarily expose input value. Use with caution.
get retriggerSecondsInput() {
return this._retriggerSeconds;
}
get subscriptions() {
return this._subscriptions;
}
putSubscriptions(value) {
this._subscriptions.internalValue = value;
}
resetSubscriptions() {
this._subscriptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get subscriptionsInput() {
return this._subscriptions.internalValue;
}
}
exports.AlertV2EvaluationNotificationOutputReference = AlertV2EvaluationNotificationOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationNotificationOutputReference[_d] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationNotificationOutputReference", version: "15.7.0" };
function alertV2EvaluationSourceToTerraform(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 {
aggregation: cdktf.stringToTerraform(struct.aggregation),
display: cdktf.stringToTerraform(struct.display),
name: cdktf.stringToTerraform(struct.name),
};
}
function alertV2EvaluationSourceToHclTerraform(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 = {
aggregation: {
value: cdktf.stringToHclTerraform(struct.aggregation),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display: {
value: cdktf.stringToHclTerraform(struct.display),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationSourceOutputReference 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._aggregation !== undefined) {
hasAnyValues = true;
internalValueResult.aggregation = this._aggregation;
}
if (this._display !== undefined) {
hasAnyValues = true;
internalValueResult.display = this._display;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._aggregation = undefined;
this._display = undefined;
this._name = 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._aggregation = value.aggregation;
this._display = value.display;
this._name = value.name;
}
}
get aggregation() {
return this.getStringAttribute('aggregation');
}
set aggregation(value) {
this._aggregation = value;
}
resetAggregation() {
this._aggregation = undefined;
}
// Temporarily expose input value. Use with caution.
get aggregationInput() {
return this._aggregation;
}
get display() {
return this.getStringAttribute('display');
}
set display(value) {
this._display = value;
}
resetDisplay() {
this._display = undefined;
}
// Temporarily expose input value. Use with caution.
get displayInput() {
return this._display;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
}
exports.AlertV2EvaluationSourceOutputReference = AlertV2EvaluationSourceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationSourceOutputReference[_e] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationSourceOutputReference", version: "15.7.0" };
function alertV2EvaluationThresholdColumnToTerraform(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 {
aggregation: cdktf.stringToTerraform(struct.aggregation),
display: cdktf.stringToTerraform(struct.display),
name: cdktf.stringToTerraform(struct.name),
};
}
function alertV2EvaluationThresholdColumnToHclTerraform(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 = {
aggregation: {
value: cdktf.stringToHclTerraform(struct.aggregation),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display: {
value: cdktf.stringToHclTerraform(struct.display),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationThresholdColumnOutputReference 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._aggregation !== undefined) {
hasAnyValues = true;
internalValueResult.aggregation = this._aggregation;
}
if (this._display !== undefined) {
hasAnyValues = true;
internalValueResult.display = this._display;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._aggregation = undefined;
this._display = undefined;
this._name = 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._aggregation = value.aggregation;
this._display = value.display;
this._name = value.name;
}
}
get aggregation() {
return this.getStringAttribute('aggregation');
}
set aggregation(value) {
this._aggregation = value;
}
resetAggregation() {
this._aggregation = undefined;
}
// Temporarily expose input value. Use with caution.
get aggregationInput() {
return this._aggregation;
}
get display() {
return this.getStringAttribute('display');
}
set display(value) {
this._display = value;
}
resetDisplay() {
this._display = undefined;
}
// Temporarily expose input value. Use with caution.
get displayInput() {
return this._display;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
}
exports.AlertV2EvaluationThresholdColumnOutputReference = AlertV2EvaluationThresholdColumnOutputReference;
_f = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationThresholdColumnOutputReference[_f] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationThresholdColumnOutputReference", version: "15.7.0" };
function alertV2EvaluationThresholdValueToTerraform(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 {
bool_value: cdktf.booleanToTerraform(struct.boolValue),
double_value: cdktf.numberToTerraform(struct.doubleValue),
string_value: cdktf.stringToTerraform(struct.stringValue),
};
}
function alertV2EvaluationThresholdValueToHclTerraform(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 = {
bool_value: {
value: cdktf.booleanToHclTerraform(struct.boolValue),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
double_value: {
value: cdktf.numberToHclTerraform(struct.doubleValue),
isBlock: false,
type: "simple",
storageClassType: "number",
},
string_value: {
value: cdktf.stringToHclTerraform(struct.stringValue),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationThresholdValueOutputReference 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._boolValue !== undefined) {
hasAnyValues = true;
internalValueResult.boolValue = this._boolValue;
}
if (this._doubleValue !== undefined) {
hasAnyValues = true;
internalValueResult.doubleValue = this._doubleValue;
}
if (this._stringValue !== undefined) {
hasAnyValues = true;
internalValueResult.stringValue = this._stringValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._boolValue = undefined;
this._doubleValue = undefined;
this._stringValue = 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._boolValue = value.boolValue;
this._doubleValue = value.doubleValue;
this._stringValue = value.stringValue;
}
}
get boolValue() {
return this.getBooleanAttribute('bool_value');
}
set boolValue(value) {
this._boolValue = value;
}
resetBoolValue() {
this._boolValue = undefined;
}
// Temporarily expose input value. Use with caution.
get boolValueInput() {
return this._boolValue;
}
get doubleValue() {
return this.getNumberAttribute('double_value');
}
set doubleValue(value) {
this._doubleValue = value;
}
resetDoubleValue() {
this._doubleValue = undefined;
}
// Temporarily expose input value. Use with caution.
get doubleValueInput() {
return this._doubleValue;
}
get stringValue() {
return this.getStringAttribute('string_value');
}
set stringValue(value) {
this._stringValue = value;
}
resetStringValue() {
this._stringValue = undefined;
}
// Temporarily expose input value. Use with caution.
get stringValueInput() {
return this._stringValue;
}
}
exports.AlertV2EvaluationThresholdValueOutputReference = AlertV2EvaluationThresholdValueOutputReference;
_g = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationThresholdValueOutputReference[_g] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationThresholdValueOutputReference", version: "15.7.0" };
function alertV2EvaluationThresholdToTerraform(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 {
column: alertV2EvaluationThresholdColumnToTerraform(struct.column),
value: alertV2EvaluationThresholdValueToTerraform(struct.value),
};
}
function alertV2EvaluationThresholdToHclTerraform(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 = {
column: {
value: alertV2EvaluationThresholdColumnToHclTerraform(struct.column),
isBlock: true,
type: "struct",
storageClassType: "AlertV2EvaluationThresholdColumn",
},
value: {
value: alertV2EvaluationThresholdValueToHclTerraform(struct.value),
isBlock: true,
type: "struct",
storageClassType: "AlertV2EvaluationThresholdValue",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationThresholdOutputReference 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;
// column - computed: false, optional: true, required: false
this._column = new AlertV2EvaluationThresholdColumnOutputReference(this, "column");
// value - computed: false, optional: true, required: false
this._value = new AlertV2EvaluationThresholdValueOutputReference(this, "value");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._column?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.column = this._column?.internalValue;
}
if (this._value?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._column.internalValue = undefined;
this._value.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._column.internalValue = value.column;
this._value.internalValue = value.value;
}
}
get column() {
return this._column;
}
putColumn(value) {
this._column.internalValue = value;
}
resetColumn() {
this._column.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get columnInput() {
return this._column.internalValue;
}
get value() {
return this._value;
}
putValue(value) {
this._value.internalValue = value;
}
resetValue() {
this._value.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value.internalValue;
}
}
exports.AlertV2EvaluationThresholdOutputReference = AlertV2EvaluationThresholdOutputReference;
_h = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationThresholdOutputReference[_h] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationThresholdOutputReference", version: "15.7.0" };
function alertV2EvaluationToTerraform(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 {
comparison_operator: cdktf.stringToTerraform(struct.comparisonOperator),
empty_result_state: cdktf.stringToTerraform(struct.emptyResultState),
notification: alertV2EvaluationNotificationToTerraform(struct.notification),
source: alertV2EvaluationSourceToTerraform(struct.source),
threshold: alertV2EvaluationThresholdToTerraform(struct.threshold),
};
}
function alertV2EvaluationToHclTerraform(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 = {
comparison_operator: {
value: cdktf.stringToHclTerraform(struct.comparisonOperator),
isBlock: false,
type: "simple",
storageClassType: "string",
},
empty_result_state: {
value: cdktf.stringToHclTerraform(struct.emptyResultState),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notification: {
value: alertV2EvaluationNotificationToHclTerraform(struct.notification),
isBlock: true,
type: "struct",
storageClassType: "AlertV2EvaluationNotification",
},
source: {
value: alertV2EvaluationSourceToHclTerraform(struct.source),
isBlock: true,
type: "struct",
storageClassType: "AlertV2EvaluationSource",
},
threshold: {
value: alertV2EvaluationThresholdToHclTerraform(struct.threshold),
isBlock: true,
type: "struct",
storageClassType: "AlertV2EvaluationThreshold",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2EvaluationOutputReference 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;
// notification - computed: false, optional: true, required: false
this._notification = new AlertV2EvaluationNotificationOutputReference(this, "notification");
// source - computed: false, optional: true, required: false
this._source = new AlertV2EvaluationSourceOutputReference(this, "source");
// threshold - computed: false, optional: true, required: false
this._threshold = new AlertV2EvaluationThresholdOutputReference(this, "threshold");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._comparisonOperator !== undefined) {
hasAnyValues = true;
internalValueResult.comparisonOperator = this._comparisonOperator;
}
if (this._emptyResultState !== undefined) {
hasAnyValues = true;
internalValueResult.emptyResultState = this._emptyResultState;
}
if (this._notification?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.notification = this._notification?.internalValue;
}
if (this._source?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.source = this._source?.internalValue;
}
if (this._threshold?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.threshold = this._threshold?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._comparisonOperator = undefined;
this._emptyResultState = undefined;
this._notification.internalValue = undefined;
this._source.internalValue = undefined;
this._threshold.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._comparisonOperator = value.comparisonOperator;
this._emptyResultState = value.emptyResultState;
this._notification.internalValue = value.notification;
this._source.internalValue = value.source;
this._threshold.internalValue = value.threshold;
}
}
get comparisonOperator() {
return this.getStringAttribute('comparison_operator');
}
set comparisonOperator(value) {
this._comparisonOperator = value;
}
resetComparisonOperator() {
this._comparisonOperator = undefined;
}
// Temporarily expose input value. Use with caution.
get comparisonOperatorInput() {
return this._comparisonOperator;
}
get emptyResultState() {
return this.getStringAttribute('empty_result_state');
}
set emptyResultState(value) {
this._emptyResultState = value;
}
resetEmptyResultState() {
this._emptyResultState = undefined;
}
// Temporarily expose input value. Use with caution.
get emptyResultStateInput() {
return this._emptyResultState;
}
// last_evaluated_at - computed: true, optional: false, required: false
get lastEvaluatedAt() {
return this.getStringAttribute('last_evaluated_at');
}
get notification() {
return this._notification;
}
putNotification(value) {
this._notification.internalValue = value;
}
resetNotification() {
this._notification.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationInput() {
return this._notification.internalValue;
}
get source() {
return this._source;
}
putSource(value) {
this._source.internalValue = value;
}
resetSource() {
this._source.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source.internalValue;
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
get threshold() {
return this._threshold;
}
putThreshold(value) {
this._threshold.internalValue = value;
}
resetThreshold() {
this._threshold.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get thresholdInput() {
return this._threshold.internalValue;
}
}
exports.AlertV2EvaluationOutputReference = AlertV2EvaluationOutputReference;
_j = JSII_RTTI_SYMBOL_1;
AlertV2EvaluationOutputReference[_j] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2EvaluationOutputReference", version: "15.7.0" };
function alertV2RunAsToTerraform(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 {
service_principal_name: cdktf.stringToTerraform(struct.servicePrincipalName),
user_name: cdktf.stringToTerraform(struct.userName),
};
}
function alertV2RunAsToHclTerraform(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 = {
service_principal_name: {
value: cdktf.stringToHclTerraform(struct.servicePrincipalName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_name: {
value: cdktf.stringToHclTerraform(struct.userName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlertV2RunAsOutputReference 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._servicePrincipalName !== undefined) {
hasAnyValues = true;
internalValueResult.servicePrincipalName = this._servicePrincipalName;
}
if (this._userName !== undefined) {
hasAnyValues = true;
internalValueResult.userName = this._userName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._servicePrincipalName = undefined;
this._userName = 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._servicePrincipalName = value.servicePrincipalName;
this._userName = value.userName;
}
}
get servicePrincipalName() {
return this.getStringAttribute('service_principal_name');
}
set servicePrincipalName(value) {
this._servicePrincipalName = value;
}
resetServicePrincipalName() {
this._servicePrincipalName = undefined;
}
// Temporarily expose input value. Use with caution.
get servicePrincipalNameInput() {
return this._servicePrincipalName;
}
get userName() {
return this.getStringAttribute('user_name');
}
set userName(value) {
this._userName = value;
}
resetUserName() {
this._userName = undefined;
}
// Temporarily expose input value. Use with caution.
get userNameInput() {
return this._userName;
}
}
exports.AlertV2RunAsOutputReference = AlertV2RunAsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
AlertV2RunAsOutputReference[_k] = { fqn: "@cdktf/provider-databricks.alertV2.AlertV2RunAsOutputReference", version: "15.7.0" };
function alertV2ScheduleToTerraform(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 {
pause_status: cdktf.stringToTerraform(struct.pauseStatus),
quartz_cron_schedule: cdktf.stringToTerraform(struct.quartzCronSchedule),
timezone_id: cdktf.stringToTerraform(struct.timezoneId),
};
}
function alertV2ScheduleToHclTerraform(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 = {
pause_status: {
value: cdktf.stringToHclTerraform(struct.pauseStatus),
isBlock: false,
type: "simple",
storageClassType: "string",
},
quartz_cron_schedule: {
value: cdktf.stringToHclTerraform(struct.quartzCronSchedule),
isBlock: false,
type: "simple",
storageClassType: "string",
},
timezone_id: {
value: cdktf.stringToHclTerraform(struct.timezoneId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value