terrars-gitlabhq-gitlab 0.1.0

Pre-generated Terrars Gitlab bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
use serde::Serialize;
use std::cell::RefCell;
use std::rc::Rc;
use terrars::*;
use super::provider::ProviderGitlab;

#[derive(Serialize)]
struct DataProjectIssueData {
    #[serde(skip_serializing_if = "Vec::is_empty")]
    depends_on: Vec<String>,
    #[serde(skip_serializing_if = "SerdeSkipDefault::is_default")]
    provider: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    for_each: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    id: Option<PrimField<String>>,
    iid: PrimField<f64>,
    project: PrimField<String>,
}

struct DataProjectIssue_ {
    shared: StackShared,
    tf_id: String,
    data: RefCell<DataProjectIssueData>,
}

#[derive(Clone)]
pub struct DataProjectIssue(Rc<DataProjectIssue_>);

impl DataProjectIssue {
    fn shared(&self) -> &StackShared {
        &self.0.shared
    }

    pub fn depends_on(self, dep: &impl Referable) -> Self {
        self.0.data.borrow_mut().depends_on.push(dep.extract_ref());
        self
    }

    pub fn set_provider(&self, provider: &ProviderGitlab) -> &Self {
        self.0.data.borrow_mut().provider = Some(provider.provider_ref());
        self
    }

    #[doc= "Set the field `id`.\n"]
    pub fn set_id(self, v: impl Into<PrimField<String>>) -> Self {
        self.0.data.borrow_mut().id = Some(v.into());
        self
    }

    #[doc= "Get a reference to the value of field `assignee_ids` after provisioning.\nThe IDs of the users to assign the issue to."]
    pub fn assignee_ids(&self) -> SetRef<PrimExpr<f64>> {
        SetRef::new(self.shared().clone(), format!("{}.assignee_ids", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `author_id` after provisioning.\nThe ID of the author of the issue. Use `gitlab_user` data source to get more information about the user."]
    pub fn author_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.author_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `closed_at` after provisioning.\nWhen the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z."]
    pub fn closed_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.closed_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `closed_by_user_id` after provisioning.\nThe ID of the user that closed the issue. Use `gitlab_user` data source to get more information about the user."]
    pub fn closed_by_user_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.closed_by_user_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `confidential` after provisioning.\nSet an issue to be confidential."]
    pub fn confidential(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.confidential", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `created_at` after provisioning.\nWhen the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights."]
    pub fn created_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.created_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `description` after provisioning.\nThe description of an issue. Limited to 1,048,576 characters."]
    pub fn description(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.description", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `discussion_locked` after provisioning.\nWhether the issue is locked for discussions or not."]
    pub fn discussion_locked(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.discussion_locked", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `discussion_to_resolve` after provisioning.\nThe ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with merge_request_to_resolve_discussions_of."]
    pub fn discussion_to_resolve(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.discussion_to_resolve", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `downvotes` after provisioning.\nThe number of downvotes the issue has received."]
    pub fn downvotes(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.downvotes", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `due_date` after provisioning.\nThe due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11."]
    pub fn due_date(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.due_date", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `epic_id` after provisioning.\nID of the epic to add the issue to. Valid values are greater than or equal to 0."]
    pub fn epic_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.epic_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `epic_issue_id` after provisioning.\nThe ID of the epic issue."]
    pub fn epic_issue_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.epic_issue_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `external_id` after provisioning.\nThe external ID of the issue."]
    pub fn external_id(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.external_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `human_time_estimate` after provisioning.\nThe human-readable time estimate of the issue."]
    pub fn human_time_estimate(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.human_time_estimate", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `human_total_time_spent` after provisioning.\nThe human-readable total time spent of the issue."]
    pub fn human_total_time_spent(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.human_total_time_spent", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `id` after provisioning.\n"]
    pub fn id(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `iid` after provisioning.\nThe internal ID of the project's issue."]
    pub fn iid(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.iid", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_id` after provisioning.\nThe instance-wide ID of the issue."]
    pub fn issue_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_link_id` after provisioning.\nThe ID of the issue link."]
    pub fn issue_link_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_link_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_type` after provisioning.\nThe type of issue. Valid values are: `issue`, `incident`, `test_case`."]
    pub fn issue_type(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_type", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `labels` after provisioning.\nThe labels of an issue."]
    pub fn labels(&self) -> SetRef<PrimExpr<String>> {
        SetRef::new(self.shared().clone(), format!("{}.labels", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `links` after provisioning.\nThe links of the issue."]
    pub fn links(&self) -> RecRef<PrimExpr<String>> {
        RecRef::new(self.shared().clone(), format!("{}.links", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `merge_request_to_resolve_discussions_of` after provisioning.\nThe IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values."]
    pub fn merge_request_to_resolve_discussions_of(&self) -> PrimExpr<f64> {
        PrimExpr::new(
            self.shared().clone(),
            format!("{}.merge_request_to_resolve_discussions_of", self.extract_ref()),
        )
    }

    #[doc= "Get a reference to the value of field `merge_requests_count` after provisioning.\nThe number of merge requests associated with the issue."]
    pub fn merge_requests_count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.merge_requests_count", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `milestone_id` after provisioning.\nThe global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details."]
    pub fn milestone_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.milestone_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `moved_to_id` after provisioning.\nThe ID of the issue that was moved to."]
    pub fn moved_to_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.moved_to_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `project` after provisioning.\nThe name or ID of the project."]
    pub fn project(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.project", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `references` after provisioning.\nThe references of the issue."]
    pub fn references(&self) -> RecRef<PrimExpr<String>> {
        RecRef::new(self.shared().clone(), format!("{}.references", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `state` after provisioning.\nThe state of the issue. Valid values are: `opened`, `closed`."]
    pub fn state(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.state", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `subscribed` after provisioning.\nWhether the authenticated user is subscribed to the issue or not."]
    pub fn subscribed(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.subscribed", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `task_completion_status` after provisioning.\nThe task completion status. It's always a one element list."]
    pub fn task_completion_status(&self) -> ListRef<DataProjectIssueTaskCompletionStatusElRef> {
        ListRef::new(self.shared().clone(), format!("{}.task_completion_status", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `time_estimate` after provisioning.\nThe time estimate of the issue."]
    pub fn time_estimate(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.time_estimate", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `title` after provisioning.\nThe title of the issue."]
    pub fn title(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.title", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `total_time_spent` after provisioning.\nThe total time spent of the issue."]
    pub fn total_time_spent(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.total_time_spent", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `updated_at` after provisioning.\nWhen the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z."]
    pub fn updated_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.updated_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `upvotes` after provisioning.\nThe number of upvotes the issue has received."]
    pub fn upvotes(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.upvotes", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `user_notes_count` after provisioning.\nThe number of user notes on the issue."]
    pub fn user_notes_count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.user_notes_count", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `web_url` after provisioning.\nThe web URL of the issue."]
    pub fn web_url(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.web_url", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `weight` after provisioning.\nThe weight of the issue. Valid values are greater than or equal to 0."]
    pub fn weight(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.weight", self.extract_ref()))
    }
}

impl Referable for DataProjectIssue {
    fn extract_ref(&self) -> String {
        format!("data.{}.{}", self.0.extract_datasource_type(), self.0.extract_tf_id())
    }
}

impl Datasource for DataProjectIssue { }

impl ToListMappable for DataProjectIssue {
    type O = ListRef<DataProjectIssueRef>;

    fn do_map(self, base: String) -> Self::O {
        self.0.data.borrow_mut().for_each = Some(format!("${{{}}}", base));
        ListRef::new(self.0.shared.clone(), self.extract_ref())
    }
}

impl Datasource_ for DataProjectIssue_ {
    fn extract_datasource_type(&self) -> String {
        "gitlab_project_issue".into()
    }

    fn extract_tf_id(&self) -> String {
        self.tf_id.clone()
    }

    fn extract_value(&self) -> serde_json::Value {
        serde_json::to_value(&self.data).unwrap()
    }
}

pub struct BuildDataProjectIssue {
    pub tf_id: String,
    #[doc= "The internal ID of the project's issue."]
    pub iid: PrimField<f64>,
    #[doc= "The name or ID of the project."]
    pub project: PrimField<String>,
}

impl BuildDataProjectIssue {
    pub fn build(self, stack: &mut Stack) -> DataProjectIssue {
        let out = DataProjectIssue(Rc::new(DataProjectIssue_ {
            shared: stack.shared.clone(),
            tf_id: self.tf_id,
            data: RefCell::new(DataProjectIssueData {
                depends_on: core::default::Default::default(),
                provider: None,
                for_each: None,
                id: core::default::Default::default(),
                iid: self.iid,
                project: self.project,
            }),
        }));
        stack.add_datasource(out.0.clone());
        out
    }
}

pub struct DataProjectIssueRef {
    shared: StackShared,
    base: String,
}

impl Ref for DataProjectIssueRef {
    fn new(shared: StackShared, base: String) -> Self {
        Self {
            shared: shared,
            base: base,
        }
    }
}

impl DataProjectIssueRef {
    fn shared(&self) -> &StackShared {
        &self.shared
    }

    fn extract_ref(&self) -> String {
        self.base.clone()
    }

    #[doc= "Get a reference to the value of field `assignee_ids` after provisioning.\nThe IDs of the users to assign the issue to."]
    pub fn assignee_ids(&self) -> SetRef<PrimExpr<f64>> {
        SetRef::new(self.shared().clone(), format!("{}.assignee_ids", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `author_id` after provisioning.\nThe ID of the author of the issue. Use `gitlab_user` data source to get more information about the user."]
    pub fn author_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.author_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `closed_at` after provisioning.\nWhen the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z."]
    pub fn closed_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.closed_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `closed_by_user_id` after provisioning.\nThe ID of the user that closed the issue. Use `gitlab_user` data source to get more information about the user."]
    pub fn closed_by_user_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.closed_by_user_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `confidential` after provisioning.\nSet an issue to be confidential."]
    pub fn confidential(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.confidential", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `created_at` after provisioning.\nWhen the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights."]
    pub fn created_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.created_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `description` after provisioning.\nThe description of an issue. Limited to 1,048,576 characters."]
    pub fn description(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.description", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `discussion_locked` after provisioning.\nWhether the issue is locked for discussions or not."]
    pub fn discussion_locked(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.discussion_locked", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `discussion_to_resolve` after provisioning.\nThe ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with merge_request_to_resolve_discussions_of."]
    pub fn discussion_to_resolve(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.discussion_to_resolve", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `downvotes` after provisioning.\nThe number of downvotes the issue has received."]
    pub fn downvotes(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.downvotes", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `due_date` after provisioning.\nThe due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11."]
    pub fn due_date(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.due_date", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `epic_id` after provisioning.\nID of the epic to add the issue to. Valid values are greater than or equal to 0."]
    pub fn epic_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.epic_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `epic_issue_id` after provisioning.\nThe ID of the epic issue."]
    pub fn epic_issue_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.epic_issue_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `external_id` after provisioning.\nThe external ID of the issue."]
    pub fn external_id(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.external_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `human_time_estimate` after provisioning.\nThe human-readable time estimate of the issue."]
    pub fn human_time_estimate(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.human_time_estimate", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `human_total_time_spent` after provisioning.\nThe human-readable total time spent of the issue."]
    pub fn human_total_time_spent(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.human_total_time_spent", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `id` after provisioning.\n"]
    pub fn id(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `iid` after provisioning.\nThe internal ID of the project's issue."]
    pub fn iid(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.iid", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_id` after provisioning.\nThe instance-wide ID of the issue."]
    pub fn issue_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_link_id` after provisioning.\nThe ID of the issue link."]
    pub fn issue_link_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_link_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `issue_type` after provisioning.\nThe type of issue. Valid values are: `issue`, `incident`, `test_case`."]
    pub fn issue_type(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.issue_type", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `labels` after provisioning.\nThe labels of an issue."]
    pub fn labels(&self) -> SetRef<PrimExpr<String>> {
        SetRef::new(self.shared().clone(), format!("{}.labels", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `links` after provisioning.\nThe links of the issue."]
    pub fn links(&self) -> RecRef<PrimExpr<String>> {
        RecRef::new(self.shared().clone(), format!("{}.links", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `merge_request_to_resolve_discussions_of` after provisioning.\nThe IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values."]
    pub fn merge_request_to_resolve_discussions_of(&self) -> PrimExpr<f64> {
        PrimExpr::new(
            self.shared().clone(),
            format!("{}.merge_request_to_resolve_discussions_of", self.extract_ref()),
        )
    }

    #[doc= "Get a reference to the value of field `merge_requests_count` after provisioning.\nThe number of merge requests associated with the issue."]
    pub fn merge_requests_count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.merge_requests_count", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `milestone_id` after provisioning.\nThe global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details."]
    pub fn milestone_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.milestone_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `moved_to_id` after provisioning.\nThe ID of the issue that was moved to."]
    pub fn moved_to_id(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.moved_to_id", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `project` after provisioning.\nThe name or ID of the project."]
    pub fn project(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.project", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `references` after provisioning.\nThe references of the issue."]
    pub fn references(&self) -> RecRef<PrimExpr<String>> {
        RecRef::new(self.shared().clone(), format!("{}.references", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `state` after provisioning.\nThe state of the issue. Valid values are: `opened`, `closed`."]
    pub fn state(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.state", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `subscribed` after provisioning.\nWhether the authenticated user is subscribed to the issue or not."]
    pub fn subscribed(&self) -> PrimExpr<bool> {
        PrimExpr::new(self.shared().clone(), format!("{}.subscribed", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `task_completion_status` after provisioning.\nThe task completion status. It's always a one element list."]
    pub fn task_completion_status(&self) -> ListRef<DataProjectIssueTaskCompletionStatusElRef> {
        ListRef::new(self.shared().clone(), format!("{}.task_completion_status", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `time_estimate` after provisioning.\nThe time estimate of the issue."]
    pub fn time_estimate(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.time_estimate", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `title` after provisioning.\nThe title of the issue."]
    pub fn title(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.title", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `total_time_spent` after provisioning.\nThe total time spent of the issue."]
    pub fn total_time_spent(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.total_time_spent", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `updated_at` after provisioning.\nWhen the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z."]
    pub fn updated_at(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.updated_at", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `upvotes` after provisioning.\nThe number of upvotes the issue has received."]
    pub fn upvotes(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.upvotes", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `user_notes_count` after provisioning.\nThe number of user notes on the issue."]
    pub fn user_notes_count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.user_notes_count", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `web_url` after provisioning.\nThe web URL of the issue."]
    pub fn web_url(&self) -> PrimExpr<String> {
        PrimExpr::new(self.shared().clone(), format!("{}.web_url", self.extract_ref()))
    }

    #[doc= "Get a reference to the value of field `weight` after provisioning.\nThe weight of the issue. Valid values are greater than or equal to 0."]
    pub fn weight(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.weight", self.extract_ref()))
    }
}

#[derive(Serialize)]
pub struct DataProjectIssueTaskCompletionStatusEl {
    #[serde(skip_serializing_if = "Option::is_none")]
    completed_count: Option<PrimField<f64>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    count: Option<PrimField<f64>>,
}

impl DataProjectIssueTaskCompletionStatusEl {
    #[doc= "Set the field `completed_count`.\n"]
    pub fn set_completed_count(mut self, v: impl Into<PrimField<f64>>) -> Self {
        self.completed_count = Some(v.into());
        self
    }

    #[doc= "Set the field `count`.\n"]
    pub fn set_count(mut self, v: impl Into<PrimField<f64>>) -> Self {
        self.count = Some(v.into());
        self
    }
}

impl ToListMappable for DataProjectIssueTaskCompletionStatusEl {
    type O = BlockAssignable<DataProjectIssueTaskCompletionStatusEl>;

    fn do_map(self, base: String) -> Self::O {
        BlockAssignable::Dynamic(DynamicBlock {
            for_each: format!("${{{}}}", base),
            iterator: "each".into(),
            content: self,
        })
    }
}

pub struct BuildDataProjectIssueTaskCompletionStatusEl {}

impl BuildDataProjectIssueTaskCompletionStatusEl {
    pub fn build(self) -> DataProjectIssueTaskCompletionStatusEl {
        DataProjectIssueTaskCompletionStatusEl {
            completed_count: core::default::Default::default(),
            count: core::default::Default::default(),
        }
    }
}

pub struct DataProjectIssueTaskCompletionStatusElRef {
    shared: StackShared,
    base: String,
}

impl Ref for DataProjectIssueTaskCompletionStatusElRef {
    fn new(shared: StackShared, base: String) -> DataProjectIssueTaskCompletionStatusElRef {
        DataProjectIssueTaskCompletionStatusElRef {
            shared: shared,
            base: base.to_string(),
        }
    }
}

impl DataProjectIssueTaskCompletionStatusElRef {
    fn shared(&self) -> &StackShared {
        &self.shared
    }

    #[doc= "Get a reference to the value of field `completed_count` after provisioning.\n"]
    pub fn completed_count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.completed_count", self.base))
    }

    #[doc= "Get a reference to the value of field `count` after provisioning.\n"]
    pub fn count(&self) -> PrimExpr<f64> {
        PrimExpr::new(self.shared().clone(), format!("{}.count", self.base))
    }
}