@cdktf/provider-databricks
Version:
Prebuilt databricks Provider for Terraform CDK (cdktf)
1,245 lines • 168 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationDestination = exports.NotificationDestinationConfigAOutputReference = exports.NotificationDestinationConfigSlackOutputReference = exports.NotificationDestinationConfigPagerdutyOutputReference = exports.NotificationDestinationConfigMicrosoftTeamsOutputReference = exports.NotificationDestinationConfigGenericWebhookOutputReference = exports.NotificationDestinationConfigEmailOutputReference = void 0;
exports.notificationDestinationConfigEmailToTerraform = notificationDestinationConfigEmailToTerraform;
exports.notificationDestinationConfigEmailToHclTerraform = notificationDestinationConfigEmailToHclTerraform;
exports.notificationDestinationConfigGenericWebhookToTerraform = notificationDestinationConfigGenericWebhookToTerraform;
exports.notificationDestinationConfigGenericWebhookToHclTerraform = notificationDestinationConfigGenericWebhookToHclTerraform;
exports.notificationDestinationConfigMicrosoftTeamsToTerraform = notificationDestinationConfigMicrosoftTeamsToTerraform;
exports.notificationDestinationConfigMicrosoftTeamsToHclTerraform = notificationDestinationConfigMicrosoftTeamsToHclTerraform;
exports.notificationDestinationConfigPagerdutyToTerraform = notificationDestinationConfigPagerdutyToTerraform;
exports.notificationDestinationConfigPagerdutyToHclTerraform = notificationDestinationConfigPagerdutyToHclTerraform;
exports.notificationDestinationConfigSlackToTerraform = notificationDestinationConfigSlackToTerraform;
exports.notificationDestinationConfigSlackToHclTerraform = notificationDestinationConfigSlackToHclTerraform;
exports.notificationDestinationConfigAToTerraform = notificationDestinationConfigAToTerraform;
exports.notificationDestinationConfigAToHclTerraform = notificationDestinationConfigAToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function notificationDestinationConfigEmailToTerraform(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 {
addresses: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.addresses),
};
}
function notificationDestinationConfigEmailToHclTerraform(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 = {
addresses: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.addresses),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigEmailOutputReference 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._addresses !== undefined) {
hasAnyValues = true;
internalValueResult.addresses = this._addresses;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._addresses = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._addresses = value.addresses;
}
}
get addresses() {
return this.getListAttribute('addresses');
}
set addresses(value) {
this._addresses = value;
}
resetAddresses() {
this._addresses = undefined;
}
// Temporarily expose input value. Use with caution.
get addressesInput() {
return this._addresses;
}
}
exports.NotificationDestinationConfigEmailOutputReference = NotificationDestinationConfigEmailOutputReference;
_a = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigEmailOutputReference[_a] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigEmailOutputReference", version: "15.16.1" };
function notificationDestinationConfigGenericWebhookToTerraform(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 {
password: cdktf.stringToTerraform(struct.password),
password_set: cdktf.booleanToTerraform(struct.passwordSet),
url: cdktf.stringToTerraform(struct.url),
url_set: cdktf.booleanToTerraform(struct.urlSet),
username: cdktf.stringToTerraform(struct.username),
username_set: cdktf.booleanToTerraform(struct.usernameSet),
};
}
function notificationDestinationConfigGenericWebhookToHclTerraform(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 = {
password: {
value: cdktf.stringToHclTerraform(struct.password),
isBlock: false,
type: "simple",
storageClassType: "string",
},
password_set: {
value: cdktf.booleanToHclTerraform(struct.passwordSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url_set: {
value: cdktf.booleanToHclTerraform(struct.urlSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
username: {
value: cdktf.stringToHclTerraform(struct.username),
isBlock: false,
type: "simple",
storageClassType: "string",
},
username_set: {
value: cdktf.booleanToHclTerraform(struct.usernameSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigGenericWebhookOutputReference 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._password !== undefined) {
hasAnyValues = true;
internalValueResult.password = this._password;
}
if (this._passwordSet !== undefined) {
hasAnyValues = true;
internalValueResult.passwordSet = this._passwordSet;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
if (this._urlSet !== undefined) {
hasAnyValues = true;
internalValueResult.urlSet = this._urlSet;
}
if (this._username !== undefined) {
hasAnyValues = true;
internalValueResult.username = this._username;
}
if (this._usernameSet !== undefined) {
hasAnyValues = true;
internalValueResult.usernameSet = this._usernameSet;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._password = undefined;
this._passwordSet = undefined;
this._url = undefined;
this._urlSet = undefined;
this._username = undefined;
this._usernameSet = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._password = value.password;
this._passwordSet = value.passwordSet;
this._url = value.url;
this._urlSet = value.urlSet;
this._username = value.username;
this._usernameSet = value.usernameSet;
}
}
get password() {
return this.getStringAttribute('password');
}
set password(value) {
this._password = value;
}
resetPassword() {
this._password = undefined;
}
// Temporarily expose input value. Use with caution.
get passwordInput() {
return this._password;
}
get passwordSet() {
return this.getBooleanAttribute('password_set');
}
set passwordSet(value) {
this._passwordSet = value;
}
resetPasswordSet() {
this._passwordSet = undefined;
}
// Temporarily expose input value. Use with caution.
get passwordSetInput() {
return this._passwordSet;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
resetUrl() {
this._url = undefined;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
get urlSet() {
return this.getBooleanAttribute('url_set');
}
set urlSet(value) {
this._urlSet = value;
}
resetUrlSet() {
this._urlSet = undefined;
}
// Temporarily expose input value. Use with caution.
get urlSetInput() {
return this._urlSet;
}
get username() {
return this.getStringAttribute('username');
}
set username(value) {
this._username = value;
}
resetUsername() {
this._username = undefined;
}
// Temporarily expose input value. Use with caution.
get usernameInput() {
return this._username;
}
get usernameSet() {
return this.getBooleanAttribute('username_set');
}
set usernameSet(value) {
this._usernameSet = value;
}
resetUsernameSet() {
this._usernameSet = undefined;
}
// Temporarily expose input value. Use with caution.
get usernameSetInput() {
return this._usernameSet;
}
}
exports.NotificationDestinationConfigGenericWebhookOutputReference = NotificationDestinationConfigGenericWebhookOutputReference;
_b = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigGenericWebhookOutputReference[_b] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigGenericWebhookOutputReference", version: "15.16.1" };
function notificationDestinationConfigMicrosoftTeamsToTerraform(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 {
app_id: cdktf.stringToTerraform(struct.appId),
app_id_set: cdktf.booleanToTerraform(struct.appIdSet),
auth_secret: cdktf.stringToTerraform(struct.authSecret),
auth_secret_set: cdktf.booleanToTerraform(struct.authSecretSet),
channel_url: cdktf.stringToTerraform(struct.channelUrl),
channel_url_set: cdktf.booleanToTerraform(struct.channelUrlSet),
tenant_id: cdktf.stringToTerraform(struct.tenantId),
tenant_id_set: cdktf.booleanToTerraform(struct.tenantIdSet),
url: cdktf.stringToTerraform(struct.url),
url_set: cdktf.booleanToTerraform(struct.urlSet),
};
}
function notificationDestinationConfigMicrosoftTeamsToHclTerraform(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 = {
app_id: {
value: cdktf.stringToHclTerraform(struct.appId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
app_id_set: {
value: cdktf.booleanToHclTerraform(struct.appIdSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
auth_secret: {
value: cdktf.stringToHclTerraform(struct.authSecret),
isBlock: false,
type: "simple",
storageClassType: "string",
},
auth_secret_set: {
value: cdktf.booleanToHclTerraform(struct.authSecretSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
channel_url: {
value: cdktf.stringToHclTerraform(struct.channelUrl),
isBlock: false,
type: "simple",
storageClassType: "string",
},
channel_url_set: {
value: cdktf.booleanToHclTerraform(struct.channelUrlSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
tenant_id: {
value: cdktf.stringToHclTerraform(struct.tenantId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tenant_id_set: {
value: cdktf.booleanToHclTerraform(struct.tenantIdSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url_set: {
value: cdktf.booleanToHclTerraform(struct.urlSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigMicrosoftTeamsOutputReference 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._appId !== undefined) {
hasAnyValues = true;
internalValueResult.appId = this._appId;
}
if (this._appIdSet !== undefined) {
hasAnyValues = true;
internalValueResult.appIdSet = this._appIdSet;
}
if (this._authSecret !== undefined) {
hasAnyValues = true;
internalValueResult.authSecret = this._authSecret;
}
if (this._authSecretSet !== undefined) {
hasAnyValues = true;
internalValueResult.authSecretSet = this._authSecretSet;
}
if (this._channelUrl !== undefined) {
hasAnyValues = true;
internalValueResult.channelUrl = this._channelUrl;
}
if (this._channelUrlSet !== undefined) {
hasAnyValues = true;
internalValueResult.channelUrlSet = this._channelUrlSet;
}
if (this._tenantId !== undefined) {
hasAnyValues = true;
internalValueResult.tenantId = this._tenantId;
}
if (this._tenantIdSet !== undefined) {
hasAnyValues = true;
internalValueResult.tenantIdSet = this._tenantIdSet;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
if (this._urlSet !== undefined) {
hasAnyValues = true;
internalValueResult.urlSet = this._urlSet;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._appId = undefined;
this._appIdSet = undefined;
this._authSecret = undefined;
this._authSecretSet = undefined;
this._channelUrl = undefined;
this._channelUrlSet = undefined;
this._tenantId = undefined;
this._tenantIdSet = undefined;
this._url = undefined;
this._urlSet = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._appId = value.appId;
this._appIdSet = value.appIdSet;
this._authSecret = value.authSecret;
this._authSecretSet = value.authSecretSet;
this._channelUrl = value.channelUrl;
this._channelUrlSet = value.channelUrlSet;
this._tenantId = value.tenantId;
this._tenantIdSet = value.tenantIdSet;
this._url = value.url;
this._urlSet = value.urlSet;
}
}
get appId() {
return this.getStringAttribute('app_id');
}
set appId(value) {
this._appId = value;
}
resetAppId() {
this._appId = undefined;
}
// Temporarily expose input value. Use with caution.
get appIdInput() {
return this._appId;
}
get appIdSet() {
return this.getBooleanAttribute('app_id_set');
}
set appIdSet(value) {
this._appIdSet = value;
}
resetAppIdSet() {
this._appIdSet = undefined;
}
// Temporarily expose input value. Use with caution.
get appIdSetInput() {
return this._appIdSet;
}
get authSecret() {
return this.getStringAttribute('auth_secret');
}
set authSecret(value) {
this._authSecret = value;
}
resetAuthSecret() {
this._authSecret = undefined;
}
// Temporarily expose input value. Use with caution.
get authSecretInput() {
return this._authSecret;
}
get authSecretSet() {
return this.getBooleanAttribute('auth_secret_set');
}
set authSecretSet(value) {
this._authSecretSet = value;
}
resetAuthSecretSet() {
this._authSecretSet = undefined;
}
// Temporarily expose input value. Use with caution.
get authSecretSetInput() {
return this._authSecretSet;
}
get channelUrl() {
return this.getStringAttribute('channel_url');
}
set channelUrl(value) {
this._channelUrl = value;
}
resetChannelUrl() {
this._channelUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get channelUrlInput() {
return this._channelUrl;
}
get channelUrlSet() {
return this.getBooleanAttribute('channel_url_set');
}
set channelUrlSet(value) {
this._channelUrlSet = value;
}
resetChannelUrlSet() {
this._channelUrlSet = undefined;
}
// Temporarily expose input value. Use with caution.
get channelUrlSetInput() {
return this._channelUrlSet;
}
get tenantId() {
return this.getStringAttribute('tenant_id');
}
set tenantId(value) {
this._tenantId = value;
}
resetTenantId() {
this._tenantId = undefined;
}
// Temporarily expose input value. Use with caution.
get tenantIdInput() {
return this._tenantId;
}
get tenantIdSet() {
return this.getBooleanAttribute('tenant_id_set');
}
set tenantIdSet(value) {
this._tenantIdSet = value;
}
resetTenantIdSet() {
this._tenantIdSet = undefined;
}
// Temporarily expose input value. Use with caution.
get tenantIdSetInput() {
return this._tenantIdSet;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
resetUrl() {
this._url = undefined;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
get urlSet() {
return this.getBooleanAttribute('url_set');
}
set urlSet(value) {
this._urlSet = value;
}
resetUrlSet() {
this._urlSet = undefined;
}
// Temporarily expose input value. Use with caution.
get urlSetInput() {
return this._urlSet;
}
}
exports.NotificationDestinationConfigMicrosoftTeamsOutputReference = NotificationDestinationConfigMicrosoftTeamsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigMicrosoftTeamsOutputReference[_c] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigMicrosoftTeamsOutputReference", version: "15.16.1" };
function notificationDestinationConfigPagerdutyToTerraform(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 {
integration_key: cdktf.stringToTerraform(struct.integrationKey),
integration_key_set: cdktf.booleanToTerraform(struct.integrationKeySet),
};
}
function notificationDestinationConfigPagerdutyToHclTerraform(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 = {
integration_key: {
value: cdktf.stringToHclTerraform(struct.integrationKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
integration_key_set: {
value: cdktf.booleanToHclTerraform(struct.integrationKeySet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigPagerdutyOutputReference 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._integrationKey !== undefined) {
hasAnyValues = true;
internalValueResult.integrationKey = this._integrationKey;
}
if (this._integrationKeySet !== undefined) {
hasAnyValues = true;
internalValueResult.integrationKeySet = this._integrationKeySet;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._integrationKey = undefined;
this._integrationKeySet = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._integrationKey = value.integrationKey;
this._integrationKeySet = value.integrationKeySet;
}
}
get integrationKey() {
return this.getStringAttribute('integration_key');
}
set integrationKey(value) {
this._integrationKey = value;
}
resetIntegrationKey() {
this._integrationKey = undefined;
}
// Temporarily expose input value. Use with caution.
get integrationKeyInput() {
return this._integrationKey;
}
get integrationKeySet() {
return this.getBooleanAttribute('integration_key_set');
}
set integrationKeySet(value) {
this._integrationKeySet = value;
}
resetIntegrationKeySet() {
this._integrationKeySet = undefined;
}
// Temporarily expose input value. Use with caution.
get integrationKeySetInput() {
return this._integrationKeySet;
}
}
exports.NotificationDestinationConfigPagerdutyOutputReference = NotificationDestinationConfigPagerdutyOutputReference;
_d = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigPagerdutyOutputReference[_d] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigPagerdutyOutputReference", version: "15.16.1" };
function notificationDestinationConfigSlackToTerraform(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 {
channel_id: cdktf.stringToTerraform(struct.channelId),
channel_id_set: cdktf.booleanToTerraform(struct.channelIdSet),
oauth_token: cdktf.stringToTerraform(struct.oauthToken),
oauth_token_set: cdktf.booleanToTerraform(struct.oauthTokenSet),
url: cdktf.stringToTerraform(struct.url),
url_set: cdktf.booleanToTerraform(struct.urlSet),
};
}
function notificationDestinationConfigSlackToHclTerraform(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 = {
channel_id: {
value: cdktf.stringToHclTerraform(struct.channelId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
channel_id_set: {
value: cdktf.booleanToHclTerraform(struct.channelIdSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
oauth_token: {
value: cdktf.stringToHclTerraform(struct.oauthToken),
isBlock: false,
type: "simple",
storageClassType: "string",
},
oauth_token_set: {
value: cdktf.booleanToHclTerraform(struct.oauthTokenSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
url: {
value: cdktf.stringToHclTerraform(struct.url),
isBlock: false,
type: "simple",
storageClassType: "string",
},
url_set: {
value: cdktf.booleanToHclTerraform(struct.urlSet),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigSlackOutputReference 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._channelId !== undefined) {
hasAnyValues = true;
internalValueResult.channelId = this._channelId;
}
if (this._channelIdSet !== undefined) {
hasAnyValues = true;
internalValueResult.channelIdSet = this._channelIdSet;
}
if (this._oauthToken !== undefined) {
hasAnyValues = true;
internalValueResult.oauthToken = this._oauthToken;
}
if (this._oauthTokenSet !== undefined) {
hasAnyValues = true;
internalValueResult.oauthTokenSet = this._oauthTokenSet;
}
if (this._url !== undefined) {
hasAnyValues = true;
internalValueResult.url = this._url;
}
if (this._urlSet !== undefined) {
hasAnyValues = true;
internalValueResult.urlSet = this._urlSet;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._channelId = undefined;
this._channelIdSet = undefined;
this._oauthToken = undefined;
this._oauthTokenSet = undefined;
this._url = undefined;
this._urlSet = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._channelId = value.channelId;
this._channelIdSet = value.channelIdSet;
this._oauthToken = value.oauthToken;
this._oauthTokenSet = value.oauthTokenSet;
this._url = value.url;
this._urlSet = value.urlSet;
}
}
get channelId() {
return this.getStringAttribute('channel_id');
}
set channelId(value) {
this._channelId = value;
}
resetChannelId() {
this._channelId = undefined;
}
// Temporarily expose input value. Use with caution.
get channelIdInput() {
return this._channelId;
}
get channelIdSet() {
return this.getBooleanAttribute('channel_id_set');
}
set channelIdSet(value) {
this._channelIdSet = value;
}
resetChannelIdSet() {
this._channelIdSet = undefined;
}
// Temporarily expose input value. Use with caution.
get channelIdSetInput() {
return this._channelIdSet;
}
get oauthToken() {
return this.getStringAttribute('oauth_token');
}
set oauthToken(value) {
this._oauthToken = value;
}
resetOauthToken() {
this._oauthToken = undefined;
}
// Temporarily expose input value. Use with caution.
get oauthTokenInput() {
return this._oauthToken;
}
get oauthTokenSet() {
return this.getBooleanAttribute('oauth_token_set');
}
set oauthTokenSet(value) {
this._oauthTokenSet = value;
}
resetOauthTokenSet() {
this._oauthTokenSet = undefined;
}
// Temporarily expose input value. Use with caution.
get oauthTokenSetInput() {
return this._oauthTokenSet;
}
get url() {
return this.getStringAttribute('url');
}
set url(value) {
this._url = value;
}
resetUrl() {
this._url = undefined;
}
// Temporarily expose input value. Use with caution.
get urlInput() {
return this._url;
}
get urlSet() {
return this.getBooleanAttribute('url_set');
}
set urlSet(value) {
this._urlSet = value;
}
resetUrlSet() {
this._urlSet = undefined;
}
// Temporarily expose input value. Use with caution.
get urlSetInput() {
return this._urlSet;
}
}
exports.NotificationDestinationConfigSlackOutputReference = NotificationDestinationConfigSlackOutputReference;
_e = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigSlackOutputReference[_e] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigSlackOutputReference", version: "15.16.1" };
function notificationDestinationConfigAToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
email: notificationDestinationConfigEmailToTerraform(struct.email),
generic_webhook: notificationDestinationConfigGenericWebhookToTerraform(struct.genericWebhook),
microsoft_teams: notificationDestinationConfigMicrosoftTeamsToTerraform(struct.microsoftTeams),
pagerduty: notificationDestinationConfigPagerdutyToTerraform(struct.pagerduty),
slack: notificationDestinationConfigSlackToTerraform(struct.slack),
};
}
function notificationDestinationConfigAToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
email: {
value: notificationDestinationConfigEmailToHclTerraform(struct.email),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigEmailList",
},
generic_webhook: {
value: notificationDestinationConfigGenericWebhookToHclTerraform(struct.genericWebhook),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigGenericWebhookList",
},
microsoft_teams: {
value: notificationDestinationConfigMicrosoftTeamsToHclTerraform(struct.microsoftTeams),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigMicrosoftTeamsList",
},
pagerduty: {
value: notificationDestinationConfigPagerdutyToHclTerraform(struct.pagerduty),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigPagerdutyList",
},
slack: {
value: notificationDestinationConfigSlackToHclTerraform(struct.slack),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigSlackList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class NotificationDestinationConfigAOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
// email - computed: false, optional: true, required: false
this._email = new NotificationDestinationConfigEmailOutputReference(this, "email");
// generic_webhook - computed: false, optional: true, required: false
this._genericWebhook = new NotificationDestinationConfigGenericWebhookOutputReference(this, "generic_webhook");
// microsoft_teams - computed: false, optional: true, required: false
this._microsoftTeams = new NotificationDestinationConfigMicrosoftTeamsOutputReference(this, "microsoft_teams");
// pagerduty - computed: false, optional: true, required: false
this._pagerduty = new NotificationDestinationConfigPagerdutyOutputReference(this, "pagerduty");
// slack - computed: false, optional: true, required: false
this._slack = new NotificationDestinationConfigSlackOutputReference(this, "slack");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._email?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email?.internalValue;
}
if (this._genericWebhook?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.genericWebhook = this._genericWebhook?.internalValue;
}
if (this._microsoftTeams?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.microsoftTeams = this._microsoftTeams?.internalValue;
}
if (this._pagerduty?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.pagerduty = this._pagerduty?.internalValue;
}
if (this._slack?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.slack = this._slack?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._email.internalValue = undefined;
this._genericWebhook.internalValue = undefined;
this._microsoftTeams.internalValue = undefined;
this._pagerduty.internalValue = undefined;
this._slack.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._email.internalValue = value.email;
this._genericWebhook.internalValue = value.genericWebhook;
this._microsoftTeams.internalValue = value.microsoftTeams;
this._pagerduty.internalValue = value.pagerduty;
this._slack.internalValue = value.slack;
}
}
get email() {
return this._email;
}
putEmail(value) {
this._email.internalValue = value;
}
resetEmail() {
this._email.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email.internalValue;
}
get genericWebhook() {
return this._genericWebhook;
}
putGenericWebhook(value) {
this._genericWebhook.internalValue = value;
}
resetGenericWebhook() {
this._genericWebhook.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get genericWebhookInput() {
return this._genericWebhook.internalValue;
}
get microsoftTeams() {
return this._microsoftTeams;
}
putMicrosoftTeams(value) {
this._microsoftTeams.internalValue = value;
}
resetMicrosoftTeams() {
this._microsoftTeams.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get microsoftTeamsInput() {
return this._microsoftTeams.internalValue;
}
get pagerduty() {
return this._pagerduty;
}
putPagerduty(value) {
this._pagerduty.internalValue = value;
}
resetPagerduty() {
this._pagerduty.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get pagerdutyInput() {
return this._pagerduty.internalValue;
}
get slack() {
return this._slack;
}
putSlack(value) {
this._slack.internalValue = value;
}
resetSlack() {
this._slack.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get slackInput() {
return this._slack.internalValue;
}
}
exports.NotificationDestinationConfigAOutputReference = NotificationDestinationConfigAOutputReference;
_f = JSII_RTTI_SYMBOL_1;
NotificationDestinationConfigAOutputReference[_f] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestinationConfigAOutputReference", version: "15.16.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/databricks/databricks/1.99.0/docs/resources/notification_destination databricks_notification_destination}
*/
class NotificationDestination extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a NotificationDestination resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the NotificationDestination to import
* @param importFromId The id of the existing NotificationDestination that should be imported. Refer to the {@link https://registry.terraform.io/providers/databricks/databricks/1.99.0/docs/resources/notification_destination#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the NotificationDestination to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "databricks_notification_destination", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/databricks/databricks/1.99.0/docs/resources/notification_destination databricks_notification_destination} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options NotificationDestinationConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'databricks_notification_destination',
terraformGeneratorMetadata: {
providerName: 'databricks',
providerVersion: '1.99.0',
providerVersionConstraint: '~> 1.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// config - computed: false, optional: true, required: false
this._config = new NotificationDestinationConfigAOutputReference(this, "config");
this._destinationType = config.destinationType;
this._displayName = config.displayName;
this._id = config.id;
this._config.internalValue = config.config;
}
get destinationType() {
return this.getStringAttribute('destination_type');
}
set destinationType(value) {
this._destinationType = value;
}
resetDestinationType() {
this._destinationType = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationTypeInput() {
return this._destinationType;
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get config() {
return this._config;
}
putConfig(value) {
this._config.internalValue = value;
}
resetConfig() {
this._config.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get configInput() {
return this._config.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
destination_type: cdktf.stringToTerraform(this._destinationType),
display_name: cdktf.stringToTerraform(this._displayName),
id: cdktf.stringToTerraform(this._id),
config: notificationDestinationConfigAToTerraform(this._config.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
destination_type: {
value: cdktf.stringToHclTerraform(this._destinationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
config: {
value: notificationDestinationConfigAToHclTerraform(this._config.internalValue),
isBlock: true,
type: "list",
storageClassType: "NotificationDestinationConfigAList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.NotificationDestination = NotificationDestination;
_g = JSII_RTTI_SYMBOL_1;
NotificationDestination[_g] = { fqn: "@cdktf/provider-databricks.notificationDestination.NotificationDestination", version: "15.16.1" };
// =================
// STATIC PROPERTIES
// =================
NotificationDestination.tfResourceType = "databricks_notification_destination";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbm90aWZpY2F0aW9uLWRlc3RpbmF0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUEyQ0Esc0dBUUM7QUFHRCw0R0FnQkM7QUE2RUQsd0hBYUM7QUFHRCw4SEE4Q0M7QUEyTUQsd0hBaUJDO0FBR0QsOEhBc0VDO0FBbVFELDhHQVNDO0FBR0Qsb0hBc0JDO0FBbUdELHNHQWFDO0FBR0QsNEdBOENDO0FBaU1ELDhGQVlDO0FBR0Qsb0dBd0NDOztBQTNxQ0QsK0JBQStCO0FBa0MvQixTQUFnQiw2Q0FBNkMsQ0FBQyxNQUErRjtJQUMzSixJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxPQUFPO1FBQ0wsU0FBUyxFQUFFLEtBQUssQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLGlCQUFpQixFQUFFLEtBQUssQ0FBQyxDQUFDLE1BQU8sQ0FBQyxTQUFTLENBQUM7S0FDL0UsQ0FBQTtBQUNILENBQUM7QUFHRCxTQUFnQixnREFBZ0QsQ0FBQyxNQUErRjtJQUM5SixJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxNQUFNLEtBQUssR0FBRztRQUNaLFNBQVMsRUFBRTtZQUNULEtBQUssRUFBRSxLQUFLLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxvQkFBb0IsRUFBRSxLQUFLLENBQUMsQ0FBQyxNQUFPLENBQUMsU0FBUyxDQUFDO1lBQ2hGLE9BQU8sRUFBRSxLQUFLO1lBQ2QsSUFBSSxFQUFFLE1BQU07WUFDWixnQkFBZ0IsRUFBRSxZQUFZO1NBQy9CO0tBQ0YsQ0FBQztJQUVGLDhCQUE4QjtJQUM5QixPQUFPLE1BQU0sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxLQUFLLENBQUMsRUFBRSxFQUFFLENBQUMsS0FBSyxLQUFLLFNBQVMsSUFBSSxLQUFLLENBQUMsS0FBSyxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFDNUgsQ0FBQztBQUVELE1BQWEsaURBQWtELFNBQVEsS0FBSyxDQUFDLGFBQWE7SUFHeEY7OztNQUdFO0lBQ0YsWUFBbUIsaUJBQTZDLEVBQUUsa0JBQTBCO1FBQzFGLEtBQUssQ0FBQyxpQkFBaUIsRUFBRSxrQkFBa0IsRUFBRSxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFQakQsa0JBQWEsR0FBRyxLQUFLLENBQUM7SUFROUIsQ0FBQztJQUVELElBQVcsYUFBYTtRQUN0QixJQUFJLFlBQVksR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDO1FBQ3RDLE1BQU0sbUJBQW1CLEdBQVEsRUFBRSxDQUFDO1FBQ3BDLElBQUksSUFBSSxDQUFDLFVBQVUsS0FBSyxTQUFTLEVBQUUsQ0FBQztZQUNsQyxZQUFZLEdBQUcsSUFBSSxDQUFDO1lBQ3BCLG1CQUFtQixDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDO1FBQ2xELENBQUM7UUFDRCxPQUFPLFlBQVksQ0FBQyxDQUFDLENBQUMsbUJBQW1CLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztJQUN4RCxDQUFDO0lBRUQsSUFBVyxhQUFhLENBQUMsS0FBcUQ7UUFDNUUsSUFBSSxLQUFLLEtBQUssU0FBUyxFQUFFLENBQUM7WUFDeEIsSUFBSSxDQUFDLGFBQWEsR0FBRyxLQUFLLENBQUM7WUFDM0IsSUFBSSxDQUFDLFVBQVUsR0FBRyxTQUFTLENBQUM7UUFDOUIsQ0FBQzthQUNJLENBQUM7WUFDSixJQUFJLENBQUMsYUFBYSxHQUFHLE1BQU0s