@cdktf-providers/aptible 0.9.18

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.
@@ -0,0 +1,1743 @@
1
+ // https://registry.terraform.io/providers/aptible/aptible/0.9.18/docs/resources/app
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function appServiceAutoscalingPolicyToTerraform(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
+ autoscaling_type: cdktf.stringToTerraform(struct.autoscalingType),
13
+ max_containers: cdktf.numberToTerraform(struct.maxContainers),
14
+ max_cpu_threshold: cdktf.numberToTerraform(struct.maxCpuThreshold),
15
+ maximum_memory: cdktf.numberToTerraform(struct.maximumMemory),
16
+ mem_cpu_ratio_c_threshold: cdktf.numberToTerraform(struct.memCpuRatioCThreshold),
17
+ mem_cpu_ratio_r_threshold: cdktf.numberToTerraform(struct.memCpuRatioRThreshold),
18
+ mem_scale_down_threshold: cdktf.numberToTerraform(struct.memScaleDownThreshold),
19
+ mem_scale_up_threshold: cdktf.numberToTerraform(struct.memScaleUpThreshold),
20
+ metric_lookback_seconds: cdktf.numberToTerraform(struct.metricLookbackSeconds),
21
+ min_containers: cdktf.numberToTerraform(struct.minContainers),
22
+ min_cpu_threshold: cdktf.numberToTerraform(struct.minCpuThreshold),
23
+ minimum_memory: cdktf.numberToTerraform(struct.minimumMemory),
24
+ percentile: cdktf.numberToTerraform(struct.percentile),
25
+ post_release_cooldown_seconds: cdktf.numberToTerraform(struct.postReleaseCooldownSeconds),
26
+ post_scale_down_cooldown_seconds: cdktf.numberToTerraform(struct.postScaleDownCooldownSeconds),
27
+ post_scale_up_cooldown_seconds: cdktf.numberToTerraform(struct.postScaleUpCooldownSeconds),
28
+ scale_down_step: cdktf.numberToTerraform(struct.scaleDownStep),
29
+ scale_up_step: cdktf.numberToTerraform(struct.scaleUpStep),
30
+ use_horizontal_scale: cdktf.booleanToTerraform(struct.useHorizontalScale),
31
+ };
32
+ }
33
+ export function appServiceAutoscalingPolicyToHclTerraform(struct) {
34
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
35
+ return struct;
36
+ }
37
+ if (cdktf.isComplexElement(struct)) {
38
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
39
+ }
40
+ const attrs = {
41
+ autoscaling_type: {
42
+ value: cdktf.stringToHclTerraform(struct.autoscalingType),
43
+ isBlock: false,
44
+ type: "simple",
45
+ storageClassType: "string",
46
+ },
47
+ max_containers: {
48
+ value: cdktf.numberToHclTerraform(struct.maxContainers),
49
+ isBlock: false,
50
+ type: "simple",
51
+ storageClassType: "number",
52
+ },
53
+ max_cpu_threshold: {
54
+ value: cdktf.numberToHclTerraform(struct.maxCpuThreshold),
55
+ isBlock: false,
56
+ type: "simple",
57
+ storageClassType: "number",
58
+ },
59
+ maximum_memory: {
60
+ value: cdktf.numberToHclTerraform(struct.maximumMemory),
61
+ isBlock: false,
62
+ type: "simple",
63
+ storageClassType: "number",
64
+ },
65
+ mem_cpu_ratio_c_threshold: {
66
+ value: cdktf.numberToHclTerraform(struct.memCpuRatioCThreshold),
67
+ isBlock: false,
68
+ type: "simple",
69
+ storageClassType: "number",
70
+ },
71
+ mem_cpu_ratio_r_threshold: {
72
+ value: cdktf.numberToHclTerraform(struct.memCpuRatioRThreshold),
73
+ isBlock: false,
74
+ type: "simple",
75
+ storageClassType: "number",
76
+ },
77
+ mem_scale_down_threshold: {
78
+ value: cdktf.numberToHclTerraform(struct.memScaleDownThreshold),
79
+ isBlock: false,
80
+ type: "simple",
81
+ storageClassType: "number",
82
+ },
83
+ mem_scale_up_threshold: {
84
+ value: cdktf.numberToHclTerraform(struct.memScaleUpThreshold),
85
+ isBlock: false,
86
+ type: "simple",
87
+ storageClassType: "number",
88
+ },
89
+ metric_lookback_seconds: {
90
+ value: cdktf.numberToHclTerraform(struct.metricLookbackSeconds),
91
+ isBlock: false,
92
+ type: "simple",
93
+ storageClassType: "number",
94
+ },
95
+ min_containers: {
96
+ value: cdktf.numberToHclTerraform(struct.minContainers),
97
+ isBlock: false,
98
+ type: "simple",
99
+ storageClassType: "number",
100
+ },
101
+ min_cpu_threshold: {
102
+ value: cdktf.numberToHclTerraform(struct.minCpuThreshold),
103
+ isBlock: false,
104
+ type: "simple",
105
+ storageClassType: "number",
106
+ },
107
+ minimum_memory: {
108
+ value: cdktf.numberToHclTerraform(struct.minimumMemory),
109
+ isBlock: false,
110
+ type: "simple",
111
+ storageClassType: "number",
112
+ },
113
+ percentile: {
114
+ value: cdktf.numberToHclTerraform(struct.percentile),
115
+ isBlock: false,
116
+ type: "simple",
117
+ storageClassType: "number",
118
+ },
119
+ post_release_cooldown_seconds: {
120
+ value: cdktf.numberToHclTerraform(struct.postReleaseCooldownSeconds),
121
+ isBlock: false,
122
+ type: "simple",
123
+ storageClassType: "number",
124
+ },
125
+ post_scale_down_cooldown_seconds: {
126
+ value: cdktf.numberToHclTerraform(struct.postScaleDownCooldownSeconds),
127
+ isBlock: false,
128
+ type: "simple",
129
+ storageClassType: "number",
130
+ },
131
+ post_scale_up_cooldown_seconds: {
132
+ value: cdktf.numberToHclTerraform(struct.postScaleUpCooldownSeconds),
133
+ isBlock: false,
134
+ type: "simple",
135
+ storageClassType: "number",
136
+ },
137
+ scale_down_step: {
138
+ value: cdktf.numberToHclTerraform(struct.scaleDownStep),
139
+ isBlock: false,
140
+ type: "simple",
141
+ storageClassType: "number",
142
+ },
143
+ scale_up_step: {
144
+ value: cdktf.numberToHclTerraform(struct.scaleUpStep),
145
+ isBlock: false,
146
+ type: "simple",
147
+ storageClassType: "number",
148
+ },
149
+ use_horizontal_scale: {
150
+ value: cdktf.booleanToHclTerraform(struct.useHorizontalScale),
151
+ isBlock: false,
152
+ type: "simple",
153
+ storageClassType: "boolean",
154
+ },
155
+ };
156
+ // remove undefined attributes
157
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
158
+ }
159
+ export class AppServiceAutoscalingPolicyOutputReference extends cdktf.ComplexObject {
160
+ isEmptyObject = false;
161
+ resolvableValue;
162
+ /**
163
+ * @param terraformResource The parent resource
164
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
165
+ * @param complexObjectIndex the index of this item in the list
166
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
167
+ */
168
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
169
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
170
+ }
171
+ get internalValue() {
172
+ if (this.resolvableValue) {
173
+ return this.resolvableValue;
174
+ }
175
+ let hasAnyValues = this.isEmptyObject;
176
+ const internalValueResult = {};
177
+ if (this._autoscalingType !== undefined) {
178
+ hasAnyValues = true;
179
+ internalValueResult.autoscalingType = this._autoscalingType;
180
+ }
181
+ if (this._maxContainers !== undefined) {
182
+ hasAnyValues = true;
183
+ internalValueResult.maxContainers = this._maxContainers;
184
+ }
185
+ if (this._maxCpuThreshold !== undefined) {
186
+ hasAnyValues = true;
187
+ internalValueResult.maxCpuThreshold = this._maxCpuThreshold;
188
+ }
189
+ if (this._maximumMemory !== undefined) {
190
+ hasAnyValues = true;
191
+ internalValueResult.maximumMemory = this._maximumMemory;
192
+ }
193
+ if (this._memCpuRatioCThreshold !== undefined) {
194
+ hasAnyValues = true;
195
+ internalValueResult.memCpuRatioCThreshold = this._memCpuRatioCThreshold;
196
+ }
197
+ if (this._memCpuRatioRThreshold !== undefined) {
198
+ hasAnyValues = true;
199
+ internalValueResult.memCpuRatioRThreshold = this._memCpuRatioRThreshold;
200
+ }
201
+ if (this._memScaleDownThreshold !== undefined) {
202
+ hasAnyValues = true;
203
+ internalValueResult.memScaleDownThreshold = this._memScaleDownThreshold;
204
+ }
205
+ if (this._memScaleUpThreshold !== undefined) {
206
+ hasAnyValues = true;
207
+ internalValueResult.memScaleUpThreshold = this._memScaleUpThreshold;
208
+ }
209
+ if (this._metricLookbackSeconds !== undefined) {
210
+ hasAnyValues = true;
211
+ internalValueResult.metricLookbackSeconds = this._metricLookbackSeconds;
212
+ }
213
+ if (this._minContainers !== undefined) {
214
+ hasAnyValues = true;
215
+ internalValueResult.minContainers = this._minContainers;
216
+ }
217
+ if (this._minCpuThreshold !== undefined) {
218
+ hasAnyValues = true;
219
+ internalValueResult.minCpuThreshold = this._minCpuThreshold;
220
+ }
221
+ if (this._minimumMemory !== undefined) {
222
+ hasAnyValues = true;
223
+ internalValueResult.minimumMemory = this._minimumMemory;
224
+ }
225
+ if (this._percentile !== undefined) {
226
+ hasAnyValues = true;
227
+ internalValueResult.percentile = this._percentile;
228
+ }
229
+ if (this._postReleaseCooldownSeconds !== undefined) {
230
+ hasAnyValues = true;
231
+ internalValueResult.postReleaseCooldownSeconds = this._postReleaseCooldownSeconds;
232
+ }
233
+ if (this._postScaleDownCooldownSeconds !== undefined) {
234
+ hasAnyValues = true;
235
+ internalValueResult.postScaleDownCooldownSeconds = this._postScaleDownCooldownSeconds;
236
+ }
237
+ if (this._postScaleUpCooldownSeconds !== undefined) {
238
+ hasAnyValues = true;
239
+ internalValueResult.postScaleUpCooldownSeconds = this._postScaleUpCooldownSeconds;
240
+ }
241
+ if (this._scaleDownStep !== undefined) {
242
+ hasAnyValues = true;
243
+ internalValueResult.scaleDownStep = this._scaleDownStep;
244
+ }
245
+ if (this._scaleUpStep !== undefined) {
246
+ hasAnyValues = true;
247
+ internalValueResult.scaleUpStep = this._scaleUpStep;
248
+ }
249
+ if (this._useHorizontalScale !== undefined) {
250
+ hasAnyValues = true;
251
+ internalValueResult.useHorizontalScale = this._useHorizontalScale;
252
+ }
253
+ return hasAnyValues ? internalValueResult : undefined;
254
+ }
255
+ set internalValue(value) {
256
+ if (value === undefined) {
257
+ this.isEmptyObject = false;
258
+ this.resolvableValue = undefined;
259
+ this._autoscalingType = undefined;
260
+ this._maxContainers = undefined;
261
+ this._maxCpuThreshold = undefined;
262
+ this._maximumMemory = undefined;
263
+ this._memCpuRatioCThreshold = undefined;
264
+ this._memCpuRatioRThreshold = undefined;
265
+ this._memScaleDownThreshold = undefined;
266
+ this._memScaleUpThreshold = undefined;
267
+ this._metricLookbackSeconds = undefined;
268
+ this._minContainers = undefined;
269
+ this._minCpuThreshold = undefined;
270
+ this._minimumMemory = undefined;
271
+ this._percentile = undefined;
272
+ this._postReleaseCooldownSeconds = undefined;
273
+ this._postScaleDownCooldownSeconds = undefined;
274
+ this._postScaleUpCooldownSeconds = undefined;
275
+ this._scaleDownStep = undefined;
276
+ this._scaleUpStep = undefined;
277
+ this._useHorizontalScale = undefined;
278
+ }
279
+ else if (cdktf.Tokenization.isResolvable(value)) {
280
+ this.isEmptyObject = false;
281
+ this.resolvableValue = value;
282
+ }
283
+ else {
284
+ this.isEmptyObject = Object.keys(value).length === 0;
285
+ this.resolvableValue = undefined;
286
+ this._autoscalingType = value.autoscalingType;
287
+ this._maxContainers = value.maxContainers;
288
+ this._maxCpuThreshold = value.maxCpuThreshold;
289
+ this._maximumMemory = value.maximumMemory;
290
+ this._memCpuRatioCThreshold = value.memCpuRatioCThreshold;
291
+ this._memCpuRatioRThreshold = value.memCpuRatioRThreshold;
292
+ this._memScaleDownThreshold = value.memScaleDownThreshold;
293
+ this._memScaleUpThreshold = value.memScaleUpThreshold;
294
+ this._metricLookbackSeconds = value.metricLookbackSeconds;
295
+ this._minContainers = value.minContainers;
296
+ this._minCpuThreshold = value.minCpuThreshold;
297
+ this._minimumMemory = value.minimumMemory;
298
+ this._percentile = value.percentile;
299
+ this._postReleaseCooldownSeconds = value.postReleaseCooldownSeconds;
300
+ this._postScaleDownCooldownSeconds = value.postScaleDownCooldownSeconds;
301
+ this._postScaleUpCooldownSeconds = value.postScaleUpCooldownSeconds;
302
+ this._scaleDownStep = value.scaleDownStep;
303
+ this._scaleUpStep = value.scaleUpStep;
304
+ this._useHorizontalScale = value.useHorizontalScale;
305
+ }
306
+ }
307
+ // autoscaling_type - computed: false, optional: false, required: true
308
+ _autoscalingType;
309
+ get autoscalingType() {
310
+ return this.getStringAttribute('autoscaling_type');
311
+ }
312
+ set autoscalingType(value) {
313
+ this._autoscalingType = value;
314
+ }
315
+ // Temporarily expose input value. Use with caution.
316
+ get autoscalingTypeInput() {
317
+ return this._autoscalingType;
318
+ }
319
+ // max_containers - computed: false, optional: true, required: false
320
+ _maxContainers;
321
+ get maxContainers() {
322
+ return this.getNumberAttribute('max_containers');
323
+ }
324
+ set maxContainers(value) {
325
+ this._maxContainers = value;
326
+ }
327
+ resetMaxContainers() {
328
+ this._maxContainers = undefined;
329
+ }
330
+ // Temporarily expose input value. Use with caution.
331
+ get maxContainersInput() {
332
+ return this._maxContainers;
333
+ }
334
+ // max_cpu_threshold - computed: false, optional: true, required: false
335
+ _maxCpuThreshold;
336
+ get maxCpuThreshold() {
337
+ return this.getNumberAttribute('max_cpu_threshold');
338
+ }
339
+ set maxCpuThreshold(value) {
340
+ this._maxCpuThreshold = value;
341
+ }
342
+ resetMaxCpuThreshold() {
343
+ this._maxCpuThreshold = undefined;
344
+ }
345
+ // Temporarily expose input value. Use with caution.
346
+ get maxCpuThresholdInput() {
347
+ return this._maxCpuThreshold;
348
+ }
349
+ // maximum_memory - computed: false, optional: true, required: false
350
+ _maximumMemory;
351
+ get maximumMemory() {
352
+ return this.getNumberAttribute('maximum_memory');
353
+ }
354
+ set maximumMemory(value) {
355
+ this._maximumMemory = value;
356
+ }
357
+ resetMaximumMemory() {
358
+ this._maximumMemory = undefined;
359
+ }
360
+ // Temporarily expose input value. Use with caution.
361
+ get maximumMemoryInput() {
362
+ return this._maximumMemory;
363
+ }
364
+ // mem_cpu_ratio_c_threshold - computed: false, optional: true, required: false
365
+ _memCpuRatioCThreshold;
366
+ get memCpuRatioCThreshold() {
367
+ return this.getNumberAttribute('mem_cpu_ratio_c_threshold');
368
+ }
369
+ set memCpuRatioCThreshold(value) {
370
+ this._memCpuRatioCThreshold = value;
371
+ }
372
+ resetMemCpuRatioCThreshold() {
373
+ this._memCpuRatioCThreshold = undefined;
374
+ }
375
+ // Temporarily expose input value. Use with caution.
376
+ get memCpuRatioCThresholdInput() {
377
+ return this._memCpuRatioCThreshold;
378
+ }
379
+ // mem_cpu_ratio_r_threshold - computed: false, optional: true, required: false
380
+ _memCpuRatioRThreshold;
381
+ get memCpuRatioRThreshold() {
382
+ return this.getNumberAttribute('mem_cpu_ratio_r_threshold');
383
+ }
384
+ set memCpuRatioRThreshold(value) {
385
+ this._memCpuRatioRThreshold = value;
386
+ }
387
+ resetMemCpuRatioRThreshold() {
388
+ this._memCpuRatioRThreshold = undefined;
389
+ }
390
+ // Temporarily expose input value. Use with caution.
391
+ get memCpuRatioRThresholdInput() {
392
+ return this._memCpuRatioRThreshold;
393
+ }
394
+ // mem_scale_down_threshold - computed: false, optional: true, required: false
395
+ _memScaleDownThreshold;
396
+ get memScaleDownThreshold() {
397
+ return this.getNumberAttribute('mem_scale_down_threshold');
398
+ }
399
+ set memScaleDownThreshold(value) {
400
+ this._memScaleDownThreshold = value;
401
+ }
402
+ resetMemScaleDownThreshold() {
403
+ this._memScaleDownThreshold = undefined;
404
+ }
405
+ // Temporarily expose input value. Use with caution.
406
+ get memScaleDownThresholdInput() {
407
+ return this._memScaleDownThreshold;
408
+ }
409
+ // mem_scale_up_threshold - computed: false, optional: true, required: false
410
+ _memScaleUpThreshold;
411
+ get memScaleUpThreshold() {
412
+ return this.getNumberAttribute('mem_scale_up_threshold');
413
+ }
414
+ set memScaleUpThreshold(value) {
415
+ this._memScaleUpThreshold = value;
416
+ }
417
+ resetMemScaleUpThreshold() {
418
+ this._memScaleUpThreshold = undefined;
419
+ }
420
+ // Temporarily expose input value. Use with caution.
421
+ get memScaleUpThresholdInput() {
422
+ return this._memScaleUpThreshold;
423
+ }
424
+ // metric_lookback_seconds - computed: false, optional: true, required: false
425
+ _metricLookbackSeconds;
426
+ get metricLookbackSeconds() {
427
+ return this.getNumberAttribute('metric_lookback_seconds');
428
+ }
429
+ set metricLookbackSeconds(value) {
430
+ this._metricLookbackSeconds = value;
431
+ }
432
+ resetMetricLookbackSeconds() {
433
+ this._metricLookbackSeconds = undefined;
434
+ }
435
+ // Temporarily expose input value. Use with caution.
436
+ get metricLookbackSecondsInput() {
437
+ return this._metricLookbackSeconds;
438
+ }
439
+ // min_containers - computed: false, optional: true, required: false
440
+ _minContainers;
441
+ get minContainers() {
442
+ return this.getNumberAttribute('min_containers');
443
+ }
444
+ set minContainers(value) {
445
+ this._minContainers = value;
446
+ }
447
+ resetMinContainers() {
448
+ this._minContainers = undefined;
449
+ }
450
+ // Temporarily expose input value. Use with caution.
451
+ get minContainersInput() {
452
+ return this._minContainers;
453
+ }
454
+ // min_cpu_threshold - computed: false, optional: true, required: false
455
+ _minCpuThreshold;
456
+ get minCpuThreshold() {
457
+ return this.getNumberAttribute('min_cpu_threshold');
458
+ }
459
+ set minCpuThreshold(value) {
460
+ this._minCpuThreshold = value;
461
+ }
462
+ resetMinCpuThreshold() {
463
+ this._minCpuThreshold = undefined;
464
+ }
465
+ // Temporarily expose input value. Use with caution.
466
+ get minCpuThresholdInput() {
467
+ return this._minCpuThreshold;
468
+ }
469
+ // minimum_memory - computed: false, optional: true, required: false
470
+ _minimumMemory;
471
+ get minimumMemory() {
472
+ return this.getNumberAttribute('minimum_memory');
473
+ }
474
+ set minimumMemory(value) {
475
+ this._minimumMemory = value;
476
+ }
477
+ resetMinimumMemory() {
478
+ this._minimumMemory = undefined;
479
+ }
480
+ // Temporarily expose input value. Use with caution.
481
+ get minimumMemoryInput() {
482
+ return this._minimumMemory;
483
+ }
484
+ // percentile - computed: false, optional: true, required: false
485
+ _percentile;
486
+ get percentile() {
487
+ return this.getNumberAttribute('percentile');
488
+ }
489
+ set percentile(value) {
490
+ this._percentile = value;
491
+ }
492
+ resetPercentile() {
493
+ this._percentile = undefined;
494
+ }
495
+ // Temporarily expose input value. Use with caution.
496
+ get percentileInput() {
497
+ return this._percentile;
498
+ }
499
+ // post_release_cooldown_seconds - computed: false, optional: true, required: false
500
+ _postReleaseCooldownSeconds;
501
+ get postReleaseCooldownSeconds() {
502
+ return this.getNumberAttribute('post_release_cooldown_seconds');
503
+ }
504
+ set postReleaseCooldownSeconds(value) {
505
+ this._postReleaseCooldownSeconds = value;
506
+ }
507
+ resetPostReleaseCooldownSeconds() {
508
+ this._postReleaseCooldownSeconds = undefined;
509
+ }
510
+ // Temporarily expose input value. Use with caution.
511
+ get postReleaseCooldownSecondsInput() {
512
+ return this._postReleaseCooldownSeconds;
513
+ }
514
+ // post_scale_down_cooldown_seconds - computed: false, optional: true, required: false
515
+ _postScaleDownCooldownSeconds;
516
+ get postScaleDownCooldownSeconds() {
517
+ return this.getNumberAttribute('post_scale_down_cooldown_seconds');
518
+ }
519
+ set postScaleDownCooldownSeconds(value) {
520
+ this._postScaleDownCooldownSeconds = value;
521
+ }
522
+ resetPostScaleDownCooldownSeconds() {
523
+ this._postScaleDownCooldownSeconds = undefined;
524
+ }
525
+ // Temporarily expose input value. Use with caution.
526
+ get postScaleDownCooldownSecondsInput() {
527
+ return this._postScaleDownCooldownSeconds;
528
+ }
529
+ // post_scale_up_cooldown_seconds - computed: false, optional: true, required: false
530
+ _postScaleUpCooldownSeconds;
531
+ get postScaleUpCooldownSeconds() {
532
+ return this.getNumberAttribute('post_scale_up_cooldown_seconds');
533
+ }
534
+ set postScaleUpCooldownSeconds(value) {
535
+ this._postScaleUpCooldownSeconds = value;
536
+ }
537
+ resetPostScaleUpCooldownSeconds() {
538
+ this._postScaleUpCooldownSeconds = undefined;
539
+ }
540
+ // Temporarily expose input value. Use with caution.
541
+ get postScaleUpCooldownSecondsInput() {
542
+ return this._postScaleUpCooldownSeconds;
543
+ }
544
+ // scale_down_step - computed: false, optional: true, required: false
545
+ _scaleDownStep;
546
+ get scaleDownStep() {
547
+ return this.getNumberAttribute('scale_down_step');
548
+ }
549
+ set scaleDownStep(value) {
550
+ this._scaleDownStep = value;
551
+ }
552
+ resetScaleDownStep() {
553
+ this._scaleDownStep = undefined;
554
+ }
555
+ // Temporarily expose input value. Use with caution.
556
+ get scaleDownStepInput() {
557
+ return this._scaleDownStep;
558
+ }
559
+ // scale_up_step - computed: false, optional: true, required: false
560
+ _scaleUpStep;
561
+ get scaleUpStep() {
562
+ return this.getNumberAttribute('scale_up_step');
563
+ }
564
+ set scaleUpStep(value) {
565
+ this._scaleUpStep = value;
566
+ }
567
+ resetScaleUpStep() {
568
+ this._scaleUpStep = undefined;
569
+ }
570
+ // Temporarily expose input value. Use with caution.
571
+ get scaleUpStepInput() {
572
+ return this._scaleUpStep;
573
+ }
574
+ // scaling_enabled - computed: true, optional: false, required: false
575
+ get scalingEnabled() {
576
+ return this.getBooleanAttribute('scaling_enabled');
577
+ }
578
+ // use_horizontal_scale - computed: false, optional: true, required: false
579
+ _useHorizontalScale;
580
+ get useHorizontalScale() {
581
+ return this.getBooleanAttribute('use_horizontal_scale');
582
+ }
583
+ set useHorizontalScale(value) {
584
+ this._useHorizontalScale = value;
585
+ }
586
+ resetUseHorizontalScale() {
587
+ this._useHorizontalScale = undefined;
588
+ }
589
+ // Temporarily expose input value. Use with caution.
590
+ get useHorizontalScaleInput() {
591
+ return this._useHorizontalScale;
592
+ }
593
+ }
594
+ export class AppServiceAutoscalingPolicyList extends cdktf.ComplexList {
595
+ terraformResource;
596
+ terraformAttribute;
597
+ wrapsSet;
598
+ internalValue;
599
+ /**
600
+ * @param terraformResource The parent resource
601
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
602
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
603
+ */
604
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
605
+ super(terraformResource, terraformAttribute, wrapsSet);
606
+ this.terraformResource = terraformResource;
607
+ this.terraformAttribute = terraformAttribute;
608
+ this.wrapsSet = wrapsSet;
609
+ }
610
+ /**
611
+ * @param index the index of the item to return
612
+ */
613
+ get(index) {
614
+ return new AppServiceAutoscalingPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
615
+ }
616
+ }
617
+ export function appServiceServiceSizingPolicyToTerraform(struct) {
618
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
619
+ return struct;
620
+ }
621
+ if (cdktf.isComplexElement(struct)) {
622
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
623
+ }
624
+ return {
625
+ autoscaling_type: cdktf.stringToTerraform(struct.autoscalingType),
626
+ max_containers: cdktf.numberToTerraform(struct.maxContainers),
627
+ max_cpu_threshold: cdktf.numberToTerraform(struct.maxCpuThreshold),
628
+ maximum_memory: cdktf.numberToTerraform(struct.maximumMemory),
629
+ mem_cpu_ratio_c_threshold: cdktf.numberToTerraform(struct.memCpuRatioCThreshold),
630
+ mem_cpu_ratio_r_threshold: cdktf.numberToTerraform(struct.memCpuRatioRThreshold),
631
+ mem_scale_down_threshold: cdktf.numberToTerraform(struct.memScaleDownThreshold),
632
+ mem_scale_up_threshold: cdktf.numberToTerraform(struct.memScaleUpThreshold),
633
+ metric_lookback_seconds: cdktf.numberToTerraform(struct.metricLookbackSeconds),
634
+ min_containers: cdktf.numberToTerraform(struct.minContainers),
635
+ min_cpu_threshold: cdktf.numberToTerraform(struct.minCpuThreshold),
636
+ minimum_memory: cdktf.numberToTerraform(struct.minimumMemory),
637
+ percentile: cdktf.numberToTerraform(struct.percentile),
638
+ post_release_cooldown_seconds: cdktf.numberToTerraform(struct.postReleaseCooldownSeconds),
639
+ post_scale_down_cooldown_seconds: cdktf.numberToTerraform(struct.postScaleDownCooldownSeconds),
640
+ post_scale_up_cooldown_seconds: cdktf.numberToTerraform(struct.postScaleUpCooldownSeconds),
641
+ scale_down_step: cdktf.numberToTerraform(struct.scaleDownStep),
642
+ scale_up_step: cdktf.numberToTerraform(struct.scaleUpStep),
643
+ use_horizontal_scale: cdktf.booleanToTerraform(struct.useHorizontalScale),
644
+ };
645
+ }
646
+ export function appServiceServiceSizingPolicyToHclTerraform(struct) {
647
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
648
+ return struct;
649
+ }
650
+ if (cdktf.isComplexElement(struct)) {
651
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
652
+ }
653
+ const attrs = {
654
+ autoscaling_type: {
655
+ value: cdktf.stringToHclTerraform(struct.autoscalingType),
656
+ isBlock: false,
657
+ type: "simple",
658
+ storageClassType: "string",
659
+ },
660
+ max_containers: {
661
+ value: cdktf.numberToHclTerraform(struct.maxContainers),
662
+ isBlock: false,
663
+ type: "simple",
664
+ storageClassType: "number",
665
+ },
666
+ max_cpu_threshold: {
667
+ value: cdktf.numberToHclTerraform(struct.maxCpuThreshold),
668
+ isBlock: false,
669
+ type: "simple",
670
+ storageClassType: "number",
671
+ },
672
+ maximum_memory: {
673
+ value: cdktf.numberToHclTerraform(struct.maximumMemory),
674
+ isBlock: false,
675
+ type: "simple",
676
+ storageClassType: "number",
677
+ },
678
+ mem_cpu_ratio_c_threshold: {
679
+ value: cdktf.numberToHclTerraform(struct.memCpuRatioCThreshold),
680
+ isBlock: false,
681
+ type: "simple",
682
+ storageClassType: "number",
683
+ },
684
+ mem_cpu_ratio_r_threshold: {
685
+ value: cdktf.numberToHclTerraform(struct.memCpuRatioRThreshold),
686
+ isBlock: false,
687
+ type: "simple",
688
+ storageClassType: "number",
689
+ },
690
+ mem_scale_down_threshold: {
691
+ value: cdktf.numberToHclTerraform(struct.memScaleDownThreshold),
692
+ isBlock: false,
693
+ type: "simple",
694
+ storageClassType: "number",
695
+ },
696
+ mem_scale_up_threshold: {
697
+ value: cdktf.numberToHclTerraform(struct.memScaleUpThreshold),
698
+ isBlock: false,
699
+ type: "simple",
700
+ storageClassType: "number",
701
+ },
702
+ metric_lookback_seconds: {
703
+ value: cdktf.numberToHclTerraform(struct.metricLookbackSeconds),
704
+ isBlock: false,
705
+ type: "simple",
706
+ storageClassType: "number",
707
+ },
708
+ min_containers: {
709
+ value: cdktf.numberToHclTerraform(struct.minContainers),
710
+ isBlock: false,
711
+ type: "simple",
712
+ storageClassType: "number",
713
+ },
714
+ min_cpu_threshold: {
715
+ value: cdktf.numberToHclTerraform(struct.minCpuThreshold),
716
+ isBlock: false,
717
+ type: "simple",
718
+ storageClassType: "number",
719
+ },
720
+ minimum_memory: {
721
+ value: cdktf.numberToHclTerraform(struct.minimumMemory),
722
+ isBlock: false,
723
+ type: "simple",
724
+ storageClassType: "number",
725
+ },
726
+ percentile: {
727
+ value: cdktf.numberToHclTerraform(struct.percentile),
728
+ isBlock: false,
729
+ type: "simple",
730
+ storageClassType: "number",
731
+ },
732
+ post_release_cooldown_seconds: {
733
+ value: cdktf.numberToHclTerraform(struct.postReleaseCooldownSeconds),
734
+ isBlock: false,
735
+ type: "simple",
736
+ storageClassType: "number",
737
+ },
738
+ post_scale_down_cooldown_seconds: {
739
+ value: cdktf.numberToHclTerraform(struct.postScaleDownCooldownSeconds),
740
+ isBlock: false,
741
+ type: "simple",
742
+ storageClassType: "number",
743
+ },
744
+ post_scale_up_cooldown_seconds: {
745
+ value: cdktf.numberToHclTerraform(struct.postScaleUpCooldownSeconds),
746
+ isBlock: false,
747
+ type: "simple",
748
+ storageClassType: "number",
749
+ },
750
+ scale_down_step: {
751
+ value: cdktf.numberToHclTerraform(struct.scaleDownStep),
752
+ isBlock: false,
753
+ type: "simple",
754
+ storageClassType: "number",
755
+ },
756
+ scale_up_step: {
757
+ value: cdktf.numberToHclTerraform(struct.scaleUpStep),
758
+ isBlock: false,
759
+ type: "simple",
760
+ storageClassType: "number",
761
+ },
762
+ use_horizontal_scale: {
763
+ value: cdktf.booleanToHclTerraform(struct.useHorizontalScale),
764
+ isBlock: false,
765
+ type: "simple",
766
+ storageClassType: "boolean",
767
+ },
768
+ };
769
+ // remove undefined attributes
770
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
771
+ }
772
+ export class AppServiceServiceSizingPolicyOutputReference extends cdktf.ComplexObject {
773
+ isEmptyObject = false;
774
+ resolvableValue;
775
+ /**
776
+ * @param terraformResource The parent resource
777
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
778
+ * @param complexObjectIndex the index of this item in the list
779
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
780
+ */
781
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
782
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
783
+ }
784
+ get internalValue() {
785
+ if (this.resolvableValue) {
786
+ return this.resolvableValue;
787
+ }
788
+ let hasAnyValues = this.isEmptyObject;
789
+ const internalValueResult = {};
790
+ if (this._autoscalingType !== undefined) {
791
+ hasAnyValues = true;
792
+ internalValueResult.autoscalingType = this._autoscalingType;
793
+ }
794
+ if (this._maxContainers !== undefined) {
795
+ hasAnyValues = true;
796
+ internalValueResult.maxContainers = this._maxContainers;
797
+ }
798
+ if (this._maxCpuThreshold !== undefined) {
799
+ hasAnyValues = true;
800
+ internalValueResult.maxCpuThreshold = this._maxCpuThreshold;
801
+ }
802
+ if (this._maximumMemory !== undefined) {
803
+ hasAnyValues = true;
804
+ internalValueResult.maximumMemory = this._maximumMemory;
805
+ }
806
+ if (this._memCpuRatioCThreshold !== undefined) {
807
+ hasAnyValues = true;
808
+ internalValueResult.memCpuRatioCThreshold = this._memCpuRatioCThreshold;
809
+ }
810
+ if (this._memCpuRatioRThreshold !== undefined) {
811
+ hasAnyValues = true;
812
+ internalValueResult.memCpuRatioRThreshold = this._memCpuRatioRThreshold;
813
+ }
814
+ if (this._memScaleDownThreshold !== undefined) {
815
+ hasAnyValues = true;
816
+ internalValueResult.memScaleDownThreshold = this._memScaleDownThreshold;
817
+ }
818
+ if (this._memScaleUpThreshold !== undefined) {
819
+ hasAnyValues = true;
820
+ internalValueResult.memScaleUpThreshold = this._memScaleUpThreshold;
821
+ }
822
+ if (this._metricLookbackSeconds !== undefined) {
823
+ hasAnyValues = true;
824
+ internalValueResult.metricLookbackSeconds = this._metricLookbackSeconds;
825
+ }
826
+ if (this._minContainers !== undefined) {
827
+ hasAnyValues = true;
828
+ internalValueResult.minContainers = this._minContainers;
829
+ }
830
+ if (this._minCpuThreshold !== undefined) {
831
+ hasAnyValues = true;
832
+ internalValueResult.minCpuThreshold = this._minCpuThreshold;
833
+ }
834
+ if (this._minimumMemory !== undefined) {
835
+ hasAnyValues = true;
836
+ internalValueResult.minimumMemory = this._minimumMemory;
837
+ }
838
+ if (this._percentile !== undefined) {
839
+ hasAnyValues = true;
840
+ internalValueResult.percentile = this._percentile;
841
+ }
842
+ if (this._postReleaseCooldownSeconds !== undefined) {
843
+ hasAnyValues = true;
844
+ internalValueResult.postReleaseCooldownSeconds = this._postReleaseCooldownSeconds;
845
+ }
846
+ if (this._postScaleDownCooldownSeconds !== undefined) {
847
+ hasAnyValues = true;
848
+ internalValueResult.postScaleDownCooldownSeconds = this._postScaleDownCooldownSeconds;
849
+ }
850
+ if (this._postScaleUpCooldownSeconds !== undefined) {
851
+ hasAnyValues = true;
852
+ internalValueResult.postScaleUpCooldownSeconds = this._postScaleUpCooldownSeconds;
853
+ }
854
+ if (this._scaleDownStep !== undefined) {
855
+ hasAnyValues = true;
856
+ internalValueResult.scaleDownStep = this._scaleDownStep;
857
+ }
858
+ if (this._scaleUpStep !== undefined) {
859
+ hasAnyValues = true;
860
+ internalValueResult.scaleUpStep = this._scaleUpStep;
861
+ }
862
+ if (this._useHorizontalScale !== undefined) {
863
+ hasAnyValues = true;
864
+ internalValueResult.useHorizontalScale = this._useHorizontalScale;
865
+ }
866
+ return hasAnyValues ? internalValueResult : undefined;
867
+ }
868
+ set internalValue(value) {
869
+ if (value === undefined) {
870
+ this.isEmptyObject = false;
871
+ this.resolvableValue = undefined;
872
+ this._autoscalingType = undefined;
873
+ this._maxContainers = undefined;
874
+ this._maxCpuThreshold = undefined;
875
+ this._maximumMemory = undefined;
876
+ this._memCpuRatioCThreshold = undefined;
877
+ this._memCpuRatioRThreshold = undefined;
878
+ this._memScaleDownThreshold = undefined;
879
+ this._memScaleUpThreshold = undefined;
880
+ this._metricLookbackSeconds = undefined;
881
+ this._minContainers = undefined;
882
+ this._minCpuThreshold = undefined;
883
+ this._minimumMemory = undefined;
884
+ this._percentile = undefined;
885
+ this._postReleaseCooldownSeconds = undefined;
886
+ this._postScaleDownCooldownSeconds = undefined;
887
+ this._postScaleUpCooldownSeconds = undefined;
888
+ this._scaleDownStep = undefined;
889
+ this._scaleUpStep = undefined;
890
+ this._useHorizontalScale = undefined;
891
+ }
892
+ else if (cdktf.Tokenization.isResolvable(value)) {
893
+ this.isEmptyObject = false;
894
+ this.resolvableValue = value;
895
+ }
896
+ else {
897
+ this.isEmptyObject = Object.keys(value).length === 0;
898
+ this.resolvableValue = undefined;
899
+ this._autoscalingType = value.autoscalingType;
900
+ this._maxContainers = value.maxContainers;
901
+ this._maxCpuThreshold = value.maxCpuThreshold;
902
+ this._maximumMemory = value.maximumMemory;
903
+ this._memCpuRatioCThreshold = value.memCpuRatioCThreshold;
904
+ this._memCpuRatioRThreshold = value.memCpuRatioRThreshold;
905
+ this._memScaleDownThreshold = value.memScaleDownThreshold;
906
+ this._memScaleUpThreshold = value.memScaleUpThreshold;
907
+ this._metricLookbackSeconds = value.metricLookbackSeconds;
908
+ this._minContainers = value.minContainers;
909
+ this._minCpuThreshold = value.minCpuThreshold;
910
+ this._minimumMemory = value.minimumMemory;
911
+ this._percentile = value.percentile;
912
+ this._postReleaseCooldownSeconds = value.postReleaseCooldownSeconds;
913
+ this._postScaleDownCooldownSeconds = value.postScaleDownCooldownSeconds;
914
+ this._postScaleUpCooldownSeconds = value.postScaleUpCooldownSeconds;
915
+ this._scaleDownStep = value.scaleDownStep;
916
+ this._scaleUpStep = value.scaleUpStep;
917
+ this._useHorizontalScale = value.useHorizontalScale;
918
+ }
919
+ }
920
+ // autoscaling_type - computed: false, optional: false, required: true
921
+ _autoscalingType;
922
+ get autoscalingType() {
923
+ return this.getStringAttribute('autoscaling_type');
924
+ }
925
+ set autoscalingType(value) {
926
+ this._autoscalingType = value;
927
+ }
928
+ // Temporarily expose input value. Use with caution.
929
+ get autoscalingTypeInput() {
930
+ return this._autoscalingType;
931
+ }
932
+ // max_containers - computed: false, optional: true, required: false
933
+ _maxContainers;
934
+ get maxContainers() {
935
+ return this.getNumberAttribute('max_containers');
936
+ }
937
+ set maxContainers(value) {
938
+ this._maxContainers = value;
939
+ }
940
+ resetMaxContainers() {
941
+ this._maxContainers = undefined;
942
+ }
943
+ // Temporarily expose input value. Use with caution.
944
+ get maxContainersInput() {
945
+ return this._maxContainers;
946
+ }
947
+ // max_cpu_threshold - computed: false, optional: true, required: false
948
+ _maxCpuThreshold;
949
+ get maxCpuThreshold() {
950
+ return this.getNumberAttribute('max_cpu_threshold');
951
+ }
952
+ set maxCpuThreshold(value) {
953
+ this._maxCpuThreshold = value;
954
+ }
955
+ resetMaxCpuThreshold() {
956
+ this._maxCpuThreshold = undefined;
957
+ }
958
+ // Temporarily expose input value. Use with caution.
959
+ get maxCpuThresholdInput() {
960
+ return this._maxCpuThreshold;
961
+ }
962
+ // maximum_memory - computed: false, optional: true, required: false
963
+ _maximumMemory;
964
+ get maximumMemory() {
965
+ return this.getNumberAttribute('maximum_memory');
966
+ }
967
+ set maximumMemory(value) {
968
+ this._maximumMemory = value;
969
+ }
970
+ resetMaximumMemory() {
971
+ this._maximumMemory = undefined;
972
+ }
973
+ // Temporarily expose input value. Use with caution.
974
+ get maximumMemoryInput() {
975
+ return this._maximumMemory;
976
+ }
977
+ // mem_cpu_ratio_c_threshold - computed: false, optional: true, required: false
978
+ _memCpuRatioCThreshold;
979
+ get memCpuRatioCThreshold() {
980
+ return this.getNumberAttribute('mem_cpu_ratio_c_threshold');
981
+ }
982
+ set memCpuRatioCThreshold(value) {
983
+ this._memCpuRatioCThreshold = value;
984
+ }
985
+ resetMemCpuRatioCThreshold() {
986
+ this._memCpuRatioCThreshold = undefined;
987
+ }
988
+ // Temporarily expose input value. Use with caution.
989
+ get memCpuRatioCThresholdInput() {
990
+ return this._memCpuRatioCThreshold;
991
+ }
992
+ // mem_cpu_ratio_r_threshold - computed: false, optional: true, required: false
993
+ _memCpuRatioRThreshold;
994
+ get memCpuRatioRThreshold() {
995
+ return this.getNumberAttribute('mem_cpu_ratio_r_threshold');
996
+ }
997
+ set memCpuRatioRThreshold(value) {
998
+ this._memCpuRatioRThreshold = value;
999
+ }
1000
+ resetMemCpuRatioRThreshold() {
1001
+ this._memCpuRatioRThreshold = undefined;
1002
+ }
1003
+ // Temporarily expose input value. Use with caution.
1004
+ get memCpuRatioRThresholdInput() {
1005
+ return this._memCpuRatioRThreshold;
1006
+ }
1007
+ // mem_scale_down_threshold - computed: false, optional: true, required: false
1008
+ _memScaleDownThreshold;
1009
+ get memScaleDownThreshold() {
1010
+ return this.getNumberAttribute('mem_scale_down_threshold');
1011
+ }
1012
+ set memScaleDownThreshold(value) {
1013
+ this._memScaleDownThreshold = value;
1014
+ }
1015
+ resetMemScaleDownThreshold() {
1016
+ this._memScaleDownThreshold = undefined;
1017
+ }
1018
+ // Temporarily expose input value. Use with caution.
1019
+ get memScaleDownThresholdInput() {
1020
+ return this._memScaleDownThreshold;
1021
+ }
1022
+ // mem_scale_up_threshold - computed: false, optional: true, required: false
1023
+ _memScaleUpThreshold;
1024
+ get memScaleUpThreshold() {
1025
+ return this.getNumberAttribute('mem_scale_up_threshold');
1026
+ }
1027
+ set memScaleUpThreshold(value) {
1028
+ this._memScaleUpThreshold = value;
1029
+ }
1030
+ resetMemScaleUpThreshold() {
1031
+ this._memScaleUpThreshold = undefined;
1032
+ }
1033
+ // Temporarily expose input value. Use with caution.
1034
+ get memScaleUpThresholdInput() {
1035
+ return this._memScaleUpThreshold;
1036
+ }
1037
+ // metric_lookback_seconds - computed: false, optional: true, required: false
1038
+ _metricLookbackSeconds;
1039
+ get metricLookbackSeconds() {
1040
+ return this.getNumberAttribute('metric_lookback_seconds');
1041
+ }
1042
+ set metricLookbackSeconds(value) {
1043
+ this._metricLookbackSeconds = value;
1044
+ }
1045
+ resetMetricLookbackSeconds() {
1046
+ this._metricLookbackSeconds = undefined;
1047
+ }
1048
+ // Temporarily expose input value. Use with caution.
1049
+ get metricLookbackSecondsInput() {
1050
+ return this._metricLookbackSeconds;
1051
+ }
1052
+ // min_containers - computed: false, optional: true, required: false
1053
+ _minContainers;
1054
+ get minContainers() {
1055
+ return this.getNumberAttribute('min_containers');
1056
+ }
1057
+ set minContainers(value) {
1058
+ this._minContainers = value;
1059
+ }
1060
+ resetMinContainers() {
1061
+ this._minContainers = undefined;
1062
+ }
1063
+ // Temporarily expose input value. Use with caution.
1064
+ get minContainersInput() {
1065
+ return this._minContainers;
1066
+ }
1067
+ // min_cpu_threshold - computed: false, optional: true, required: false
1068
+ _minCpuThreshold;
1069
+ get minCpuThreshold() {
1070
+ return this.getNumberAttribute('min_cpu_threshold');
1071
+ }
1072
+ set minCpuThreshold(value) {
1073
+ this._minCpuThreshold = value;
1074
+ }
1075
+ resetMinCpuThreshold() {
1076
+ this._minCpuThreshold = undefined;
1077
+ }
1078
+ // Temporarily expose input value. Use with caution.
1079
+ get minCpuThresholdInput() {
1080
+ return this._minCpuThreshold;
1081
+ }
1082
+ // minimum_memory - computed: false, optional: true, required: false
1083
+ _minimumMemory;
1084
+ get minimumMemory() {
1085
+ return this.getNumberAttribute('minimum_memory');
1086
+ }
1087
+ set minimumMemory(value) {
1088
+ this._minimumMemory = value;
1089
+ }
1090
+ resetMinimumMemory() {
1091
+ this._minimumMemory = undefined;
1092
+ }
1093
+ // Temporarily expose input value. Use with caution.
1094
+ get minimumMemoryInput() {
1095
+ return this._minimumMemory;
1096
+ }
1097
+ // percentile - computed: false, optional: true, required: false
1098
+ _percentile;
1099
+ get percentile() {
1100
+ return this.getNumberAttribute('percentile');
1101
+ }
1102
+ set percentile(value) {
1103
+ this._percentile = value;
1104
+ }
1105
+ resetPercentile() {
1106
+ this._percentile = undefined;
1107
+ }
1108
+ // Temporarily expose input value. Use with caution.
1109
+ get percentileInput() {
1110
+ return this._percentile;
1111
+ }
1112
+ // post_release_cooldown_seconds - computed: false, optional: true, required: false
1113
+ _postReleaseCooldownSeconds;
1114
+ get postReleaseCooldownSeconds() {
1115
+ return this.getNumberAttribute('post_release_cooldown_seconds');
1116
+ }
1117
+ set postReleaseCooldownSeconds(value) {
1118
+ this._postReleaseCooldownSeconds = value;
1119
+ }
1120
+ resetPostReleaseCooldownSeconds() {
1121
+ this._postReleaseCooldownSeconds = undefined;
1122
+ }
1123
+ // Temporarily expose input value. Use with caution.
1124
+ get postReleaseCooldownSecondsInput() {
1125
+ return this._postReleaseCooldownSeconds;
1126
+ }
1127
+ // post_scale_down_cooldown_seconds - computed: false, optional: true, required: false
1128
+ _postScaleDownCooldownSeconds;
1129
+ get postScaleDownCooldownSeconds() {
1130
+ return this.getNumberAttribute('post_scale_down_cooldown_seconds');
1131
+ }
1132
+ set postScaleDownCooldownSeconds(value) {
1133
+ this._postScaleDownCooldownSeconds = value;
1134
+ }
1135
+ resetPostScaleDownCooldownSeconds() {
1136
+ this._postScaleDownCooldownSeconds = undefined;
1137
+ }
1138
+ // Temporarily expose input value. Use with caution.
1139
+ get postScaleDownCooldownSecondsInput() {
1140
+ return this._postScaleDownCooldownSeconds;
1141
+ }
1142
+ // post_scale_up_cooldown_seconds - computed: false, optional: true, required: false
1143
+ _postScaleUpCooldownSeconds;
1144
+ get postScaleUpCooldownSeconds() {
1145
+ return this.getNumberAttribute('post_scale_up_cooldown_seconds');
1146
+ }
1147
+ set postScaleUpCooldownSeconds(value) {
1148
+ this._postScaleUpCooldownSeconds = value;
1149
+ }
1150
+ resetPostScaleUpCooldownSeconds() {
1151
+ this._postScaleUpCooldownSeconds = undefined;
1152
+ }
1153
+ // Temporarily expose input value. Use with caution.
1154
+ get postScaleUpCooldownSecondsInput() {
1155
+ return this._postScaleUpCooldownSeconds;
1156
+ }
1157
+ // scale_down_step - computed: false, optional: true, required: false
1158
+ _scaleDownStep;
1159
+ get scaleDownStep() {
1160
+ return this.getNumberAttribute('scale_down_step');
1161
+ }
1162
+ set scaleDownStep(value) {
1163
+ this._scaleDownStep = value;
1164
+ }
1165
+ resetScaleDownStep() {
1166
+ this._scaleDownStep = undefined;
1167
+ }
1168
+ // Temporarily expose input value. Use with caution.
1169
+ get scaleDownStepInput() {
1170
+ return this._scaleDownStep;
1171
+ }
1172
+ // scale_up_step - computed: false, optional: true, required: false
1173
+ _scaleUpStep;
1174
+ get scaleUpStep() {
1175
+ return this.getNumberAttribute('scale_up_step');
1176
+ }
1177
+ set scaleUpStep(value) {
1178
+ this._scaleUpStep = value;
1179
+ }
1180
+ resetScaleUpStep() {
1181
+ this._scaleUpStep = undefined;
1182
+ }
1183
+ // Temporarily expose input value. Use with caution.
1184
+ get scaleUpStepInput() {
1185
+ return this._scaleUpStep;
1186
+ }
1187
+ // scaling_enabled - computed: true, optional: false, required: false
1188
+ get scalingEnabled() {
1189
+ return this.getBooleanAttribute('scaling_enabled');
1190
+ }
1191
+ // use_horizontal_scale - computed: false, optional: true, required: false
1192
+ _useHorizontalScale;
1193
+ get useHorizontalScale() {
1194
+ return this.getBooleanAttribute('use_horizontal_scale');
1195
+ }
1196
+ set useHorizontalScale(value) {
1197
+ this._useHorizontalScale = value;
1198
+ }
1199
+ resetUseHorizontalScale() {
1200
+ this._useHorizontalScale = undefined;
1201
+ }
1202
+ // Temporarily expose input value. Use with caution.
1203
+ get useHorizontalScaleInput() {
1204
+ return this._useHorizontalScale;
1205
+ }
1206
+ }
1207
+ export class AppServiceServiceSizingPolicyList extends cdktf.ComplexList {
1208
+ terraformResource;
1209
+ terraformAttribute;
1210
+ wrapsSet;
1211
+ internalValue;
1212
+ /**
1213
+ * @param terraformResource The parent resource
1214
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
1215
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
1216
+ */
1217
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
1218
+ super(terraformResource, terraformAttribute, wrapsSet);
1219
+ this.terraformResource = terraformResource;
1220
+ this.terraformAttribute = terraformAttribute;
1221
+ this.wrapsSet = wrapsSet;
1222
+ }
1223
+ /**
1224
+ * @param index the index of the item to return
1225
+ */
1226
+ get(index) {
1227
+ return new AppServiceServiceSizingPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
1228
+ }
1229
+ }
1230
+ export function appServiceToTerraform(struct) {
1231
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1232
+ return struct;
1233
+ }
1234
+ if (cdktf.isComplexElement(struct)) {
1235
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1236
+ }
1237
+ return {
1238
+ container_count: cdktf.numberToTerraform(struct.containerCount),
1239
+ container_memory_limit: cdktf.numberToTerraform(struct.containerMemoryLimit),
1240
+ container_profile: cdktf.stringToTerraform(struct.containerProfile),
1241
+ force_zero_downtime: cdktf.booleanToTerraform(struct.forceZeroDowntime),
1242
+ process_type: cdktf.stringToTerraform(struct.processType),
1243
+ simple_health_check: cdktf.booleanToTerraform(struct.simpleHealthCheck),
1244
+ stop_timeout: cdktf.numberToTerraform(struct.stopTimeout),
1245
+ autoscaling_policy: cdktf.listMapper(appServiceAutoscalingPolicyToTerraform, true)(struct.autoscalingPolicy),
1246
+ service_sizing_policy: cdktf.listMapper(appServiceServiceSizingPolicyToTerraform, true)(struct.serviceSizingPolicy),
1247
+ };
1248
+ }
1249
+ export function appServiceToHclTerraform(struct) {
1250
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
1251
+ return struct;
1252
+ }
1253
+ if (cdktf.isComplexElement(struct)) {
1254
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
1255
+ }
1256
+ const attrs = {
1257
+ container_count: {
1258
+ value: cdktf.numberToHclTerraform(struct.containerCount),
1259
+ isBlock: false,
1260
+ type: "simple",
1261
+ storageClassType: "number",
1262
+ },
1263
+ container_memory_limit: {
1264
+ value: cdktf.numberToHclTerraform(struct.containerMemoryLimit),
1265
+ isBlock: false,
1266
+ type: "simple",
1267
+ storageClassType: "number",
1268
+ },
1269
+ container_profile: {
1270
+ value: cdktf.stringToHclTerraform(struct.containerProfile),
1271
+ isBlock: false,
1272
+ type: "simple",
1273
+ storageClassType: "string",
1274
+ },
1275
+ force_zero_downtime: {
1276
+ value: cdktf.booleanToHclTerraform(struct.forceZeroDowntime),
1277
+ isBlock: false,
1278
+ type: "simple",
1279
+ storageClassType: "boolean",
1280
+ },
1281
+ process_type: {
1282
+ value: cdktf.stringToHclTerraform(struct.processType),
1283
+ isBlock: false,
1284
+ type: "simple",
1285
+ storageClassType: "string",
1286
+ },
1287
+ simple_health_check: {
1288
+ value: cdktf.booleanToHclTerraform(struct.simpleHealthCheck),
1289
+ isBlock: false,
1290
+ type: "simple",
1291
+ storageClassType: "boolean",
1292
+ },
1293
+ stop_timeout: {
1294
+ value: cdktf.numberToHclTerraform(struct.stopTimeout),
1295
+ isBlock: false,
1296
+ type: "simple",
1297
+ storageClassType: "number",
1298
+ },
1299
+ autoscaling_policy: {
1300
+ value: cdktf.listMapperHcl(appServiceAutoscalingPolicyToHclTerraform, true)(struct.autoscalingPolicy),
1301
+ isBlock: true,
1302
+ type: "set",
1303
+ storageClassType: "AppServiceAutoscalingPolicyList",
1304
+ },
1305
+ service_sizing_policy: {
1306
+ value: cdktf.listMapperHcl(appServiceServiceSizingPolicyToHclTerraform, true)(struct.serviceSizingPolicy),
1307
+ isBlock: true,
1308
+ type: "set",
1309
+ storageClassType: "AppServiceServiceSizingPolicyList",
1310
+ },
1311
+ };
1312
+ // remove undefined attributes
1313
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
1314
+ }
1315
+ export class AppServiceOutputReference extends cdktf.ComplexObject {
1316
+ isEmptyObject = false;
1317
+ resolvableValue;
1318
+ /**
1319
+ * @param terraformResource The parent resource
1320
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
1321
+ * @param complexObjectIndex the index of this item in the list
1322
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
1323
+ */
1324
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
1325
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
1326
+ }
1327
+ get internalValue() {
1328
+ if (this.resolvableValue) {
1329
+ return this.resolvableValue;
1330
+ }
1331
+ let hasAnyValues = this.isEmptyObject;
1332
+ const internalValueResult = {};
1333
+ if (this._containerCount !== undefined) {
1334
+ hasAnyValues = true;
1335
+ internalValueResult.containerCount = this._containerCount;
1336
+ }
1337
+ if (this._containerMemoryLimit !== undefined) {
1338
+ hasAnyValues = true;
1339
+ internalValueResult.containerMemoryLimit = this._containerMemoryLimit;
1340
+ }
1341
+ if (this._containerProfile !== undefined) {
1342
+ hasAnyValues = true;
1343
+ internalValueResult.containerProfile = this._containerProfile;
1344
+ }
1345
+ if (this._forceZeroDowntime !== undefined) {
1346
+ hasAnyValues = true;
1347
+ internalValueResult.forceZeroDowntime = this._forceZeroDowntime;
1348
+ }
1349
+ if (this._processType !== undefined) {
1350
+ hasAnyValues = true;
1351
+ internalValueResult.processType = this._processType;
1352
+ }
1353
+ if (this._simpleHealthCheck !== undefined) {
1354
+ hasAnyValues = true;
1355
+ internalValueResult.simpleHealthCheck = this._simpleHealthCheck;
1356
+ }
1357
+ if (this._stopTimeout !== undefined) {
1358
+ hasAnyValues = true;
1359
+ internalValueResult.stopTimeout = this._stopTimeout;
1360
+ }
1361
+ if (this._autoscalingPolicy?.internalValue !== undefined) {
1362
+ hasAnyValues = true;
1363
+ internalValueResult.autoscalingPolicy = this._autoscalingPolicy?.internalValue;
1364
+ }
1365
+ if (this._serviceSizingPolicy?.internalValue !== undefined) {
1366
+ hasAnyValues = true;
1367
+ internalValueResult.serviceSizingPolicy = this._serviceSizingPolicy?.internalValue;
1368
+ }
1369
+ return hasAnyValues ? internalValueResult : undefined;
1370
+ }
1371
+ set internalValue(value) {
1372
+ if (value === undefined) {
1373
+ this.isEmptyObject = false;
1374
+ this.resolvableValue = undefined;
1375
+ this._containerCount = undefined;
1376
+ this._containerMemoryLimit = undefined;
1377
+ this._containerProfile = undefined;
1378
+ this._forceZeroDowntime = undefined;
1379
+ this._processType = undefined;
1380
+ this._simpleHealthCheck = undefined;
1381
+ this._stopTimeout = undefined;
1382
+ this._autoscalingPolicy.internalValue = undefined;
1383
+ this._serviceSizingPolicy.internalValue = undefined;
1384
+ }
1385
+ else if (cdktf.Tokenization.isResolvable(value)) {
1386
+ this.isEmptyObject = false;
1387
+ this.resolvableValue = value;
1388
+ }
1389
+ else {
1390
+ this.isEmptyObject = Object.keys(value).length === 0;
1391
+ this.resolvableValue = undefined;
1392
+ this._containerCount = value.containerCount;
1393
+ this._containerMemoryLimit = value.containerMemoryLimit;
1394
+ this._containerProfile = value.containerProfile;
1395
+ this._forceZeroDowntime = value.forceZeroDowntime;
1396
+ this._processType = value.processType;
1397
+ this._simpleHealthCheck = value.simpleHealthCheck;
1398
+ this._stopTimeout = value.stopTimeout;
1399
+ this._autoscalingPolicy.internalValue = value.autoscalingPolicy;
1400
+ this._serviceSizingPolicy.internalValue = value.serviceSizingPolicy;
1401
+ }
1402
+ }
1403
+ // container_count - computed: false, optional: true, required: false
1404
+ _containerCount;
1405
+ get containerCount() {
1406
+ return this.getNumberAttribute('container_count');
1407
+ }
1408
+ set containerCount(value) {
1409
+ this._containerCount = value;
1410
+ }
1411
+ resetContainerCount() {
1412
+ this._containerCount = undefined;
1413
+ }
1414
+ // Temporarily expose input value. Use with caution.
1415
+ get containerCountInput() {
1416
+ return this._containerCount;
1417
+ }
1418
+ // container_memory_limit - computed: false, optional: true, required: false
1419
+ _containerMemoryLimit;
1420
+ get containerMemoryLimit() {
1421
+ return this.getNumberAttribute('container_memory_limit');
1422
+ }
1423
+ set containerMemoryLimit(value) {
1424
+ this._containerMemoryLimit = value;
1425
+ }
1426
+ resetContainerMemoryLimit() {
1427
+ this._containerMemoryLimit = undefined;
1428
+ }
1429
+ // Temporarily expose input value. Use with caution.
1430
+ get containerMemoryLimitInput() {
1431
+ return this._containerMemoryLimit;
1432
+ }
1433
+ // container_profile - computed: false, optional: true, required: false
1434
+ _containerProfile;
1435
+ get containerProfile() {
1436
+ return this.getStringAttribute('container_profile');
1437
+ }
1438
+ set containerProfile(value) {
1439
+ this._containerProfile = value;
1440
+ }
1441
+ resetContainerProfile() {
1442
+ this._containerProfile = undefined;
1443
+ }
1444
+ // Temporarily expose input value. Use with caution.
1445
+ get containerProfileInput() {
1446
+ return this._containerProfile;
1447
+ }
1448
+ // force_zero_downtime - computed: false, optional: true, required: false
1449
+ _forceZeroDowntime;
1450
+ get forceZeroDowntime() {
1451
+ return this.getBooleanAttribute('force_zero_downtime');
1452
+ }
1453
+ set forceZeroDowntime(value) {
1454
+ this._forceZeroDowntime = value;
1455
+ }
1456
+ resetForceZeroDowntime() {
1457
+ this._forceZeroDowntime = undefined;
1458
+ }
1459
+ // Temporarily expose input value. Use with caution.
1460
+ get forceZeroDowntimeInput() {
1461
+ return this._forceZeroDowntime;
1462
+ }
1463
+ // process_type - computed: false, optional: true, required: false
1464
+ _processType;
1465
+ get processType() {
1466
+ return this.getStringAttribute('process_type');
1467
+ }
1468
+ set processType(value) {
1469
+ this._processType = value;
1470
+ }
1471
+ resetProcessType() {
1472
+ this._processType = undefined;
1473
+ }
1474
+ // Temporarily expose input value. Use with caution.
1475
+ get processTypeInput() {
1476
+ return this._processType;
1477
+ }
1478
+ // simple_health_check - computed: false, optional: true, required: false
1479
+ _simpleHealthCheck;
1480
+ get simpleHealthCheck() {
1481
+ return this.getBooleanAttribute('simple_health_check');
1482
+ }
1483
+ set simpleHealthCheck(value) {
1484
+ this._simpleHealthCheck = value;
1485
+ }
1486
+ resetSimpleHealthCheck() {
1487
+ this._simpleHealthCheck = undefined;
1488
+ }
1489
+ // Temporarily expose input value. Use with caution.
1490
+ get simpleHealthCheckInput() {
1491
+ return this._simpleHealthCheck;
1492
+ }
1493
+ // stop_timeout - computed: false, optional: true, required: false
1494
+ _stopTimeout;
1495
+ get stopTimeout() {
1496
+ return this.getNumberAttribute('stop_timeout');
1497
+ }
1498
+ set stopTimeout(value) {
1499
+ this._stopTimeout = value;
1500
+ }
1501
+ resetStopTimeout() {
1502
+ this._stopTimeout = undefined;
1503
+ }
1504
+ // Temporarily expose input value. Use with caution.
1505
+ get stopTimeoutInput() {
1506
+ return this._stopTimeout;
1507
+ }
1508
+ // autoscaling_policy - computed: false, optional: true, required: false
1509
+ _autoscalingPolicy = new AppServiceAutoscalingPolicyList(this, "autoscaling_policy", true);
1510
+ get autoscalingPolicy() {
1511
+ return this._autoscalingPolicy;
1512
+ }
1513
+ putAutoscalingPolicy(value) {
1514
+ this._autoscalingPolicy.internalValue = value;
1515
+ }
1516
+ resetAutoscalingPolicy() {
1517
+ this._autoscalingPolicy.internalValue = undefined;
1518
+ }
1519
+ // Temporarily expose input value. Use with caution.
1520
+ get autoscalingPolicyInput() {
1521
+ return this._autoscalingPolicy.internalValue;
1522
+ }
1523
+ // service_sizing_policy - computed: false, optional: true, required: false
1524
+ _serviceSizingPolicy = new AppServiceServiceSizingPolicyList(this, "service_sizing_policy", true);
1525
+ get serviceSizingPolicy() {
1526
+ return this._serviceSizingPolicy;
1527
+ }
1528
+ putServiceSizingPolicy(value) {
1529
+ this._serviceSizingPolicy.internalValue = value;
1530
+ }
1531
+ resetServiceSizingPolicy() {
1532
+ this._serviceSizingPolicy.internalValue = undefined;
1533
+ }
1534
+ // Temporarily expose input value. Use with caution.
1535
+ get serviceSizingPolicyInput() {
1536
+ return this._serviceSizingPolicy.internalValue;
1537
+ }
1538
+ }
1539
+ export class AppServiceList extends cdktf.ComplexList {
1540
+ terraformResource;
1541
+ terraformAttribute;
1542
+ wrapsSet;
1543
+ internalValue;
1544
+ /**
1545
+ * @param terraformResource The parent resource
1546
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
1547
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
1548
+ */
1549
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
1550
+ super(terraformResource, terraformAttribute, wrapsSet);
1551
+ this.terraformResource = terraformResource;
1552
+ this.terraformAttribute = terraformAttribute;
1553
+ this.wrapsSet = wrapsSet;
1554
+ }
1555
+ /**
1556
+ * @param index the index of the item to return
1557
+ */
1558
+ get(index) {
1559
+ return new AppServiceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
1560
+ }
1561
+ }
1562
+ /**
1563
+ * Represents a {@link https://registry.terraform.io/providers/aptible/aptible/0.9.18/docs/resources/app aptible_app}
1564
+ */
1565
+ export class App extends cdktf.TerraformResource {
1566
+ // =================
1567
+ // STATIC PROPERTIES
1568
+ // =================
1569
+ static tfResourceType = "aptible_app";
1570
+ // ==============
1571
+ // STATIC Methods
1572
+ // ==============
1573
+ /**
1574
+ * Generates CDKTF code for importing a App resource upon running "cdktf plan <stack-name>"
1575
+ * @param scope The scope in which to define this construct
1576
+ * @param importToId The construct id used in the generated config for the App to import
1577
+ * @param importFromId The id of the existing App that should be imported. Refer to the {@link https://registry.terraform.io/providers/aptible/aptible/0.9.18/docs/resources/app#import import section} in the documentation of this resource for the id to use
1578
+ * @param provider? Optional instance of the provider where the App to import is found
1579
+ */
1580
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
1581
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aptible_app", importId: importFromId, provider });
1582
+ }
1583
+ // ===========
1584
+ // INITIALIZER
1585
+ // ===========
1586
+ /**
1587
+ * Create a new {@link https://registry.terraform.io/providers/aptible/aptible/0.9.18/docs/resources/app aptible_app} Resource
1588
+ *
1589
+ * @param scope The scope in which to define this construct
1590
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
1591
+ * @param options AppConfig
1592
+ */
1593
+ constructor(scope, id, config) {
1594
+ super(scope, id, {
1595
+ terraformResourceType: 'aptible_app',
1596
+ terraformGeneratorMetadata: {
1597
+ providerName: 'aptible',
1598
+ providerVersion: '0.9.18',
1599
+ providerVersionConstraint: '0.9.18'
1600
+ },
1601
+ provider: config.provider,
1602
+ dependsOn: config.dependsOn,
1603
+ count: config.count,
1604
+ lifecycle: config.lifecycle,
1605
+ provisioners: config.provisioners,
1606
+ connection: config.connection,
1607
+ forEach: config.forEach
1608
+ });
1609
+ this._config = config.config;
1610
+ this._envId = config.envId;
1611
+ this._handle = config.handle;
1612
+ this._id = config.id;
1613
+ this._service.internalValue = config.service;
1614
+ }
1615
+ // ==========
1616
+ // ATTRIBUTES
1617
+ // ==========
1618
+ // app_id - computed: true, optional: false, required: false
1619
+ get appId() {
1620
+ return this.getNumberAttribute('app_id');
1621
+ }
1622
+ // config - computed: false, optional: true, required: false
1623
+ _config;
1624
+ get config() {
1625
+ return this.getStringMapAttribute('config');
1626
+ }
1627
+ set config(value) {
1628
+ this._config = value;
1629
+ }
1630
+ resetConfig() {
1631
+ this._config = undefined;
1632
+ }
1633
+ // Temporarily expose input value. Use with caution.
1634
+ get configInput() {
1635
+ return this._config;
1636
+ }
1637
+ // env_id - computed: false, optional: false, required: true
1638
+ _envId;
1639
+ get envId() {
1640
+ return this.getNumberAttribute('env_id');
1641
+ }
1642
+ set envId(value) {
1643
+ this._envId = value;
1644
+ }
1645
+ // Temporarily expose input value. Use with caution.
1646
+ get envIdInput() {
1647
+ return this._envId;
1648
+ }
1649
+ // git_repo - computed: true, optional: false, required: false
1650
+ get gitRepo() {
1651
+ return this.getStringAttribute('git_repo');
1652
+ }
1653
+ // handle - computed: false, optional: false, required: true
1654
+ _handle;
1655
+ get handle() {
1656
+ return this.getStringAttribute('handle');
1657
+ }
1658
+ set handle(value) {
1659
+ this._handle = value;
1660
+ }
1661
+ // Temporarily expose input value. Use with caution.
1662
+ get handleInput() {
1663
+ return this._handle;
1664
+ }
1665
+ // id - computed: true, optional: true, required: false
1666
+ _id;
1667
+ get id() {
1668
+ return this.getStringAttribute('id');
1669
+ }
1670
+ set id(value) {
1671
+ this._id = value;
1672
+ }
1673
+ resetId() {
1674
+ this._id = undefined;
1675
+ }
1676
+ // Temporarily expose input value. Use with caution.
1677
+ get idInput() {
1678
+ return this._id;
1679
+ }
1680
+ // service - computed: false, optional: true, required: false
1681
+ _service = new AppServiceList(this, "service", true);
1682
+ get service() {
1683
+ return this._service;
1684
+ }
1685
+ putService(value) {
1686
+ this._service.internalValue = value;
1687
+ }
1688
+ resetService() {
1689
+ this._service.internalValue = undefined;
1690
+ }
1691
+ // Temporarily expose input value. Use with caution.
1692
+ get serviceInput() {
1693
+ return this._service.internalValue;
1694
+ }
1695
+ // =========
1696
+ // SYNTHESIS
1697
+ // =========
1698
+ synthesizeAttributes() {
1699
+ return {
1700
+ config: cdktf.hashMapper(cdktf.stringToTerraform)(this._config),
1701
+ env_id: cdktf.numberToTerraform(this._envId),
1702
+ handle: cdktf.stringToTerraform(this._handle),
1703
+ id: cdktf.stringToTerraform(this._id),
1704
+ service: cdktf.listMapper(appServiceToTerraform, true)(this._service.internalValue),
1705
+ };
1706
+ }
1707
+ synthesizeHclAttributes() {
1708
+ const attrs = {
1709
+ config: {
1710
+ value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._config),
1711
+ isBlock: false,
1712
+ type: "map",
1713
+ storageClassType: "stringMap",
1714
+ },
1715
+ env_id: {
1716
+ value: cdktf.numberToHclTerraform(this._envId),
1717
+ isBlock: false,
1718
+ type: "simple",
1719
+ storageClassType: "number",
1720
+ },
1721
+ handle: {
1722
+ value: cdktf.stringToHclTerraform(this._handle),
1723
+ isBlock: false,
1724
+ type: "simple",
1725
+ storageClassType: "string",
1726
+ },
1727
+ id: {
1728
+ value: cdktf.stringToHclTerraform(this._id),
1729
+ isBlock: false,
1730
+ type: "simple",
1731
+ storageClassType: "string",
1732
+ },
1733
+ service: {
1734
+ value: cdktf.listMapperHcl(appServiceToHclTerraform, true)(this._service.internalValue),
1735
+ isBlock: true,
1736
+ type: "set",
1737
+ storageClassType: "AppServiceList",
1738
+ },
1739
+ };
1740
+ // remove undefined attributes
1741
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
1742
+ }
1743
+ }