1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Deserialize)]
6#[serde(default)]
7pub struct JavaConfig {
8 pub header_comment: HeaderComment,
10 pub package: Option<String>,
12 pub prefix: Option<String>,
14 pub type_mappings: HashMap<String, String>,
16}
17
18impl Default for JavaConfig {
19 fn default() -> Self {
20 Self {
21 header_comment: HeaderComment::None,
22 package: None,
23 prefix: None,
24 type_mappings: HashMap::with_capacity(0),
25 }
26 }
27}
28
29#[derive(Debug, Serialize, Deserialize)]
30#[serde(tag = "type")]
31pub enum HeaderComment {
32 None,
33 Custom { comment: String },
34 Default,
35}