dis_rs/common/resupply_cancel/
builder.rs1use crate::common::model::EntityId;
2use crate::resupply_cancel::model::ResupplyCancel;
3
4pub struct ResupplyCancelBuilder(ResupplyCancel);
5
6impl Default for ResupplyCancelBuilder {
7 fn default() -> Self {
8 Self::new()
9 }
10}
11
12impl ResupplyCancelBuilder {
13 #[must_use]
14 pub fn new() -> Self {
15 ResupplyCancelBuilder(ResupplyCancel::default())
16 }
17
18 #[must_use]
19 pub fn new_from_body(body: ResupplyCancel) -> Self {
20 ResupplyCancelBuilder(body)
21 }
22
23 #[must_use]
24 pub fn build(self) -> ResupplyCancel {
25 self.0
26 }
27
28 #[must_use]
29 pub fn with_requesting_id(mut self, requesting_id: EntityId) -> Self {
30 self.0.requesting_id = requesting_id;
31 self
32 }
33
34 #[must_use]
35 pub fn with_servicing_id(mut self, servicing_id: EntityId) -> Self {
36 self.0.servicing_id = servicing_id;
37 self
38 }
39}