#[allow(clippy::wildcard_imports)]
use super::*;
impl AnalysisModelDraft {
#[must_use]
pub fn new(global_id: impl Into<String>, predefined_type: AnalysisModelType) -> Self {
Self {
global_id: global_id.into(),
owner_history: None,
name: None,
description: None,
object_type: None,
predefined_type,
orientation_of_2d_plane: None,
loaded_by: Vec::new(),
result_groups: Vec::new(),
shared_placement: None,
}
}
#[must_use]
pub fn owner_history(mut self, value: EntityId) -> Self {
self.owner_history = Some(value);
self
}
#[must_use]
pub fn name(mut self, value: impl Into<String>) -> Self {
self.name = Some(value.into());
self
}
#[must_use]
pub fn description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
#[must_use]
pub fn object_type(mut self, value: impl Into<String>) -> Self {
self.object_type = Some(value.into());
self
}
#[must_use]
pub fn orientation_of_2d_plane(mut self, value: EntityId) -> Self {
self.orientation_of_2d_plane = Some(value);
self
}
#[must_use]
pub fn loaded_by(mut self, value: Vec<EntityId>) -> Self {
self.loaded_by = value;
self
}
#[must_use]
pub fn result_groups(mut self, value: Vec<EntityId>) -> Self {
self.result_groups = value;
self
}
#[must_use]
pub fn shared_placement(mut self, value: EntityId) -> Self {
self.shared_placement = Some(value);
self
}
}