@cdktf-providers/astronomer-astro 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +355 -0
  2. package/README.md +19 -0
  3. package/dist/alert/index.d.ts +566 -0
  4. package/dist/alert/index.js +1489 -0
  5. package/dist/api-token/index.d.ts +199 -0
  6. package/dist/api-token/index.js +503 -0
  7. package/dist/cluster/index.d.ts +305 -0
  8. package/dist/cluster/index.js +755 -0
  9. package/dist/data-astro-alert/index.d.ts +277 -0
  10. package/dist/data-astro-alert/index.js +762 -0
  11. package/dist/data-astro-alerts/index.d.ts +232 -0
  12. package/dist/data-astro-alerts/index.js +600 -0
  13. package/dist/data-astro-api-token/index.d.ts +135 -0
  14. package/dist/data-astro-api-token/index.js +353 -0
  15. package/dist/data-astro-api-tokens/index.d.ts +196 -0
  16. package/dist/data-astro-api-tokens/index.js +502 -0
  17. package/dist/data-astro-cluster/index.d.ts +211 -0
  18. package/dist/data-astro-cluster/index.js +535 -0
  19. package/dist/data-astro-cluster-options/index.d.ts +255 -0
  20. package/dist/data-astro-cluster-options/index.js +640 -0
  21. package/dist/data-astro-clusters/index.d.ts +263 -0
  22. package/dist/data-astro-clusters/index.js +661 -0
  23. package/dist/data-astro-deployment/index.d.ts +355 -0
  24. package/dist/data-astro-deployment/index.js +1009 -0
  25. package/dist/data-astro-deployment-options/index.d.ts +475 -0
  26. package/dist/data-astro-deployment-options/index.js +1274 -0
  27. package/dist/data-astro-deployments/index.d.ts +416 -0
  28. package/dist/data-astro-deployments/index.js +1158 -0
  29. package/dist/data-astro-notification-channel/index.d.ts +122 -0
  30. package/dist/data-astro-notification-channel/index.js +345 -0
  31. package/dist/data-astro-notification-channels/index.d.ts +201 -0
  32. package/dist/data-astro-notification-channels/index.js +540 -0
  33. package/dist/data-astro-organization/index.d.ts +87 -0
  34. package/dist/data-astro-organization/index.js +251 -0
  35. package/dist/data-astro-team/index.d.ts +204 -0
  36. package/dist/data-astro-team/index.js +507 -0
  37. package/dist/data-astro-teams/index.d.ts +247 -0
  38. package/dist/data-astro-teams/index.js +610 -0
  39. package/dist/data-astro-user/index.d.ts +122 -0
  40. package/dist/data-astro-user/index.js +274 -0
  41. package/dist/data-astro-users/index.d.ts +174 -0
  42. package/dist/data-astro-users/index.js +400 -0
  43. package/dist/data-astro-workspace/index.d.ts +94 -0
  44. package/dist/data-astro-workspace/index.js +250 -0
  45. package/dist/data-astro-workspaces/index.d.ts +146 -0
  46. package/dist/data-astro-workspaces/index.js +376 -0
  47. package/dist/deployment/index.d.ts +813 -0
  48. package/dist/deployment/index.js +2083 -0
  49. package/dist/hybrid-cluster-workspace-authorization/index.d.ts +53 -0
  50. package/dist/hybrid-cluster-workspace-authorization/index.js +111 -0
  51. package/dist/index.d.ts +31 -0
  52. package/dist/index.js +32 -0
  53. package/dist/lazy-index.d.ts +0 -0
  54. package/dist/lazy-index.js +32 -0
  55. package/dist/notification-channel/index.d.ts +235 -0
  56. package/dist/notification-channel/index.js +608 -0
  57. package/dist/provider/index.d.ts +75 -0
  58. package/dist/provider/index.js +151 -0
  59. package/dist/team/index.d.ts +251 -0
  60. package/dist/team/index.js +622 -0
  61. package/dist/team-roles/index.d.ts +180 -0
  62. package/dist/team-roles/index.js +414 -0
  63. package/dist/user-invite/index.d.ts +99 -0
  64. package/dist/user-invite/index.js +262 -0
  65. package/dist/user-roles/index.d.ts +180 -0
  66. package/dist/user-roles/index.js +414 -0
  67. package/dist/workspace/index.d.ts +109 -0
  68. package/dist/workspace/index.js +282 -0
  69. package/package.json +51 -0
@@ -0,0 +1,1489 @@
1
+ // https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/alert
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function alertCreatedByToTerraform(struct) {
5
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
6
+ return struct;
7
+ }
8
+ if (cdktf.isComplexElement(struct)) {
9
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
10
+ }
11
+ return {};
12
+ }
13
+ export function alertCreatedByToHclTerraform(struct) {
14
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
15
+ return struct;
16
+ }
17
+ if (cdktf.isComplexElement(struct)) {
18
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
19
+ }
20
+ const attrs = {};
21
+ return attrs;
22
+ }
23
+ export class AlertCreatedByOutputReference extends cdktf.ComplexObject {
24
+ isEmptyObject = false;
25
+ /**
26
+ * @param terraformResource The parent resource
27
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
28
+ */
29
+ constructor(terraformResource, terraformAttribute) {
30
+ super(terraformResource, terraformAttribute, false);
31
+ }
32
+ get internalValue() {
33
+ let hasAnyValues = this.isEmptyObject;
34
+ const internalValueResult = {};
35
+ return hasAnyValues ? internalValueResult : undefined;
36
+ }
37
+ set internalValue(value) {
38
+ if (value === undefined) {
39
+ this.isEmptyObject = false;
40
+ }
41
+ else {
42
+ this.isEmptyObject = Object.keys(value).length === 0;
43
+ }
44
+ }
45
+ // api_token_name - computed: true, optional: false, required: false
46
+ get apiTokenName() {
47
+ return this.getStringAttribute('api_token_name');
48
+ }
49
+ // avatar_url - computed: true, optional: false, required: false
50
+ get avatarUrl() {
51
+ return this.getStringAttribute('avatar_url');
52
+ }
53
+ // full_name - computed: true, optional: false, required: false
54
+ get fullName() {
55
+ return this.getStringAttribute('full_name');
56
+ }
57
+ // id - computed: true, optional: false, required: false
58
+ get id() {
59
+ return this.getStringAttribute('id');
60
+ }
61
+ // subject_type - computed: true, optional: false, required: false
62
+ get subjectType() {
63
+ return this.getStringAttribute('subject_type');
64
+ }
65
+ // username - computed: true, optional: false, required: false
66
+ get username() {
67
+ return this.getStringAttribute('username');
68
+ }
69
+ }
70
+ export function alertNotificationChannelsCreatedByToTerraform(struct) {
71
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
72
+ return struct;
73
+ }
74
+ if (cdktf.isComplexElement(struct)) {
75
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
76
+ }
77
+ return {};
78
+ }
79
+ export function alertNotificationChannelsCreatedByToHclTerraform(struct) {
80
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
81
+ return struct;
82
+ }
83
+ if (cdktf.isComplexElement(struct)) {
84
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
85
+ }
86
+ const attrs = {};
87
+ return attrs;
88
+ }
89
+ export class AlertNotificationChannelsCreatedByOutputReference extends cdktf.ComplexObject {
90
+ isEmptyObject = false;
91
+ /**
92
+ * @param terraformResource The parent resource
93
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
94
+ */
95
+ constructor(terraformResource, terraformAttribute) {
96
+ super(terraformResource, terraformAttribute, false);
97
+ }
98
+ get internalValue() {
99
+ let hasAnyValues = this.isEmptyObject;
100
+ const internalValueResult = {};
101
+ return hasAnyValues ? internalValueResult : undefined;
102
+ }
103
+ set internalValue(value) {
104
+ if (value === undefined) {
105
+ this.isEmptyObject = false;
106
+ }
107
+ else {
108
+ this.isEmptyObject = Object.keys(value).length === 0;
109
+ }
110
+ }
111
+ // api_token_name - computed: true, optional: false, required: false
112
+ get apiTokenName() {
113
+ return this.getStringAttribute('api_token_name');
114
+ }
115
+ // avatar_url - computed: true, optional: false, required: false
116
+ get avatarUrl() {
117
+ return this.getStringAttribute('avatar_url');
118
+ }
119
+ // full_name - computed: true, optional: false, required: false
120
+ get fullName() {
121
+ return this.getStringAttribute('full_name');
122
+ }
123
+ // id - computed: true, optional: false, required: false
124
+ get id() {
125
+ return this.getStringAttribute('id');
126
+ }
127
+ // subject_type - computed: true, optional: false, required: false
128
+ get subjectType() {
129
+ return this.getStringAttribute('subject_type');
130
+ }
131
+ // username - computed: true, optional: false, required: false
132
+ get username() {
133
+ return this.getStringAttribute('username');
134
+ }
135
+ }
136
+ export function alertNotificationChannelsDefinitionToTerraform(struct) {
137
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
138
+ return struct;
139
+ }
140
+ if (cdktf.isComplexElement(struct)) {
141
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
142
+ }
143
+ return {
144
+ api_key: cdktf.stringToTerraform(struct.apiKey),
145
+ dag_id: cdktf.stringToTerraform(struct.dagId),
146
+ deployment_api_token: cdktf.stringToTerraform(struct.deploymentApiToken),
147
+ deployment_id: cdktf.stringToTerraform(struct.deploymentId),
148
+ integration_key: cdktf.stringToTerraform(struct.integrationKey),
149
+ recipients: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.recipients),
150
+ webhook_url: cdktf.stringToTerraform(struct.webhookUrl),
151
+ };
152
+ }
153
+ export function alertNotificationChannelsDefinitionToHclTerraform(struct) {
154
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
155
+ return struct;
156
+ }
157
+ if (cdktf.isComplexElement(struct)) {
158
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
159
+ }
160
+ const attrs = {
161
+ api_key: {
162
+ value: cdktf.stringToHclTerraform(struct.apiKey),
163
+ isBlock: false,
164
+ type: "simple",
165
+ storageClassType: "string",
166
+ },
167
+ dag_id: {
168
+ value: cdktf.stringToHclTerraform(struct.dagId),
169
+ isBlock: false,
170
+ type: "simple",
171
+ storageClassType: "string",
172
+ },
173
+ deployment_api_token: {
174
+ value: cdktf.stringToHclTerraform(struct.deploymentApiToken),
175
+ isBlock: false,
176
+ type: "simple",
177
+ storageClassType: "string",
178
+ },
179
+ deployment_id: {
180
+ value: cdktf.stringToHclTerraform(struct.deploymentId),
181
+ isBlock: false,
182
+ type: "simple",
183
+ storageClassType: "string",
184
+ },
185
+ integration_key: {
186
+ value: cdktf.stringToHclTerraform(struct.integrationKey),
187
+ isBlock: false,
188
+ type: "simple",
189
+ storageClassType: "string",
190
+ },
191
+ recipients: {
192
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.recipients),
193
+ isBlock: false,
194
+ type: "set",
195
+ storageClassType: "stringList",
196
+ },
197
+ webhook_url: {
198
+ value: cdktf.stringToHclTerraform(struct.webhookUrl),
199
+ isBlock: false,
200
+ type: "simple",
201
+ storageClassType: "string",
202
+ },
203
+ };
204
+ // remove undefined attributes
205
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
206
+ }
207
+ export class AlertNotificationChannelsDefinitionOutputReference extends cdktf.ComplexObject {
208
+ isEmptyObject = false;
209
+ /**
210
+ * @param terraformResource The parent resource
211
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
212
+ */
213
+ constructor(terraformResource, terraformAttribute) {
214
+ super(terraformResource, terraformAttribute, false);
215
+ }
216
+ get internalValue() {
217
+ let hasAnyValues = this.isEmptyObject;
218
+ const internalValueResult = {};
219
+ if (this._apiKey !== undefined) {
220
+ hasAnyValues = true;
221
+ internalValueResult.apiKey = this._apiKey;
222
+ }
223
+ if (this._dagId !== undefined) {
224
+ hasAnyValues = true;
225
+ internalValueResult.dagId = this._dagId;
226
+ }
227
+ if (this._deploymentApiToken !== undefined) {
228
+ hasAnyValues = true;
229
+ internalValueResult.deploymentApiToken = this._deploymentApiToken;
230
+ }
231
+ if (this._deploymentId !== undefined) {
232
+ hasAnyValues = true;
233
+ internalValueResult.deploymentId = this._deploymentId;
234
+ }
235
+ if (this._integrationKey !== undefined) {
236
+ hasAnyValues = true;
237
+ internalValueResult.integrationKey = this._integrationKey;
238
+ }
239
+ if (this._recipients !== undefined) {
240
+ hasAnyValues = true;
241
+ internalValueResult.recipients = this._recipients;
242
+ }
243
+ if (this._webhookUrl !== undefined) {
244
+ hasAnyValues = true;
245
+ internalValueResult.webhookUrl = this._webhookUrl;
246
+ }
247
+ return hasAnyValues ? internalValueResult : undefined;
248
+ }
249
+ set internalValue(value) {
250
+ if (value === undefined) {
251
+ this.isEmptyObject = false;
252
+ this._apiKey = undefined;
253
+ this._dagId = undefined;
254
+ this._deploymentApiToken = undefined;
255
+ this._deploymentId = undefined;
256
+ this._integrationKey = undefined;
257
+ this._recipients = undefined;
258
+ this._webhookUrl = undefined;
259
+ }
260
+ else {
261
+ this.isEmptyObject = Object.keys(value).length === 0;
262
+ this._apiKey = value.apiKey;
263
+ this._dagId = value.dagId;
264
+ this._deploymentApiToken = value.deploymentApiToken;
265
+ this._deploymentId = value.deploymentId;
266
+ this._integrationKey = value.integrationKey;
267
+ this._recipients = value.recipients;
268
+ this._webhookUrl = value.webhookUrl;
269
+ }
270
+ }
271
+ // api_key - computed: true, optional: true, required: false
272
+ _apiKey;
273
+ get apiKey() {
274
+ return this.getStringAttribute('api_key');
275
+ }
276
+ set apiKey(value) {
277
+ this._apiKey = value;
278
+ }
279
+ resetApiKey() {
280
+ this._apiKey = undefined;
281
+ }
282
+ // Temporarily expose input value. Use with caution.
283
+ get apiKeyInput() {
284
+ return this._apiKey;
285
+ }
286
+ // dag_id - computed: true, optional: true, required: false
287
+ _dagId;
288
+ get dagId() {
289
+ return this.getStringAttribute('dag_id');
290
+ }
291
+ set dagId(value) {
292
+ this._dagId = value;
293
+ }
294
+ resetDagId() {
295
+ this._dagId = undefined;
296
+ }
297
+ // Temporarily expose input value. Use with caution.
298
+ get dagIdInput() {
299
+ return this._dagId;
300
+ }
301
+ // deployment_api_token - computed: true, optional: true, required: false
302
+ _deploymentApiToken;
303
+ get deploymentApiToken() {
304
+ return this.getStringAttribute('deployment_api_token');
305
+ }
306
+ set deploymentApiToken(value) {
307
+ this._deploymentApiToken = value;
308
+ }
309
+ resetDeploymentApiToken() {
310
+ this._deploymentApiToken = undefined;
311
+ }
312
+ // Temporarily expose input value. Use with caution.
313
+ get deploymentApiTokenInput() {
314
+ return this._deploymentApiToken;
315
+ }
316
+ // deployment_id - computed: true, optional: true, required: false
317
+ _deploymentId;
318
+ get deploymentId() {
319
+ return this.getStringAttribute('deployment_id');
320
+ }
321
+ set deploymentId(value) {
322
+ this._deploymentId = value;
323
+ }
324
+ resetDeploymentId() {
325
+ this._deploymentId = undefined;
326
+ }
327
+ // Temporarily expose input value. Use with caution.
328
+ get deploymentIdInput() {
329
+ return this._deploymentId;
330
+ }
331
+ // integration_key - computed: true, optional: true, required: false
332
+ _integrationKey;
333
+ get integrationKey() {
334
+ return this.getStringAttribute('integration_key');
335
+ }
336
+ set integrationKey(value) {
337
+ this._integrationKey = value;
338
+ }
339
+ resetIntegrationKey() {
340
+ this._integrationKey = undefined;
341
+ }
342
+ // Temporarily expose input value. Use with caution.
343
+ get integrationKeyInput() {
344
+ return this._integrationKey;
345
+ }
346
+ // recipients - computed: true, optional: true, required: false
347
+ _recipients;
348
+ get recipients() {
349
+ return cdktf.Fn.tolist(this.getListAttribute('recipients'));
350
+ }
351
+ set recipients(value) {
352
+ this._recipients = value;
353
+ }
354
+ resetRecipients() {
355
+ this._recipients = undefined;
356
+ }
357
+ // Temporarily expose input value. Use with caution.
358
+ get recipientsInput() {
359
+ return this._recipients;
360
+ }
361
+ // webhook_url - computed: true, optional: true, required: false
362
+ _webhookUrl;
363
+ get webhookUrl() {
364
+ return this.getStringAttribute('webhook_url');
365
+ }
366
+ set webhookUrl(value) {
367
+ this._webhookUrl = value;
368
+ }
369
+ resetWebhookUrl() {
370
+ this._webhookUrl = undefined;
371
+ }
372
+ // Temporarily expose input value. Use with caution.
373
+ get webhookUrlInput() {
374
+ return this._webhookUrl;
375
+ }
376
+ }
377
+ export function alertNotificationChannelsUpdatedByToTerraform(struct) {
378
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
379
+ return struct;
380
+ }
381
+ if (cdktf.isComplexElement(struct)) {
382
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
383
+ }
384
+ return {};
385
+ }
386
+ export function alertNotificationChannelsUpdatedByToHclTerraform(struct) {
387
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
388
+ return struct;
389
+ }
390
+ if (cdktf.isComplexElement(struct)) {
391
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
392
+ }
393
+ const attrs = {};
394
+ return attrs;
395
+ }
396
+ export class AlertNotificationChannelsUpdatedByOutputReference extends cdktf.ComplexObject {
397
+ isEmptyObject = false;
398
+ /**
399
+ * @param terraformResource The parent resource
400
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
401
+ */
402
+ constructor(terraformResource, terraformAttribute) {
403
+ super(terraformResource, terraformAttribute, false);
404
+ }
405
+ get internalValue() {
406
+ let hasAnyValues = this.isEmptyObject;
407
+ const internalValueResult = {};
408
+ return hasAnyValues ? internalValueResult : undefined;
409
+ }
410
+ set internalValue(value) {
411
+ if (value === undefined) {
412
+ this.isEmptyObject = false;
413
+ }
414
+ else {
415
+ this.isEmptyObject = Object.keys(value).length === 0;
416
+ }
417
+ }
418
+ // api_token_name - computed: true, optional: false, required: false
419
+ get apiTokenName() {
420
+ return this.getStringAttribute('api_token_name');
421
+ }
422
+ // avatar_url - computed: true, optional: false, required: false
423
+ get avatarUrl() {
424
+ return this.getStringAttribute('avatar_url');
425
+ }
426
+ // full_name - computed: true, optional: false, required: false
427
+ get fullName() {
428
+ return this.getStringAttribute('full_name');
429
+ }
430
+ // id - computed: true, optional: false, required: false
431
+ get id() {
432
+ return this.getStringAttribute('id');
433
+ }
434
+ // subject_type - computed: true, optional: false, required: false
435
+ get subjectType() {
436
+ return this.getStringAttribute('subject_type');
437
+ }
438
+ // username - computed: true, optional: false, required: false
439
+ get username() {
440
+ return this.getStringAttribute('username');
441
+ }
442
+ }
443
+ export function alertNotificationChannelsToTerraform(struct) {
444
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
445
+ return struct;
446
+ }
447
+ if (cdktf.isComplexElement(struct)) {
448
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
449
+ }
450
+ return {
451
+ definition: alertNotificationChannelsDefinitionToTerraform(struct.definition),
452
+ entity_id: cdktf.stringToTerraform(struct.entityId),
453
+ entity_type: cdktf.stringToTerraform(struct.entityType),
454
+ is_shared: cdktf.booleanToTerraform(struct.isShared),
455
+ name: cdktf.stringToTerraform(struct.name),
456
+ type: cdktf.stringToTerraform(struct.type),
457
+ };
458
+ }
459
+ export function alertNotificationChannelsToHclTerraform(struct) {
460
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
461
+ return struct;
462
+ }
463
+ if (cdktf.isComplexElement(struct)) {
464
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
465
+ }
466
+ const attrs = {
467
+ definition: {
468
+ value: alertNotificationChannelsDefinitionToHclTerraform(struct.definition),
469
+ isBlock: true,
470
+ type: "struct",
471
+ storageClassType: "AlertNotificationChannelsDefinition",
472
+ },
473
+ entity_id: {
474
+ value: cdktf.stringToHclTerraform(struct.entityId),
475
+ isBlock: false,
476
+ type: "simple",
477
+ storageClassType: "string",
478
+ },
479
+ entity_type: {
480
+ value: cdktf.stringToHclTerraform(struct.entityType),
481
+ isBlock: false,
482
+ type: "simple",
483
+ storageClassType: "string",
484
+ },
485
+ is_shared: {
486
+ value: cdktf.booleanToHclTerraform(struct.isShared),
487
+ isBlock: false,
488
+ type: "simple",
489
+ storageClassType: "boolean",
490
+ },
491
+ name: {
492
+ value: cdktf.stringToHclTerraform(struct.name),
493
+ isBlock: false,
494
+ type: "simple",
495
+ storageClassType: "string",
496
+ },
497
+ type: {
498
+ value: cdktf.stringToHclTerraform(struct.type),
499
+ isBlock: false,
500
+ type: "simple",
501
+ storageClassType: "string",
502
+ },
503
+ };
504
+ // remove undefined attributes
505
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
506
+ }
507
+ export class AlertNotificationChannelsOutputReference extends cdktf.ComplexObject {
508
+ isEmptyObject = false;
509
+ /**
510
+ * @param terraformResource The parent resource
511
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
512
+ * @param complexObjectIndex the index of this item in the list
513
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
514
+ */
515
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
516
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
517
+ }
518
+ get internalValue() {
519
+ let hasAnyValues = this.isEmptyObject;
520
+ const internalValueResult = {};
521
+ if (this._definition?.internalValue !== undefined) {
522
+ hasAnyValues = true;
523
+ internalValueResult.definition = this._definition?.internalValue;
524
+ }
525
+ if (this._entityId !== undefined) {
526
+ hasAnyValues = true;
527
+ internalValueResult.entityId = this._entityId;
528
+ }
529
+ if (this._entityType !== undefined) {
530
+ hasAnyValues = true;
531
+ internalValueResult.entityType = this._entityType;
532
+ }
533
+ if (this._isShared !== undefined) {
534
+ hasAnyValues = true;
535
+ internalValueResult.isShared = this._isShared;
536
+ }
537
+ if (this._name !== undefined) {
538
+ hasAnyValues = true;
539
+ internalValueResult.name = this._name;
540
+ }
541
+ if (this._type !== undefined) {
542
+ hasAnyValues = true;
543
+ internalValueResult.type = this._type;
544
+ }
545
+ return hasAnyValues ? internalValueResult : undefined;
546
+ }
547
+ set internalValue(value) {
548
+ if (value === undefined) {
549
+ this.isEmptyObject = false;
550
+ this._definition.internalValue = undefined;
551
+ this._entityId = undefined;
552
+ this._entityType = undefined;
553
+ this._isShared = undefined;
554
+ this._name = undefined;
555
+ this._type = undefined;
556
+ }
557
+ else {
558
+ this.isEmptyObject = Object.keys(value).length === 0;
559
+ this._definition.internalValue = value.definition;
560
+ this._entityId = value.entityId;
561
+ this._entityType = value.entityType;
562
+ this._isShared = value.isShared;
563
+ this._name = value.name;
564
+ this._type = value.type;
565
+ }
566
+ }
567
+ // created_at - computed: true, optional: false, required: false
568
+ get createdAt() {
569
+ return this.getStringAttribute('created_at');
570
+ }
571
+ // created_by - computed: true, optional: false, required: false
572
+ _createdBy = new AlertNotificationChannelsCreatedByOutputReference(this, "created_by");
573
+ get createdBy() {
574
+ return this._createdBy;
575
+ }
576
+ // definition - computed: true, optional: false, required: true
577
+ _definition = new AlertNotificationChannelsDefinitionOutputReference(this, "definition");
578
+ get definition() {
579
+ return this._definition;
580
+ }
581
+ putDefinition(value) {
582
+ this._definition.internalValue = value;
583
+ }
584
+ // Temporarily expose input value. Use with caution.
585
+ get definitionInput() {
586
+ return this._definition.internalValue;
587
+ }
588
+ // deployment_id - computed: true, optional: false, required: false
589
+ get deploymentId() {
590
+ return this.getStringAttribute('deployment_id');
591
+ }
592
+ // entity_id - computed: true, optional: false, required: true
593
+ _entityId;
594
+ get entityId() {
595
+ return this.getStringAttribute('entity_id');
596
+ }
597
+ set entityId(value) {
598
+ this._entityId = value;
599
+ }
600
+ // Temporarily expose input value. Use with caution.
601
+ get entityIdInput() {
602
+ return this._entityId;
603
+ }
604
+ // entity_name - computed: true, optional: false, required: false
605
+ get entityName() {
606
+ return this.getStringAttribute('entity_name');
607
+ }
608
+ // entity_type - computed: true, optional: false, required: true
609
+ _entityType;
610
+ get entityType() {
611
+ return this.getStringAttribute('entity_type');
612
+ }
613
+ set entityType(value) {
614
+ this._entityType = value;
615
+ }
616
+ // Temporarily expose input value. Use with caution.
617
+ get entityTypeInput() {
618
+ return this._entityType;
619
+ }
620
+ // id - computed: true, optional: false, required: false
621
+ get id() {
622
+ return this.getStringAttribute('id');
623
+ }
624
+ // is_shared - computed: true, optional: true, required: false
625
+ _isShared;
626
+ get isShared() {
627
+ return this.getBooleanAttribute('is_shared');
628
+ }
629
+ set isShared(value) {
630
+ this._isShared = value;
631
+ }
632
+ resetIsShared() {
633
+ this._isShared = undefined;
634
+ }
635
+ // Temporarily expose input value. Use with caution.
636
+ get isSharedInput() {
637
+ return this._isShared;
638
+ }
639
+ // name - computed: true, optional: false, required: true
640
+ _name;
641
+ get name() {
642
+ return this.getStringAttribute('name');
643
+ }
644
+ set name(value) {
645
+ this._name = value;
646
+ }
647
+ // Temporarily expose input value. Use with caution.
648
+ get nameInput() {
649
+ return this._name;
650
+ }
651
+ // type - computed: true, optional: false, required: true
652
+ _type;
653
+ get type() {
654
+ return this.getStringAttribute('type');
655
+ }
656
+ set type(value) {
657
+ this._type = value;
658
+ }
659
+ // Temporarily expose input value. Use with caution.
660
+ get typeInput() {
661
+ return this._type;
662
+ }
663
+ // updated_at - computed: true, optional: false, required: false
664
+ get updatedAt() {
665
+ return this.getStringAttribute('updated_at');
666
+ }
667
+ // updated_by - computed: true, optional: false, required: false
668
+ _updatedBy = new AlertNotificationChannelsUpdatedByOutputReference(this, "updated_by");
669
+ get updatedBy() {
670
+ return this._updatedBy;
671
+ }
672
+ // workspace_id - computed: true, optional: false, required: false
673
+ get workspaceId() {
674
+ return this.getStringAttribute('workspace_id');
675
+ }
676
+ }
677
+ export class AlertNotificationChannelsList extends cdktf.ComplexList {
678
+ terraformResource;
679
+ terraformAttribute;
680
+ wrapsSet;
681
+ internalValue;
682
+ /**
683
+ * @param terraformResource The parent resource
684
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
685
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
686
+ */
687
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
688
+ super(terraformResource, terraformAttribute, wrapsSet);
689
+ this.terraformResource = terraformResource;
690
+ this.terraformAttribute = terraformAttribute;
691
+ this.wrapsSet = wrapsSet;
692
+ }
693
+ /**
694
+ * @param index the index of the item to return
695
+ */
696
+ get(index) {
697
+ return new AlertNotificationChannelsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
698
+ }
699
+ }
700
+ export function alertRulesPatternMatchesToTerraform(struct) {
701
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
702
+ return struct;
703
+ }
704
+ if (cdktf.isComplexElement(struct)) {
705
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
706
+ }
707
+ return {
708
+ entity_type: cdktf.stringToTerraform(struct.entityType),
709
+ operator_type: cdktf.stringToTerraform(struct.operatorType),
710
+ values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values),
711
+ };
712
+ }
713
+ export function alertRulesPatternMatchesToHclTerraform(struct) {
714
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
715
+ return struct;
716
+ }
717
+ if (cdktf.isComplexElement(struct)) {
718
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
719
+ }
720
+ const attrs = {
721
+ entity_type: {
722
+ value: cdktf.stringToHclTerraform(struct.entityType),
723
+ isBlock: false,
724
+ type: "simple",
725
+ storageClassType: "string",
726
+ },
727
+ operator_type: {
728
+ value: cdktf.stringToHclTerraform(struct.operatorType),
729
+ isBlock: false,
730
+ type: "simple",
731
+ storageClassType: "string",
732
+ },
733
+ values: {
734
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values),
735
+ isBlock: false,
736
+ type: "set",
737
+ storageClassType: "stringList",
738
+ },
739
+ };
740
+ // remove undefined attributes
741
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
742
+ }
743
+ export class AlertRulesPatternMatchesOutputReference extends cdktf.ComplexObject {
744
+ isEmptyObject = false;
745
+ resolvableValue;
746
+ /**
747
+ * @param terraformResource The parent resource
748
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
749
+ * @param complexObjectIndex the index of this item in the list
750
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
751
+ */
752
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
753
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
754
+ }
755
+ get internalValue() {
756
+ if (this.resolvableValue) {
757
+ return this.resolvableValue;
758
+ }
759
+ let hasAnyValues = this.isEmptyObject;
760
+ const internalValueResult = {};
761
+ if (this._entityType !== undefined) {
762
+ hasAnyValues = true;
763
+ internalValueResult.entityType = this._entityType;
764
+ }
765
+ if (this._operatorType !== undefined) {
766
+ hasAnyValues = true;
767
+ internalValueResult.operatorType = this._operatorType;
768
+ }
769
+ if (this._values !== undefined) {
770
+ hasAnyValues = true;
771
+ internalValueResult.values = this._values;
772
+ }
773
+ return hasAnyValues ? internalValueResult : undefined;
774
+ }
775
+ set internalValue(value) {
776
+ if (value === undefined) {
777
+ this.isEmptyObject = false;
778
+ this.resolvableValue = undefined;
779
+ this._entityType = undefined;
780
+ this._operatorType = undefined;
781
+ this._values = undefined;
782
+ }
783
+ else if (cdktf.Tokenization.isResolvable(value)) {
784
+ this.isEmptyObject = false;
785
+ this.resolvableValue = value;
786
+ }
787
+ else {
788
+ this.isEmptyObject = Object.keys(value).length === 0;
789
+ this.resolvableValue = undefined;
790
+ this._entityType = value.entityType;
791
+ this._operatorType = value.operatorType;
792
+ this._values = value.values;
793
+ }
794
+ }
795
+ // entity_type - computed: false, optional: false, required: true
796
+ _entityType;
797
+ get entityType() {
798
+ return this.getStringAttribute('entity_type');
799
+ }
800
+ set entityType(value) {
801
+ this._entityType = value;
802
+ }
803
+ // Temporarily expose input value. Use with caution.
804
+ get entityTypeInput() {
805
+ return this._entityType;
806
+ }
807
+ // operator_type - computed: false, optional: false, required: true
808
+ _operatorType;
809
+ get operatorType() {
810
+ return this.getStringAttribute('operator_type');
811
+ }
812
+ set operatorType(value) {
813
+ this._operatorType = value;
814
+ }
815
+ // Temporarily expose input value. Use with caution.
816
+ get operatorTypeInput() {
817
+ return this._operatorType;
818
+ }
819
+ // values - computed: false, optional: false, required: true
820
+ _values;
821
+ get values() {
822
+ return cdktf.Fn.tolist(this.getListAttribute('values'));
823
+ }
824
+ set values(value) {
825
+ this._values = value;
826
+ }
827
+ // Temporarily expose input value. Use with caution.
828
+ get valuesInput() {
829
+ return this._values;
830
+ }
831
+ }
832
+ export class AlertRulesPatternMatchesList extends cdktf.ComplexList {
833
+ terraformResource;
834
+ terraformAttribute;
835
+ wrapsSet;
836
+ internalValue;
837
+ /**
838
+ * @param terraformResource The parent resource
839
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
840
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
841
+ */
842
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
843
+ super(terraformResource, terraformAttribute, wrapsSet);
844
+ this.terraformResource = terraformResource;
845
+ this.terraformAttribute = terraformAttribute;
846
+ this.wrapsSet = wrapsSet;
847
+ }
848
+ /**
849
+ * @param index the index of the item to return
850
+ */
851
+ get(index) {
852
+ return new AlertRulesPatternMatchesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
853
+ }
854
+ }
855
+ export function alertRulesPropertiesToTerraform(struct) {
856
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
857
+ return struct;
858
+ }
859
+ if (cdktf.isComplexElement(struct)) {
860
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
861
+ }
862
+ return {
863
+ dag_deadline: cdktf.stringToTerraform(struct.dagDeadline),
864
+ dag_duration_seconds: cdktf.numberToTerraform(struct.dagDurationSeconds),
865
+ days_of_week: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.daysOfWeek),
866
+ deployment_id: cdktf.stringToTerraform(struct.deploymentId),
867
+ look_back_period_seconds: cdktf.numberToTerraform(struct.lookBackPeriodSeconds),
868
+ task_duration_seconds: cdktf.numberToTerraform(struct.taskDurationSeconds),
869
+ };
870
+ }
871
+ export function alertRulesPropertiesToHclTerraform(struct) {
872
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
873
+ return struct;
874
+ }
875
+ if (cdktf.isComplexElement(struct)) {
876
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
877
+ }
878
+ const attrs = {
879
+ dag_deadline: {
880
+ value: cdktf.stringToHclTerraform(struct.dagDeadline),
881
+ isBlock: false,
882
+ type: "simple",
883
+ storageClassType: "string",
884
+ },
885
+ dag_duration_seconds: {
886
+ value: cdktf.numberToHclTerraform(struct.dagDurationSeconds),
887
+ isBlock: false,
888
+ type: "simple",
889
+ storageClassType: "number",
890
+ },
891
+ days_of_week: {
892
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.daysOfWeek),
893
+ isBlock: false,
894
+ type: "set",
895
+ storageClassType: "stringList",
896
+ },
897
+ deployment_id: {
898
+ value: cdktf.stringToHclTerraform(struct.deploymentId),
899
+ isBlock: false,
900
+ type: "simple",
901
+ storageClassType: "string",
902
+ },
903
+ look_back_period_seconds: {
904
+ value: cdktf.numberToHclTerraform(struct.lookBackPeriodSeconds),
905
+ isBlock: false,
906
+ type: "simple",
907
+ storageClassType: "number",
908
+ },
909
+ task_duration_seconds: {
910
+ value: cdktf.numberToHclTerraform(struct.taskDurationSeconds),
911
+ isBlock: false,
912
+ type: "simple",
913
+ storageClassType: "number",
914
+ },
915
+ };
916
+ // remove undefined attributes
917
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
918
+ }
919
+ export class AlertRulesPropertiesOutputReference extends cdktf.ComplexObject {
920
+ isEmptyObject = false;
921
+ resolvableValue;
922
+ /**
923
+ * @param terraformResource The parent resource
924
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
925
+ */
926
+ constructor(terraformResource, terraformAttribute) {
927
+ super(terraformResource, terraformAttribute, false);
928
+ }
929
+ get internalValue() {
930
+ if (this.resolvableValue) {
931
+ return this.resolvableValue;
932
+ }
933
+ let hasAnyValues = this.isEmptyObject;
934
+ const internalValueResult = {};
935
+ if (this._dagDeadline !== undefined) {
936
+ hasAnyValues = true;
937
+ internalValueResult.dagDeadline = this._dagDeadline;
938
+ }
939
+ if (this._dagDurationSeconds !== undefined) {
940
+ hasAnyValues = true;
941
+ internalValueResult.dagDurationSeconds = this._dagDurationSeconds;
942
+ }
943
+ if (this._daysOfWeek !== undefined) {
944
+ hasAnyValues = true;
945
+ internalValueResult.daysOfWeek = this._daysOfWeek;
946
+ }
947
+ if (this._deploymentId !== undefined) {
948
+ hasAnyValues = true;
949
+ internalValueResult.deploymentId = this._deploymentId;
950
+ }
951
+ if (this._lookBackPeriodSeconds !== undefined) {
952
+ hasAnyValues = true;
953
+ internalValueResult.lookBackPeriodSeconds = this._lookBackPeriodSeconds;
954
+ }
955
+ if (this._taskDurationSeconds !== undefined) {
956
+ hasAnyValues = true;
957
+ internalValueResult.taskDurationSeconds = this._taskDurationSeconds;
958
+ }
959
+ return hasAnyValues ? internalValueResult : undefined;
960
+ }
961
+ set internalValue(value) {
962
+ if (value === undefined) {
963
+ this.isEmptyObject = false;
964
+ this.resolvableValue = undefined;
965
+ this._dagDeadline = undefined;
966
+ this._dagDurationSeconds = undefined;
967
+ this._daysOfWeek = undefined;
968
+ this._deploymentId = undefined;
969
+ this._lookBackPeriodSeconds = undefined;
970
+ this._taskDurationSeconds = undefined;
971
+ }
972
+ else if (cdktf.Tokenization.isResolvable(value)) {
973
+ this.isEmptyObject = false;
974
+ this.resolvableValue = value;
975
+ }
976
+ else {
977
+ this.isEmptyObject = Object.keys(value).length === 0;
978
+ this.resolvableValue = undefined;
979
+ this._dagDeadline = value.dagDeadline;
980
+ this._dagDurationSeconds = value.dagDurationSeconds;
981
+ this._daysOfWeek = value.daysOfWeek;
982
+ this._deploymentId = value.deploymentId;
983
+ this._lookBackPeriodSeconds = value.lookBackPeriodSeconds;
984
+ this._taskDurationSeconds = value.taskDurationSeconds;
985
+ }
986
+ }
987
+ // dag_deadline - computed: false, optional: true, required: false
988
+ _dagDeadline;
989
+ get dagDeadline() {
990
+ return this.getStringAttribute('dag_deadline');
991
+ }
992
+ set dagDeadline(value) {
993
+ this._dagDeadline = value;
994
+ }
995
+ resetDagDeadline() {
996
+ this._dagDeadline = undefined;
997
+ }
998
+ // Temporarily expose input value. Use with caution.
999
+ get dagDeadlineInput() {
1000
+ return this._dagDeadline;
1001
+ }
1002
+ // dag_duration_seconds - computed: false, optional: true, required: false
1003
+ _dagDurationSeconds;
1004
+ get dagDurationSeconds() {
1005
+ return this.getNumberAttribute('dag_duration_seconds');
1006
+ }
1007
+ set dagDurationSeconds(value) {
1008
+ this._dagDurationSeconds = value;
1009
+ }
1010
+ resetDagDurationSeconds() {
1011
+ this._dagDurationSeconds = undefined;
1012
+ }
1013
+ // Temporarily expose input value. Use with caution.
1014
+ get dagDurationSecondsInput() {
1015
+ return this._dagDurationSeconds;
1016
+ }
1017
+ // days_of_week - computed: false, optional: true, required: false
1018
+ _daysOfWeek;
1019
+ get daysOfWeek() {
1020
+ return cdktf.Fn.tolist(this.getListAttribute('days_of_week'));
1021
+ }
1022
+ set daysOfWeek(value) {
1023
+ this._daysOfWeek = value;
1024
+ }
1025
+ resetDaysOfWeek() {
1026
+ this._daysOfWeek = undefined;
1027
+ }
1028
+ // Temporarily expose input value. Use with caution.
1029
+ get daysOfWeekInput() {
1030
+ return this._daysOfWeek;
1031
+ }
1032
+ // deployment_id - computed: false, optional: false, required: true
1033
+ _deploymentId;
1034
+ get deploymentId() {
1035
+ return this.getStringAttribute('deployment_id');
1036
+ }
1037
+ set deploymentId(value) {
1038
+ this._deploymentId = value;
1039
+ }
1040
+ // Temporarily expose input value. Use with caution.
1041
+ get deploymentIdInput() {
1042
+ return this._deploymentId;
1043
+ }
1044
+ // look_back_period_seconds - computed: false, optional: true, required: false
1045
+ _lookBackPeriodSeconds;
1046
+ get lookBackPeriodSeconds() {
1047
+ return this.getNumberAttribute('look_back_period_seconds');
1048
+ }
1049
+ set lookBackPeriodSeconds(value) {
1050
+ this._lookBackPeriodSeconds = value;
1051
+ }
1052
+ resetLookBackPeriodSeconds() {
1053
+ this._lookBackPeriodSeconds = undefined;
1054
+ }
1055
+ // Temporarily expose input value. Use with caution.
1056
+ get lookBackPeriodSecondsInput() {
1057
+ return this._lookBackPeriodSeconds;
1058
+ }
1059
+ // task_duration_seconds - computed: false, optional: true, required: false
1060
+ _taskDurationSeconds;
1061
+ get taskDurationSeconds() {
1062
+ return this.getNumberAttribute('task_duration_seconds');
1063
+ }
1064
+ set taskDurationSeconds(value) {
1065
+ this._taskDurationSeconds = value;
1066
+ }
1067
+ resetTaskDurationSeconds() {
1068
+ this._taskDurationSeconds = undefined;
1069
+ }
1070
+ // Temporarily expose input value. Use with caution.
1071
+ get taskDurationSecondsInput() {
1072
+ return this._taskDurationSeconds;
1073
+ }
1074
+ }
1075
+ export function alertRulesToTerraform(struct) {
1076
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1077
+ return struct;
1078
+ }
1079
+ if (cdktf.isComplexElement(struct)) {
1080
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1081
+ }
1082
+ return {
1083
+ pattern_matches: cdktf.listMapper(alertRulesPatternMatchesToTerraform, false)(struct.patternMatches),
1084
+ properties: alertRulesPropertiesToTerraform(struct.properties),
1085
+ };
1086
+ }
1087
+ export function alertRulesToHclTerraform(struct) {
1088
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1089
+ return struct;
1090
+ }
1091
+ if (cdktf.isComplexElement(struct)) {
1092
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1093
+ }
1094
+ const attrs = {
1095
+ pattern_matches: {
1096
+ value: cdktf.listMapperHcl(alertRulesPatternMatchesToHclTerraform, false)(struct.patternMatches),
1097
+ isBlock: true,
1098
+ type: "set",
1099
+ storageClassType: "AlertRulesPatternMatchesList",
1100
+ },
1101
+ properties: {
1102
+ value: alertRulesPropertiesToHclTerraform(struct.properties),
1103
+ isBlock: true,
1104
+ type: "struct",
1105
+ storageClassType: "AlertRulesProperties",
1106
+ },
1107
+ };
1108
+ // remove undefined attributes
1109
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
1110
+ }
1111
+ export class AlertRulesOutputReference extends cdktf.ComplexObject {
1112
+ isEmptyObject = false;
1113
+ resolvableValue;
1114
+ /**
1115
+ * @param terraformResource The parent resource
1116
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
1117
+ */
1118
+ constructor(terraformResource, terraformAttribute) {
1119
+ super(terraformResource, terraformAttribute, false);
1120
+ }
1121
+ get internalValue() {
1122
+ if (this.resolvableValue) {
1123
+ return this.resolvableValue;
1124
+ }
1125
+ let hasAnyValues = this.isEmptyObject;
1126
+ const internalValueResult = {};
1127
+ if (this._patternMatches?.internalValue !== undefined) {
1128
+ hasAnyValues = true;
1129
+ internalValueResult.patternMatches = this._patternMatches?.internalValue;
1130
+ }
1131
+ if (this._properties?.internalValue !== undefined) {
1132
+ hasAnyValues = true;
1133
+ internalValueResult.properties = this._properties?.internalValue;
1134
+ }
1135
+ return hasAnyValues ? internalValueResult : undefined;
1136
+ }
1137
+ set internalValue(value) {
1138
+ if (value === undefined) {
1139
+ this.isEmptyObject = false;
1140
+ this.resolvableValue = undefined;
1141
+ this._patternMatches.internalValue = undefined;
1142
+ this._properties.internalValue = undefined;
1143
+ }
1144
+ else if (cdktf.Tokenization.isResolvable(value)) {
1145
+ this.isEmptyObject = false;
1146
+ this.resolvableValue = value;
1147
+ }
1148
+ else {
1149
+ this.isEmptyObject = Object.keys(value).length === 0;
1150
+ this.resolvableValue = undefined;
1151
+ this._patternMatches.internalValue = value.patternMatches;
1152
+ this._properties.internalValue = value.properties;
1153
+ }
1154
+ }
1155
+ // pattern_matches - computed: false, optional: false, required: true
1156
+ _patternMatches = new AlertRulesPatternMatchesList(this, "pattern_matches", true);
1157
+ get patternMatches() {
1158
+ return this._patternMatches;
1159
+ }
1160
+ putPatternMatches(value) {
1161
+ this._patternMatches.internalValue = value;
1162
+ }
1163
+ // Temporarily expose input value. Use with caution.
1164
+ get patternMatchesInput() {
1165
+ return this._patternMatches.internalValue;
1166
+ }
1167
+ // properties - computed: false, optional: false, required: true
1168
+ _properties = new AlertRulesPropertiesOutputReference(this, "properties");
1169
+ get properties() {
1170
+ return this._properties;
1171
+ }
1172
+ putProperties(value) {
1173
+ this._properties.internalValue = value;
1174
+ }
1175
+ // Temporarily expose input value. Use with caution.
1176
+ get propertiesInput() {
1177
+ return this._properties.internalValue;
1178
+ }
1179
+ }
1180
+ export function alertUpdatedByToTerraform(struct) {
1181
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1182
+ return struct;
1183
+ }
1184
+ if (cdktf.isComplexElement(struct)) {
1185
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1186
+ }
1187
+ return {};
1188
+ }
1189
+ export function alertUpdatedByToHclTerraform(struct) {
1190
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1191
+ return struct;
1192
+ }
1193
+ if (cdktf.isComplexElement(struct)) {
1194
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1195
+ }
1196
+ const attrs = {};
1197
+ return attrs;
1198
+ }
1199
+ export class AlertUpdatedByOutputReference extends cdktf.ComplexObject {
1200
+ isEmptyObject = false;
1201
+ /**
1202
+ * @param terraformResource The parent resource
1203
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
1204
+ */
1205
+ constructor(terraformResource, terraformAttribute) {
1206
+ super(terraformResource, terraformAttribute, false);
1207
+ }
1208
+ get internalValue() {
1209
+ let hasAnyValues = this.isEmptyObject;
1210
+ const internalValueResult = {};
1211
+ return hasAnyValues ? internalValueResult : undefined;
1212
+ }
1213
+ set internalValue(value) {
1214
+ if (value === undefined) {
1215
+ this.isEmptyObject = false;
1216
+ }
1217
+ else {
1218
+ this.isEmptyObject = Object.keys(value).length === 0;
1219
+ }
1220
+ }
1221
+ // api_token_name - computed: true, optional: false, required: false
1222
+ get apiTokenName() {
1223
+ return this.getStringAttribute('api_token_name');
1224
+ }
1225
+ // avatar_url - computed: true, optional: false, required: false
1226
+ get avatarUrl() {
1227
+ return this.getStringAttribute('avatar_url');
1228
+ }
1229
+ // full_name - computed: true, optional: false, required: false
1230
+ get fullName() {
1231
+ return this.getStringAttribute('full_name');
1232
+ }
1233
+ // id - computed: true, optional: false, required: false
1234
+ get id() {
1235
+ return this.getStringAttribute('id');
1236
+ }
1237
+ // subject_type - computed: true, optional: false, required: false
1238
+ get subjectType() {
1239
+ return this.getStringAttribute('subject_type');
1240
+ }
1241
+ // username - computed: true, optional: false, required: false
1242
+ get username() {
1243
+ return this.getStringAttribute('username');
1244
+ }
1245
+ }
1246
+ /**
1247
+ * Represents a {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/alert astro_alert}
1248
+ */
1249
+ export class Alert extends cdktf.TerraformResource {
1250
+ // =================
1251
+ // STATIC PROPERTIES
1252
+ // =================
1253
+ static tfResourceType = "astro_alert";
1254
+ // ==============
1255
+ // STATIC Methods
1256
+ // ==============
1257
+ /**
1258
+ * Generates CDKTF code for importing a Alert resource upon running "cdktf plan <stack-name>"
1259
+ * @param scope The scope in which to define this construct
1260
+ * @param importToId The construct id used in the generated config for the Alert to import
1261
+ * @param importFromId The id of the existing Alert that should be imported. Refer to the {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/alert#import import section} in the documentation of this resource for the id to use
1262
+ * @param provider? Optional instance of the provider where the Alert to import is found
1263
+ */
1264
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
1265
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "astro_alert", importId: importFromId, provider });
1266
+ }
1267
+ // ===========
1268
+ // INITIALIZER
1269
+ // ===========
1270
+ /**
1271
+ * Create a new {@link https://registry.terraform.io/providers/astronomer/astro/1.0.8/docs/resources/alert astro_alert} Resource
1272
+ *
1273
+ * @param scope The scope in which to define this construct
1274
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
1275
+ * @param options AlertConfig
1276
+ */
1277
+ constructor(scope, id, config) {
1278
+ super(scope, id, {
1279
+ terraformResourceType: 'astro_alert',
1280
+ terraformGeneratorMetadata: {
1281
+ providerName: 'astro',
1282
+ providerVersion: '1.0.8',
1283
+ providerVersionConstraint: '1.0.8'
1284
+ },
1285
+ provider: config.provider,
1286
+ dependsOn: config.dependsOn,
1287
+ count: config.count,
1288
+ lifecycle: config.lifecycle,
1289
+ provisioners: config.provisioners,
1290
+ connection: config.connection,
1291
+ forEach: config.forEach
1292
+ });
1293
+ this._entityId = config.entityId;
1294
+ this._entityType = config.entityType;
1295
+ this._name = config.name;
1296
+ this._notificationChannelIds = config.notificationChannelIds;
1297
+ this._rules.internalValue = config.rules;
1298
+ this._severity = config.severity;
1299
+ this._type = config.type;
1300
+ }
1301
+ // ==========
1302
+ // ATTRIBUTES
1303
+ // ==========
1304
+ // created_at - computed: true, optional: false, required: false
1305
+ get createdAt() {
1306
+ return this.getStringAttribute('created_at');
1307
+ }
1308
+ // created_by - computed: true, optional: false, required: false
1309
+ _createdBy = new AlertCreatedByOutputReference(this, "created_by");
1310
+ get createdBy() {
1311
+ return this._createdBy;
1312
+ }
1313
+ // deployment_id - computed: true, optional: false, required: false
1314
+ get deploymentId() {
1315
+ return this.getStringAttribute('deployment_id');
1316
+ }
1317
+ // entity_id - computed: false, optional: false, required: true
1318
+ _entityId;
1319
+ get entityId() {
1320
+ return this.getStringAttribute('entity_id');
1321
+ }
1322
+ set entityId(value) {
1323
+ this._entityId = value;
1324
+ }
1325
+ // Temporarily expose input value. Use with caution.
1326
+ get entityIdInput() {
1327
+ return this._entityId;
1328
+ }
1329
+ // entity_name - computed: true, optional: false, required: false
1330
+ get entityName() {
1331
+ return this.getStringAttribute('entity_name');
1332
+ }
1333
+ // entity_type - computed: false, optional: false, required: true
1334
+ _entityType;
1335
+ get entityType() {
1336
+ return this.getStringAttribute('entity_type');
1337
+ }
1338
+ set entityType(value) {
1339
+ this._entityType = value;
1340
+ }
1341
+ // Temporarily expose input value. Use with caution.
1342
+ get entityTypeInput() {
1343
+ return this._entityType;
1344
+ }
1345
+ // id - computed: true, optional: false, required: false
1346
+ get id() {
1347
+ return this.getStringAttribute('id');
1348
+ }
1349
+ // name - computed: false, optional: false, required: true
1350
+ _name;
1351
+ get name() {
1352
+ return this.getStringAttribute('name');
1353
+ }
1354
+ set name(value) {
1355
+ this._name = value;
1356
+ }
1357
+ // Temporarily expose input value. Use with caution.
1358
+ get nameInput() {
1359
+ return this._name;
1360
+ }
1361
+ // notification_channel_ids - computed: false, optional: false, required: true
1362
+ _notificationChannelIds;
1363
+ get notificationChannelIds() {
1364
+ return cdktf.Fn.tolist(this.getListAttribute('notification_channel_ids'));
1365
+ }
1366
+ set notificationChannelIds(value) {
1367
+ this._notificationChannelIds = value;
1368
+ }
1369
+ // Temporarily expose input value. Use with caution.
1370
+ get notificationChannelIdsInput() {
1371
+ return this._notificationChannelIds;
1372
+ }
1373
+ // notification_channels - computed: true, optional: false, required: false
1374
+ _notificationChannels = new AlertNotificationChannelsList(this, "notification_channels", true);
1375
+ get notificationChannels() {
1376
+ return this._notificationChannels;
1377
+ }
1378
+ // rules - computed: false, optional: false, required: true
1379
+ _rules = new AlertRulesOutputReference(this, "rules");
1380
+ get rules() {
1381
+ return this._rules;
1382
+ }
1383
+ putRules(value) {
1384
+ this._rules.internalValue = value;
1385
+ }
1386
+ // Temporarily expose input value. Use with caution.
1387
+ get rulesInput() {
1388
+ return this._rules.internalValue;
1389
+ }
1390
+ // severity - computed: false, optional: false, required: true
1391
+ _severity;
1392
+ get severity() {
1393
+ return this.getStringAttribute('severity');
1394
+ }
1395
+ set severity(value) {
1396
+ this._severity = value;
1397
+ }
1398
+ // Temporarily expose input value. Use with caution.
1399
+ get severityInput() {
1400
+ return this._severity;
1401
+ }
1402
+ // type - computed: false, optional: false, required: true
1403
+ _type;
1404
+ get type() {
1405
+ return this.getStringAttribute('type');
1406
+ }
1407
+ set type(value) {
1408
+ this._type = value;
1409
+ }
1410
+ // Temporarily expose input value. Use with caution.
1411
+ get typeInput() {
1412
+ return this._type;
1413
+ }
1414
+ // updated_at - computed: true, optional: false, required: false
1415
+ get updatedAt() {
1416
+ return this.getStringAttribute('updated_at');
1417
+ }
1418
+ // updated_by - computed: true, optional: false, required: false
1419
+ _updatedBy = new AlertUpdatedByOutputReference(this, "updated_by");
1420
+ get updatedBy() {
1421
+ return this._updatedBy;
1422
+ }
1423
+ // workspace_id - computed: true, optional: false, required: false
1424
+ get workspaceId() {
1425
+ return this.getStringAttribute('workspace_id');
1426
+ }
1427
+ // =========
1428
+ // SYNTHESIS
1429
+ // =========
1430
+ synthesizeAttributes() {
1431
+ return {
1432
+ entity_id: cdktf.stringToTerraform(this._entityId),
1433
+ entity_type: cdktf.stringToTerraform(this._entityType),
1434
+ name: cdktf.stringToTerraform(this._name),
1435
+ notification_channel_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._notificationChannelIds),
1436
+ rules: alertRulesToTerraform(this._rules.internalValue),
1437
+ severity: cdktf.stringToTerraform(this._severity),
1438
+ type: cdktf.stringToTerraform(this._type),
1439
+ };
1440
+ }
1441
+ synthesizeHclAttributes() {
1442
+ const attrs = {
1443
+ entity_id: {
1444
+ value: cdktf.stringToHclTerraform(this._entityId),
1445
+ isBlock: false,
1446
+ type: "simple",
1447
+ storageClassType: "string",
1448
+ },
1449
+ entity_type: {
1450
+ value: cdktf.stringToHclTerraform(this._entityType),
1451
+ isBlock: false,
1452
+ type: "simple",
1453
+ storageClassType: "string",
1454
+ },
1455
+ name: {
1456
+ value: cdktf.stringToHclTerraform(this._name),
1457
+ isBlock: false,
1458
+ type: "simple",
1459
+ storageClassType: "string",
1460
+ },
1461
+ notification_channel_ids: {
1462
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._notificationChannelIds),
1463
+ isBlock: false,
1464
+ type: "set",
1465
+ storageClassType: "stringList",
1466
+ },
1467
+ rules: {
1468
+ value: alertRulesToHclTerraform(this._rules.internalValue),
1469
+ isBlock: true,
1470
+ type: "struct",
1471
+ storageClassType: "AlertRules",
1472
+ },
1473
+ severity: {
1474
+ value: cdktf.stringToHclTerraform(this._severity),
1475
+ isBlock: false,
1476
+ type: "simple",
1477
+ storageClassType: "string",
1478
+ },
1479
+ type: {
1480
+ value: cdktf.stringToHclTerraform(this._type),
1481
+ isBlock: false,
1482
+ type: "simple",
1483
+ storageClassType: "string",
1484
+ },
1485
+ };
1486
+ // remove undefined attributes
1487
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
1488
+ }
1489
+ }