Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

kicad_monkey_contracts/generated/
board_plot_request.rs

1/// Error types.
2pub mod error {
3    /// Error from a `TryFrom` or `FromStr` implementation.
4    pub struct ConversionError(::std::borrow::Cow<'static, str>);
5    impl ::std::error::Error for ConversionError {}
6    impl ::std::fmt::Display for ConversionError {
7        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
8            ::std::fmt::Display::fmt(&self.0, f)
9        }
10    }
11    impl ::std::fmt::Debug for ConversionError {
12        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
13            ::std::fmt::Debug::fmt(&self.0, f)
14        }
15    }
16    impl From<&'static str> for ConversionError {
17        fn from(value: &'static str) -> Self {
18            Self(value.into())
19        }
20    }
21    impl From<String> for ConversionError {
22        fn from(value: String) -> Self {
23            Self(value.into())
24        }
25    }
26}
27/**One exact net-name to ordered net-class assignment mirrored from the
28project sidecar's `net_settings.netclass_assignments` entries.*/
29///
30/// <details><summary>JSON schema</summary>
31///
32/// ```json
33///{
34///  "description": "One exact net-name to ordered net-class assignment mirrored from the\nproject sidecar's `net_settings.netclass_assignments` entries.",
35///  "type": "object",
36///  "required": [
37///    "classes",
38///    "net_name"
39///  ],
40///  "properties": {
41///    "classes": {
42///      "type": "array",
43///      "items": {
44///        "type": "string"
45///      }
46///    },
47///    "net_name": {
48///      "type": "string"
49///    }
50///  },
51///  "additionalProperties": false
52///}
53/// ```
54/// </details>
55#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
56#[serde(deny_unknown_fields)]
57pub struct BoardNetClassAssignment {
58    pub classes: ::std::vec::Vec<::std::string::String>,
59    pub net_name: ::std::string::String,
60}
61///Resource-bounded board plotter operation. Source bytes are out of band.
62///
63/// <details><summary>JSON schema</summary>
64///
65/// ```json
66///{
67///  "$id": "urn:wavenumber:schema:kicad_monkey.board_plot.request:a0",
68///  "title": "Board plot request a0",
69///  "description": "Resource-bounded board plotter operation. Source bytes are out of band.",
70///  "type": "object",
71///  "required": [
72///    "max_cache_contours",
73///    "max_cache_polygons",
74///    "max_depth",
75///    "max_graphics",
76///    "max_input_points",
77///    "max_input_polygons",
78///    "max_operations",
79///    "max_output_bytes",
80///    "max_parse_nodes",
81///    "max_points",
82///    "max_source_bytes",
83///    "max_text_bytes",
84///    "type",
85///    "version"
86///  ],
87///  "properties": {
88///    "document_id": {
89///      "type": "string"
90///    },
91///    "max_cache_contours": {
92///      "type": "integer",
93///      "maximum": 4294967295.0,
94///      "minimum": 0.0
95///    },
96///    "max_cache_polygons": {
97///      "type": "integer",
98///      "maximum": 4294967295.0,
99///      "minimum": 0.0
100///    },
101///    "max_depth": {
102///      "type": "integer",
103///      "maximum": 4294967295.0,
104///      "minimum": 0.0
105///    },
106///    "max_graphics": {
107///      "type": "integer",
108///      "maximum": 4294967295.0,
109///      "minimum": 0.0
110///    },
111///    "max_input_points": {
112///      "type": "integer",
113///      "maximum": 4294967295.0,
114///      "minimum": 0.0
115///    },
116///    "max_input_polygons": {
117///      "type": "integer",
118///      "maximum": 4294967295.0,
119///      "minimum": 0.0
120///    },
121///    "max_operations": {
122///      "type": "integer",
123///      "maximum": 4294967295.0,
124///      "minimum": 0.0
125///    },
126///    "max_output_bytes": {
127///      "type": "string"
128///    },
129///    "max_parse_nodes": {
130///      "type": "integer",
131///      "maximum": 4294967295.0,
132///      "minimum": 0.0
133///    },
134///    "max_points": {
135///      "type": "integer",
136///      "maximum": 4294967295.0,
137///      "minimum": 0.0
138///    },
139///    "max_source_bytes": {
140///      "type": "string"
141///    },
142///    "max_text_bytes": {
143///      "type": "string"
144///    },
145///    "net_class_assignments": {
146///      "type": "array",
147///      "items": {
148///        "$ref": "#/$defs/BoardNetClassAssignment"
149///      }
150///    },
151///    "source_path": {
152///      "type": "string"
153///    },
154///    "text_variables": {
155///      "type": "array",
156///      "items": {
157///        "$ref": "#/$defs/BoardTextVariable"
158///      }
159///    },
160///    "type": {
161///      "type": "string",
162///      "const": "kicad_monkey.board_plot.request"
163///    },
164///    "version": {
165///      "type": "string",
166///      "const": "a0"
167///    }
168///  },
169///  "additionalProperties": false
170///}
171/// ```
172/// </details>
173#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
174#[serde(deny_unknown_fields)]
175pub struct BoardPlotRequestA0 {
176    #[serde(
177        default,
178        deserialize_with = "crate::deserialize_present_nonnull",
179        skip_serializing_if = "::std::option::Option::is_none"
180    )]
181    pub document_id: ::std::option::Option<::std::string::String>,
182    pub max_cache_contours: u32,
183    pub max_cache_polygons: u32,
184    pub max_depth: u32,
185    pub max_graphics: u32,
186    pub max_input_points: u32,
187    pub max_input_polygons: u32,
188    pub max_operations: u32,
189    pub max_output_bytes: ::std::string::String,
190    pub max_parse_nodes: u32,
191    pub max_points: u32,
192    pub max_source_bytes: ::std::string::String,
193    pub max_text_bytes: ::std::string::String,
194    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
195    pub net_class_assignments: ::std::vec::Vec<BoardNetClassAssignment>,
196    #[serde(
197        default,
198        deserialize_with = "crate::deserialize_present_nonnull",
199        skip_serializing_if = "::std::option::Option::is_none"
200    )]
201    pub source_path: ::std::option::Option<::std::string::String>,
202    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
203    pub text_variables: ::std::vec::Vec<BoardTextVariable>,
204    #[serde(rename = "type")]
205    pub type_: ::std::string::String,
206    pub version: ::std::string::String,
207}
208/**One project-sidecar text variable. The producer case-expands names to
209original/lower/upper aliases and overlays board `(property ...)` values,
210matching the established `board_text_variables` merge.*/
211///
212/// <details><summary>JSON schema</summary>
213///
214/// ```json
215///{
216///  "description": "One project-sidecar text variable. The producer case-expands names to\noriginal/lower/upper aliases and overlays board `(property ...)` values,\nmatching the established `board_text_variables` merge.",
217///  "type": "object",
218///  "required": [
219///    "name",
220///    "value"
221///  ],
222///  "properties": {
223///    "name": {
224///      "type": "string"
225///    },
226///    "value": {
227///      "type": "string"
228///    }
229///  },
230///  "additionalProperties": false
231///}
232/// ```
233/// </details>
234#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
235#[serde(deny_unknown_fields)]
236pub struct BoardTextVariable {
237    pub name: ::std::string::String,
238    pub value: ::std::string::String,
239}