ifc_structural/authoring/
builders.rs1#[allow(clippy::wildcard_imports)]
5use super::*;
6
7impl AnalysisModelDraft {
8 #[must_use]
10 pub fn new(global_id: impl Into<String>, predefined_type: AnalysisModelType) -> Self {
11 Self {
12 global_id: global_id.into(),
13 owner_history: None,
14 name: None,
15 description: None,
16 object_type: None,
17 predefined_type,
18 orientation_of_2d_plane: None,
19 loaded_by: Vec::new(),
20 result_groups: Vec::new(),
21 shared_placement: None,
22 }
23 }
24
25 #[must_use]
28 pub fn owner_history(mut self, value: EntityId) -> Self {
29 self.owner_history = Some(value);
30 self
31 }
32
33 #[must_use]
35 pub fn name(mut self, value: impl Into<String>) -> Self {
36 self.name = Some(value.into());
37 self
38 }
39
40 #[must_use]
42 pub fn description(mut self, value: impl Into<String>) -> Self {
43 self.description = Some(value.into());
44 self
45 }
46
47 #[must_use]
50 pub fn object_type(mut self, value: impl Into<String>) -> Self {
51 self.object_type = Some(value.into());
52 self
53 }
54
55 #[must_use]
58 pub fn orientation_of_2d_plane(mut self, value: EntityId) -> Self {
59 self.orientation_of_2d_plane = Some(value);
60 self
61 }
62
63 #[must_use]
66 pub fn loaded_by(mut self, value: Vec<EntityId>) -> Self {
67 self.loaded_by = value;
68 self
69 }
70
71 #[must_use]
74 pub fn result_groups(mut self, value: Vec<EntityId>) -> Self {
75 self.result_groups = value;
76 self
77 }
78
79 #[must_use]
82 pub fn shared_placement(mut self, value: EntityId) -> Self {
83 self.shared_placement = Some(value);
84 self
85 }
86}