dis_rs/common/remove_entity/
builder.rs1use crate::model::EntityId;
2use crate::remove_entity::model::RemoveEntity;
3
4pub struct RemoveEntityBuilder(RemoveEntity);
5
6impl Default for RemoveEntityBuilder {
7 fn default() -> Self {
8 Self::new()
9 }
10}
11
12impl RemoveEntityBuilder {
13 #[must_use]
14 pub fn new() -> Self {
15 RemoveEntityBuilder(RemoveEntity::default())
16 }
17
18 #[must_use]
19 pub fn new_from_body(body: RemoveEntity) -> Self {
20 RemoveEntityBuilder(body)
21 }
22
23 #[must_use]
24 pub fn build(self) -> RemoveEntity {
25 self.0
26 }
27
28 #[must_use]
29 pub fn with_origination_id(mut self, originating_id: EntityId) -> Self {
30 self.0.originating_id = originating_id;
31 self
32 }
33
34 #[must_use]
35 pub fn with_receiving_id(mut self, receiving_id: EntityId) -> Self {
36 self.0.receiving_id = receiving_id;
37 self
38 }
39
40 #[must_use]
41 pub fn with_request_id(mut self, request_id: u32) -> Self {
42 self.0.request_id = request_id;
43 self
44 }
45}