1use serde_json::Value;
5use std::collections::HashMap;
6
7#[derive(Debug, Default, Clone)]
9pub struct PropertiesBuilder {
10 properties: HashMap<String, Value>,
11}
12
13impl PropertiesBuilder {
14 pub fn new() -> Self {
16 Self {
17 properties: HashMap::new(),
18 }
19 }
20
21 pub fn add(mut self, key: impl Into<String>, value: impl Into<Value>) -> Self {
24 self.properties.insert(key.into(), value.into());
25 self
26 }
27
28 pub fn build(self) -> HashMap<String, Value> {
30 self.properties
31 }
32}