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 pub namespace_class: bool,
18}
19
20impl Default for JavaConfig {
21 fn default() -> Self {
22 Self {
23 header_comment: HeaderComment::None,
24 package: None,
25 prefix: None,
26 type_mappings: HashMap::with_capacity(0),
27 namespace_class: true,
28 }
29 }
30}
31
32#[derive(Debug, Serialize, Deserialize)]
33#[serde(tag = "type")]
34pub enum HeaderComment {
35 None,
36 Custom { comment: String },
37 Default,
38}