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

kicad_monkey_contracts/generated/
footprint_plot_document.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///Solid three-point arc.
28///
29/// <details><summary>JSON schema</summary>
30///
31/// ```json
32///{
33///  "description": "Solid three-point arc.",
34///  "type": "object",
35///  "required": [
36///    "end_x",
37///    "end_y",
38///    "fill",
39///    "index",
40///    "kind",
41///    "mid_x",
42///    "mid_y",
43///    "start_x",
44///    "start_y",
45///    "width_nm"
46///  ],
47///  "properties": {
48///    "end_x": {
49///      "$ref": "#/$defs/JavaScriptSafeInteger"
50///    },
51///    "end_y": {
52///      "$ref": "#/$defs/JavaScriptSafeInteger"
53///    },
54///    "fill": {
55///      "$ref": "#/$defs/PlotterFill"
56///    },
57///    "fill_color": {
58///      "type": "string"
59///    },
60///    "index": {
61///      "type": "integer",
62///      "maximum": 4294967295.0,
63///      "minimum": 0.0
64///    },
65///    "kind": {
66///      "type": "string",
67///      "const": "ArcThreePoint"
68///    },
69///    "layer": {
70///      "type": "string"
71///    },
72///    "line_style": {
73///      "$ref": "#/$defs/PlotterLineStyle"
74///    },
75///    "mid_x": {
76///      "$ref": "#/$defs/JavaScriptSafeInteger"
77///    },
78///    "mid_y": {
79///      "$ref": "#/$defs/JavaScriptSafeInteger"
80///    },
81///    "start_x": {
82///      "$ref": "#/$defs/JavaScriptSafeInteger"
83///    },
84///    "start_y": {
85///      "$ref": "#/$defs/JavaScriptSafeInteger"
86///    },
87///    "stroke_color": {
88///      "type": "string"
89///    },
90///    "width_nm": {
91///      "$ref": "#/$defs/JavaScriptSafeInteger"
92///    }
93///  },
94///  "additionalProperties": false
95///}
96/// ```
97/// </details>
98#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
99#[serde(deny_unknown_fields)]
100pub struct ArcThreePointOperation {
101    pub end_x: crate::JavaScriptSafeInteger,
102    pub end_y: crate::JavaScriptSafeInteger,
103    pub fill: PlotterFill,
104    #[serde(
105        default,
106        deserialize_with = "crate::deserialize_present_nonnull",
107        skip_serializing_if = "::std::option::Option::is_none"
108    )]
109    pub fill_color: ::std::option::Option<::std::string::String>,
110    pub index: u32,
111    #[serde(deserialize_with = "crate::deserialize_arc_three_point_kind")]
112    pub kind: ::std::string::String,
113    #[serde(
114        default,
115        deserialize_with = "crate::deserialize_present_nonnull",
116        skip_serializing_if = "::std::option::Option::is_none"
117    )]
118    pub layer: ::std::option::Option<::std::string::String>,
119    #[serde(
120        default,
121        deserialize_with = "crate::deserialize_present_nonnull",
122        skip_serializing_if = "::std::option::Option::is_none"
123    )]
124    pub line_style: ::std::option::Option<PlotterLineStyle>,
125    pub mid_x: crate::JavaScriptSafeInteger,
126    pub mid_y: crate::JavaScriptSafeInteger,
127    pub start_x: crate::JavaScriptSafeInteger,
128    pub start_y: crate::JavaScriptSafeInteger,
129    #[serde(
130        default,
131        deserialize_with = "crate::deserialize_present_nonnull",
132        skip_serializing_if = "::std::option::Option::is_none"
133    )]
134    pub stroke_color: ::std::option::Option<::std::string::String>,
135    pub width_nm: crate::JavaScriptSafeInteger,
136}
137///Cubic Bézier shared by symbol and schematic producers.
138///
139/// <details><summary>JSON schema</summary>
140///
141/// ```json
142///{
143///  "description": "Cubic Bézier shared by symbol and schematic producers.",
144///  "type": "object",
145///  "required": [
146///    "ctrl1_x",
147///    "ctrl1_y",
148///    "ctrl2_x",
149///    "ctrl2_y",
150///    "end_x",
151///    "end_y",
152///    "index",
153///    "kind",
154///    "start_x",
155///    "start_y",
156///    "tolerance_nm",
157///    "width_nm"
158///  ],
159///  "properties": {
160///    "ctrl1_x": {
161///      "$ref": "#/$defs/JavaScriptSafeInteger"
162///    },
163///    "ctrl1_y": {
164///      "$ref": "#/$defs/JavaScriptSafeInteger"
165///    },
166///    "ctrl2_x": {
167///      "$ref": "#/$defs/JavaScriptSafeInteger"
168///    },
169///    "ctrl2_y": {
170///      "$ref": "#/$defs/JavaScriptSafeInteger"
171///    },
172///    "end_x": {
173///      "$ref": "#/$defs/JavaScriptSafeInteger"
174///    },
175///    "end_y": {
176///      "$ref": "#/$defs/JavaScriptSafeInteger"
177///    },
178///    "index": {
179///      "type": "integer",
180///      "maximum": 4294967295.0,
181///      "minimum": 0.0
182///    },
183///    "kind": {
184///      "type": "string",
185///      "const": "BezierCurve"
186///    },
187///    "layer": {
188///      "type": "string"
189///    },
190///    "line_style": {
191///      "$ref": "#/$defs/PlotterLineStyle"
192///    },
193///    "start_x": {
194///      "$ref": "#/$defs/JavaScriptSafeInteger"
195///    },
196///    "start_y": {
197///      "$ref": "#/$defs/JavaScriptSafeInteger"
198///    },
199///    "stroke_color": {
200///      "type": "string"
201///    },
202///    "tolerance_nm": {
203///      "$ref": "#/$defs/JavaScriptSafeInteger"
204///    },
205///    "width_nm": {
206///      "$ref": "#/$defs/JavaScriptSafeInteger"
207///    }
208///  },
209///  "additionalProperties": false
210///}
211/// ```
212/// </details>
213#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
214#[serde(deny_unknown_fields)]
215pub struct BezierCurveOperation {
216    pub ctrl1_x: crate::JavaScriptSafeInteger,
217    pub ctrl1_y: crate::JavaScriptSafeInteger,
218    pub ctrl2_x: crate::JavaScriptSafeInteger,
219    pub ctrl2_y: crate::JavaScriptSafeInteger,
220    pub end_x: crate::JavaScriptSafeInteger,
221    pub end_y: crate::JavaScriptSafeInteger,
222    pub index: u32,
223    #[serde(deserialize_with = "crate::deserialize_bezier_curve_kind")]
224    pub kind: ::std::string::String,
225    #[serde(
226        default,
227        deserialize_with = "crate::deserialize_present_nonnull",
228        skip_serializing_if = "::std::option::Option::is_none"
229    )]
230    pub layer: ::std::option::Option<::std::string::String>,
231    #[serde(
232        default,
233        deserialize_with = "crate::deserialize_present_nonnull",
234        skip_serializing_if = "::std::option::Option::is_none"
235    )]
236    pub line_style: ::std::option::Option<PlotterLineStyle>,
237    pub start_x: crate::JavaScriptSafeInteger,
238    pub start_y: crate::JavaScriptSafeInteger,
239    #[serde(
240        default,
241        deserialize_with = "crate::deserialize_present_nonnull",
242        skip_serializing_if = "::std::option::Option::is_none"
243    )]
244    pub stroke_color: ::std::option::Option<::std::string::String>,
245    pub tolerance_nm: crate::JavaScriptSafeInteger,
246    pub width_nm: crate::JavaScriptSafeInteger,
247}
248/**Circle shared by graphical and drill producers. Graphic state requires only
249layer. Drill state requires role plus layers; NPTH state additionally
250requires all mask and pad-size hints. The generated semantic validator
251enforces these mutually exclusive states.*/
252///
253/// <details><summary>JSON schema</summary>
254///
255/// ```json
256///{
257///  "description": "Circle shared by graphical and drill producers. Graphic state requires only\nlayer. Drill state requires role plus layers; NPTH state additionally\nrequires all mask and pad-size hints. The generated semantic validator\nenforces these mutually exclusive states.",
258///  "type": "object",
259///  "required": [
260///    "cx",
261///    "cy",
262///    "diameter_nm",
263///    "fill",
264///    "index",
265///    "kind",
266///    "width_nm"
267///  ],
268///  "properties": {
269///    "cx": {
270///      "$ref": "#/$defs/JavaScriptSafeInteger"
271///    },
272///    "cy": {
273///      "$ref": "#/$defs/JavaScriptSafeInteger"
274///    },
275///    "diameter_nm": {
276///      "$ref": "#/$defs/JavaScriptSafeInteger"
277///    },
278///    "fill": {
279///      "$ref": "#/$defs/PlotterFill"
280///    },
281///    "fill_color": {
282///      "type": "string"
283///    },
284///    "index": {
285///      "type": "integer",
286///      "maximum": 4294967295.0,
287///      "minimum": 0.0
288///    },
289///    "kind": {
290///      "type": "string",
291///      "const": "Circle"
292///    },
293///    "layer": {
294///      "type": "string"
295///    },
296///    "layers": {
297///      "type": "array",
298///      "items": {
299///        "type": "string"
300///      }
301///    },
302///    "line_style": {
303///      "$ref": "#/$defs/PlotterLineStyle"
304///    },
305///    "mask_margin_nm": {
306///      "$ref": "#/$defs/JavaScriptSafeInteger"
307///    },
308///    "pad_size_x_nm": {
309///      "$ref": "#/$defs/JavaScriptSafeInteger"
310///    },
311///    "pad_size_y_nm": {
312///      "$ref": "#/$defs/JavaScriptSafeInteger"
313///    },
314///    "role": {
315///      "$ref": "#/$defs/PlotterDrillRole"
316///    },
317///    "stroke_color": {
318///      "type": "string"
319///    },
320///    "width_nm": {
321///      "$ref": "#/$defs/JavaScriptSafeInteger"
322///    }
323///  },
324///  "additionalProperties": false
325///}
326/// ```
327/// </details>
328#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
329#[serde(deny_unknown_fields)]
330pub struct CircleOperation {
331    pub cx: crate::JavaScriptSafeInteger,
332    pub cy: crate::JavaScriptSafeInteger,
333    pub diameter_nm: crate::JavaScriptSafeInteger,
334    pub fill: PlotterFill,
335    #[serde(
336        default,
337        deserialize_with = "crate::deserialize_present_nonnull",
338        skip_serializing_if = "::std::option::Option::is_none"
339    )]
340    pub fill_color: ::std::option::Option<::std::string::String>,
341    pub index: u32,
342    #[serde(deserialize_with = "crate::deserialize_circle_kind")]
343    pub kind: ::std::string::String,
344    #[serde(
345        default,
346        deserialize_with = "crate::deserialize_present_nonnull",
347        skip_serializing_if = "::std::option::Option::is_none"
348    )]
349    pub layer: ::std::option::Option<::std::string::String>,
350    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
351    pub layers: ::std::vec::Vec<::std::string::String>,
352    #[serde(
353        default,
354        deserialize_with = "crate::deserialize_present_nonnull",
355        skip_serializing_if = "::std::option::Option::is_none"
356    )]
357    pub line_style: ::std::option::Option<PlotterLineStyle>,
358    #[serde(
359        default,
360        deserialize_with = "crate::deserialize_present_nonnull",
361        skip_serializing_if = "::std::option::Option::is_none"
362    )]
363    pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
364    #[serde(
365        default,
366        deserialize_with = "crate::deserialize_present_nonnull",
367        skip_serializing_if = "::std::option::Option::is_none"
368    )]
369    pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
370    #[serde(
371        default,
372        deserialize_with = "crate::deserialize_present_nonnull",
373        skip_serializing_if = "::std::option::Option::is_none"
374    )]
375    pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
376    #[serde(
377        default,
378        deserialize_with = "crate::deserialize_present_nonnull",
379        skip_serializing_if = "::std::option::Option::is_none"
380    )]
381    pub role: ::std::option::Option<PlotterDrillRole>,
382    #[serde(
383        default,
384        deserialize_with = "crate::deserialize_present_nonnull",
385        skip_serializing_if = "::std::option::Option::is_none"
386    )]
387    pub stroke_color: ::std::option::Option<::std::string::String>,
388    pub width_nm: crate::JavaScriptSafeInteger,
389}
390/**Circular pad flash shared by footprint and PCB producers. Footprint pad
391state requires mask_margin_nm and forbids role. Board via state requires
392role and forbids mask_margin_nm. The generated semantic validator enforces
393these mutually exclusive states.*/
394///
395/// <details><summary>JSON schema</summary>
396///
397/// ```json
398///{
399///  "description": "Circular pad flash shared by footprint and PCB producers. Footprint pad\nstate requires mask_margin_nm and forbids role. Board via state requires\nrole and forbids mask_margin_nm. The generated semantic validator enforces\nthese mutually exclusive states.",
400///  "type": "object",
401///  "required": [
402///    "diameter_nm",
403///    "index",
404///    "kind",
405///    "layers",
406///    "x",
407///    "y"
408///  ],
409///  "properties": {
410///    "diameter_nm": {
411///      "$ref": "#/$defs/JavaScriptSafeInteger"
412///    },
413///    "index": {
414///      "type": "integer",
415///      "maximum": 4294967295.0,
416///      "minimum": 0.0
417///    },
418///    "kind": {
419///      "type": "string",
420///      "const": "FlashPadCircle"
421///    },
422///    "layers": {
423///      "type": "array",
424///      "items": {
425///        "type": "string"
426///      }
427///    },
428///    "mask_margin_nm": {
429///      "$ref": "#/$defs/JavaScriptSafeInteger"
430///    },
431///    "role": {
432///      "$ref": "#/$defs/PlotterViaFlashRole"
433///    },
434///    "x": {
435///      "$ref": "#/$defs/JavaScriptSafeInteger"
436///    },
437///    "y": {
438///      "$ref": "#/$defs/JavaScriptSafeInteger"
439///    }
440///  },
441///  "additionalProperties": false
442///}
443/// ```
444/// </details>
445#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
446#[serde(deny_unknown_fields)]
447pub struct FlashPadCircleOperation {
448    pub diameter_nm: crate::JavaScriptSafeInteger,
449    pub index: u32,
450    #[serde(deserialize_with = "crate::deserialize_flash_pad_circle_kind")]
451    pub kind: ::std::string::String,
452    pub layers: ::std::vec::Vec<::std::string::String>,
453    #[serde(
454        default,
455        deserialize_with = "crate::deserialize_present_nonnull",
456        skip_serializing_if = "::std::option::Option::is_none"
457    )]
458    pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
459    #[serde(
460        default,
461        deserialize_with = "crate::deserialize_present_nonnull",
462        skip_serializing_if = "::std::option::Option::is_none"
463    )]
464    pub role: ::std::option::Option<PlotterViaFlashRole>,
465    pub x: crate::JavaScriptSafeInteger,
466    pub y: crate::JavaScriptSafeInteger,
467}
468/**Custom pad flash shared by footprint and PCB producers. Polygon coordinates
469are pad-local. A non-empty polygon_widths_nm has one entry per polygon;
470generated semantic validation enforces that relationship. An empty array is
471equivalent to omission for generated Rust transport bindings.*/
472///
473/// <details><summary>JSON schema</summary>
474///
475/// ```json
476///{
477///  "description": "Custom pad flash shared by footprint and PCB producers. Polygon coordinates\nare pad-local. A non-empty polygon_widths_nm has one entry per polygon;\ngenerated semantic validation enforces that relationship. An empty array is\nequivalent to omission for generated Rust transport bindings.",
478///  "type": "object",
479///  "required": [
480///    "index",
481///    "kind",
482///    "layers",
483///    "mask_margin_nm",
484///    "orient_deg",
485///    "polygons",
486///    "size_x_nm",
487///    "size_y_nm",
488///    "x",
489///    "y"
490///  ],
491///  "properties": {
492///    "anchor_shape": {
493///      "type": "string"
494///    },
495///    "index": {
496///      "type": "integer",
497///      "maximum": 4294967295.0,
498///      "minimum": 0.0
499///    },
500///    "kind": {
501///      "type": "string",
502///      "const": "FlashPadCustom"
503///    },
504///    "layers": {
505///      "type": "array",
506///      "items": {
507///        "type": "string"
508///      }
509///    },
510///    "mask_margin_nm": {
511///      "$ref": "#/$defs/JavaScriptSafeInteger"
512///    },
513///    "orient_deg": {
514///      "type": "number"
515///    },
516///    "polygon_widths_nm": {
517///      "type": "array",
518///      "items": {
519///        "$ref": "#/$defs/JavaScriptSafeInteger"
520///      }
521///    },
522///    "polygons": {
523///      "type": "array",
524///      "items": {
525///        "type": "array",
526///        "items": {
527///          "$ref": "#/$defs/PlotterPoint"
528///        }
529///      }
530///    },
531///    "size_x_nm": {
532///      "$ref": "#/$defs/JavaScriptSafeInteger"
533///    },
534///    "size_y_nm": {
535///      "$ref": "#/$defs/JavaScriptSafeInteger"
536///    },
537///    "x": {
538///      "$ref": "#/$defs/JavaScriptSafeInteger"
539///    },
540///    "y": {
541///      "$ref": "#/$defs/JavaScriptSafeInteger"
542///    }
543///  },
544///  "additionalProperties": false
545///}
546/// ```
547/// </details>
548#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
549#[serde(deny_unknown_fields)]
550pub struct FlashPadCustomOperation {
551    #[serde(
552        default,
553        deserialize_with = "crate::deserialize_present_nonnull",
554        skip_serializing_if = "::std::option::Option::is_none"
555    )]
556    pub anchor_shape: ::std::option::Option<::std::string::String>,
557    pub index: u32,
558    #[serde(deserialize_with = "crate::deserialize_flash_pad_custom_kind")]
559    pub kind: ::std::string::String,
560    pub layers: ::std::vec::Vec<::std::string::String>,
561    pub mask_margin_nm: crate::JavaScriptSafeInteger,
562    pub orient_deg: f64,
563    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
564    pub polygon_widths_nm: ::std::vec::Vec<crate::JavaScriptSafeInteger>,
565    pub polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
566    pub size_x_nm: crate::JavaScriptSafeInteger,
567    pub size_y_nm: crate::JavaScriptSafeInteger,
568    pub x: crate::JavaScriptSafeInteger,
569    pub y: crate::JavaScriptSafeInteger,
570}
571///Oval pad flash shared by footprint and PCB producers.
572///
573/// <details><summary>JSON schema</summary>
574///
575/// ```json
576///{
577///  "description": "Oval pad flash shared by footprint and PCB producers.",
578///  "type": "object",
579///  "required": [
580///    "index",
581///    "kind",
582///    "layers",
583///    "mask_margin_nm",
584///    "orient_deg",
585///    "size_x_nm",
586///    "size_y_nm",
587///    "x",
588///    "y"
589///  ],
590///  "properties": {
591///    "index": {
592///      "type": "integer",
593///      "maximum": 4294967295.0,
594///      "minimum": 0.0
595///    },
596///    "kind": {
597///      "type": "string",
598///      "const": "FlashPadOval"
599///    },
600///    "layers": {
601///      "type": "array",
602///      "items": {
603///        "type": "string"
604///      }
605///    },
606///    "mask_margin_nm": {
607///      "$ref": "#/$defs/JavaScriptSafeInteger"
608///    },
609///    "orient_deg": {
610///      "type": "number"
611///    },
612///    "size_x_nm": {
613///      "$ref": "#/$defs/JavaScriptSafeInteger"
614///    },
615///    "size_y_nm": {
616///      "$ref": "#/$defs/JavaScriptSafeInteger"
617///    },
618///    "x": {
619///      "$ref": "#/$defs/JavaScriptSafeInteger"
620///    },
621///    "y": {
622///      "$ref": "#/$defs/JavaScriptSafeInteger"
623///    }
624///  },
625///  "additionalProperties": false
626///}
627/// ```
628/// </details>
629#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
630#[serde(deny_unknown_fields)]
631pub struct FlashPadOvalOperation {
632    pub index: u32,
633    #[serde(deserialize_with = "crate::deserialize_flash_pad_oval_kind")]
634    pub kind: ::std::string::String,
635    pub layers: ::std::vec::Vec<::std::string::String>,
636    pub mask_margin_nm: crate::JavaScriptSafeInteger,
637    pub orient_deg: f64,
638    pub size_x_nm: crate::JavaScriptSafeInteger,
639    pub size_y_nm: crate::JavaScriptSafeInteger,
640    pub x: crate::JavaScriptSafeInteger,
641    pub y: crate::JavaScriptSafeInteger,
642}
643///Rectangular pad flash shared by footprint and PCB producers.
644///
645/// <details><summary>JSON schema</summary>
646///
647/// ```json
648///{
649///  "description": "Rectangular pad flash shared by footprint and PCB producers.",
650///  "type": "object",
651///  "required": [
652///    "index",
653///    "kind",
654///    "layers",
655///    "mask_margin_nm",
656///    "orient_deg",
657///    "size_x_nm",
658///    "size_y_nm",
659///    "x",
660///    "y"
661///  ],
662///  "properties": {
663///    "index": {
664///      "type": "integer",
665///      "maximum": 4294967295.0,
666///      "minimum": 0.0
667///    },
668///    "kind": {
669///      "type": "string",
670///      "const": "FlashPadRect"
671///    },
672///    "layers": {
673///      "type": "array",
674///      "items": {
675///        "type": "string"
676///      }
677///    },
678///    "mask_margin_nm": {
679///      "$ref": "#/$defs/JavaScriptSafeInteger"
680///    },
681///    "orient_deg": {
682///      "type": "number"
683///    },
684///    "size_x_nm": {
685///      "$ref": "#/$defs/JavaScriptSafeInteger"
686///    },
687///    "size_y_nm": {
688///      "$ref": "#/$defs/JavaScriptSafeInteger"
689///    },
690///    "x": {
691///      "$ref": "#/$defs/JavaScriptSafeInteger"
692///    },
693///    "y": {
694///      "$ref": "#/$defs/JavaScriptSafeInteger"
695///    }
696///  },
697///  "additionalProperties": false
698///}
699/// ```
700/// </details>
701#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
702#[serde(deny_unknown_fields)]
703pub struct FlashPadRectOperation {
704    pub index: u32,
705    #[serde(deserialize_with = "crate::deserialize_flash_pad_rect_kind")]
706    pub kind: ::std::string::String,
707    pub layers: ::std::vec::Vec<::std::string::String>,
708    pub mask_margin_nm: crate::JavaScriptSafeInteger,
709    pub orient_deg: f64,
710    pub size_x_nm: crate::JavaScriptSafeInteger,
711    pub size_y_nm: crate::JavaScriptSafeInteger,
712    pub x: crate::JavaScriptSafeInteger,
713    pub y: crate::JavaScriptSafeInteger,
714}
715///Rounded-rectangle pad flash shared by footprint and PCB producers.
716///
717/// <details><summary>JSON schema</summary>
718///
719/// ```json
720///{
721///  "description": "Rounded-rectangle pad flash shared by footprint and PCB producers.",
722///  "type": "object",
723///  "required": [
724///    "corner_radius_nm",
725///    "index",
726///    "kind",
727///    "layers",
728///    "mask_margin_nm",
729///    "orient_deg",
730///    "size_x_nm",
731///    "size_y_nm",
732///    "x",
733///    "y"
734///  ],
735///  "properties": {
736///    "corner_radius_nm": {
737///      "$ref": "#/$defs/JavaScriptSafeInteger"
738///    },
739///    "index": {
740///      "type": "integer",
741///      "maximum": 4294967295.0,
742///      "minimum": 0.0
743///    },
744///    "kind": {
745///      "type": "string",
746///      "const": "FlashPadRoundRect"
747///    },
748///    "layers": {
749///      "type": "array",
750///      "items": {
751///        "type": "string"
752///      }
753///    },
754///    "mask_margin_nm": {
755///      "$ref": "#/$defs/JavaScriptSafeInteger"
756///    },
757///    "orient_deg": {
758///      "type": "number"
759///    },
760///    "size_x_nm": {
761///      "$ref": "#/$defs/JavaScriptSafeInteger"
762///    },
763///    "size_y_nm": {
764///      "$ref": "#/$defs/JavaScriptSafeInteger"
765///    },
766///    "x": {
767///      "$ref": "#/$defs/JavaScriptSafeInteger"
768///    },
769///    "y": {
770///      "$ref": "#/$defs/JavaScriptSafeInteger"
771///    }
772///  },
773///  "additionalProperties": false
774///}
775/// ```
776/// </details>
777#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
778#[serde(deny_unknown_fields)]
779pub struct FlashPadRoundRectOperation {
780    pub corner_radius_nm: crate::JavaScriptSafeInteger,
781    pub index: u32,
782    #[serde(deserialize_with = "crate::deserialize_flash_pad_round_rect_kind")]
783    pub kind: ::std::string::String,
784    pub layers: ::std::vec::Vec<::std::string::String>,
785    pub mask_margin_nm: crate::JavaScriptSafeInteger,
786    pub orient_deg: f64,
787    pub size_x_nm: crate::JavaScriptSafeInteger,
788    pub size_y_nm: crate::JavaScriptSafeInteger,
789    pub x: crate::JavaScriptSafeInteger,
790    pub y: crate::JavaScriptSafeInteger,
791}
792///Trapezoid pad flash shared by footprint and PCB producers.
793///
794/// <details><summary>JSON schema</summary>
795///
796/// ```json
797///{
798///  "description": "Trapezoid pad flash shared by footprint and PCB producers.",
799///  "type": "object",
800///  "required": [
801///    "corners",
802///    "index",
803///    "kind",
804///    "layers",
805///    "mask_margin_nm",
806///    "orient_deg",
807///    "x",
808///    "y"
809///  ],
810///  "properties": {
811///    "corners": {
812///      "$ref": "#/$defs/PlotterQuad"
813///    },
814///    "index": {
815///      "type": "integer",
816///      "maximum": 4294967295.0,
817///      "minimum": 0.0
818///    },
819///    "kind": {
820///      "type": "string",
821///      "const": "FlashPadTrapez"
822///    },
823///    "layers": {
824///      "type": "array",
825///      "items": {
826///        "type": "string"
827///      }
828///    },
829///    "mask_margin_nm": {
830///      "$ref": "#/$defs/JavaScriptSafeInteger"
831///    },
832///    "orient_deg": {
833///      "type": "number"
834///    },
835///    "x": {
836///      "$ref": "#/$defs/JavaScriptSafeInteger"
837///    },
838///    "y": {
839///      "$ref": "#/$defs/JavaScriptSafeInteger"
840///    }
841///  },
842///  "additionalProperties": false
843///}
844/// ```
845/// </details>
846#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
847#[serde(deny_unknown_fields)]
848pub struct FlashPadTrapezOperation {
849    pub corners: PlotterQuad,
850    pub index: u32,
851    #[serde(deserialize_with = "crate::deserialize_flash_pad_trapez_kind")]
852    pub kind: ::std::string::String,
853    pub layers: ::std::vec::Vec<::std::string::String>,
854    pub mask_margin_nm: crate::JavaScriptSafeInteger,
855    pub orient_deg: f64,
856    pub x: crate::JavaScriptSafeInteger,
857    pub y: crate::JavaScriptSafeInteger,
858}
859/**Strict standalone-footprint subset of kicad.plotter_ir.a0. Producers and
860consumers must run generated semantic validation after structural decoding.*/
861///
862/// <details><summary>JSON schema</summary>
863///
864/// ```json
865///{
866///  "$id": "urn:wavenumber:schema:kicad_monkey.footprint_plot.document:a0",
867///  "title": "Footprint plot document a0",
868///  "description": "Strict standalone-footprint subset of kicad.plotter_ir.a0. Producers and\nconsumers must run generated semantic validation after structural decoding.",
869///  "type": "object",
870///  "required": [
871///    "coordinate_space",
872///    "document_id",
873///    "generator",
874///    "generator_version",
875///    "records",
876///    "schema",
877///    "source_kind",
878///    "total_operations",
879///    "version"
880///  ],
881///  "properties": {
882///    "coordinate_space": {
883///      "$ref": "#/$defs/PlotterCoordinateSpace"
884///    },
885///    "document_id": {
886///      "type": "string"
887///    },
888///    "generator": {
889///      "type": "string"
890///    },
891///    "generator_version": {
892///      "type": "string"
893///    },
894///    "records": {
895///      "type": "array",
896///      "items": {
897///        "$ref": "#/$defs/FootprintPlotRecord"
898///      }
899///    },
900///    "schema": {
901///      "type": "string",
902///      "const": "kicad.plotter_ir.a0"
903///    },
904///    "source_kind": {
905///      "type": "string",
906///      "const": "MOD"
907///    },
908///    "source_path": {
909///      "type": "string"
910///    },
911///    "total_operations": {
912///      "type": "integer",
913///      "maximum": 4294967295.0,
914///      "minimum": 0.0
915///    },
916///    "version": {
917///      "$ref": "#/$defs/JavaScriptSafeInteger"
918///    }
919///  },
920///  "additionalProperties": false
921///}
922/// ```
923/// </details>
924#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
925#[serde(deny_unknown_fields)]
926pub struct FootprintPlotDocumentA0 {
927    pub coordinate_space: PlotterCoordinateSpace,
928    pub document_id: ::std::string::String,
929    pub generator: ::std::string::String,
930    pub generator_version: ::std::string::String,
931    pub records: ::std::vec::Vec<FootprintPlotRecord>,
932    pub schema: ::std::string::String,
933    pub source_kind: ::std::string::String,
934    #[serde(
935        default,
936        deserialize_with = "crate::deserialize_present_nonnull",
937        skip_serializing_if = "::std::option::Option::is_none"
938    )]
939    pub source_path: ::std::option::Option<::std::string::String>,
940    pub total_operations: u32,
941    pub version: crate::JavaScriptSafeInteger,
942}
943///One standalone footprint record in canonical text/geometry/pad order.
944///
945/// <details><summary>JSON schema</summary>
946///
947/// ```json
948///{
949///  "description": "One standalone footprint record in canonical text/geometry/pad order.",
950///  "type": "object",
951///  "required": [
952///    "attr",
953///    "descr",
954///    "kind",
955///    "layer",
956///    "locked",
957///    "name",
958///    "object_id",
959///    "operation_count",
960///    "operations",
961///    "placed",
962///    "tags",
963///    "uuid"
964///  ],
965///  "properties": {
966///    "attr": {
967///      "type": "array",
968///      "items": {
969///        "type": "string"
970///      }
971///    },
972///    "descr": {
973///      "type": "string"
974///    },
975///    "kind": {
976///      "type": "string",
977///      "const": "footprint"
978///    },
979///    "layer": {
980///      "type": "string"
981///    },
982///    "locked": {
983///      "type": "boolean"
984///    },
985///    "name": {
986///      "type": "string"
987///    },
988///    "object_id": {
989///      "type": "string"
990///    },
991///    "operation_count": {
992///      "type": "integer",
993///      "maximum": 4294967295.0,
994///      "minimum": 0.0
995///    },
996///    "operations": {
997///      "type": "array",
998///      "items": {
999///        "$ref": "#/$defs/PlotterOperation"
1000///      }
1001///    },
1002///    "placed": {
1003///      "type": "boolean"
1004///    },
1005///    "tags": {
1006///      "type": "string"
1007///    },
1008///    "uuid": {
1009///      "type": "string"
1010///    }
1011///  },
1012///  "additionalProperties": false
1013///}
1014/// ```
1015/// </details>
1016#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1017#[serde(deny_unknown_fields)]
1018pub struct FootprintPlotRecord {
1019    pub attr: ::std::vec::Vec<::std::string::String>,
1020    pub descr: ::std::string::String,
1021    pub kind: ::std::string::String,
1022    pub layer: ::std::string::String,
1023    pub locked: bool,
1024    pub name: ::std::string::String,
1025    pub object_id: ::std::string::String,
1026    pub operation_count: u32,
1027    pub operations: ::std::vec::Vec<PlotterOperation>,
1028    pub placed: bool,
1029    pub tags: ::std::string::String,
1030    pub uuid: ::std::string::String,
1031}
1032///Decoded image placement shared by worksheet and schematic producers.
1033///
1034/// <details><summary>JSON schema</summary>
1035///
1036/// ```json
1037///{
1038///  "description": "Decoded image placement shared by worksheet and schematic producers.",
1039///  "type": "object",
1040///  "required": [
1041///    "height_nm",
1042///    "image_data_b64",
1043///    "image_format",
1044///    "index",
1045///    "kind",
1046///    "scale",
1047///    "width_nm",
1048///    "x",
1049///    "y"
1050///  ],
1051///  "properties": {
1052///    "height_nm": {
1053///      "$ref": "#/$defs/JavaScriptSafeInteger"
1054///    },
1055///    "image_data_b64": {
1056///      "type": "string"
1057///    },
1058///    "image_format": {
1059///      "type": "string"
1060///    },
1061///    "index": {
1062///      "type": "integer",
1063///      "maximum": 4294967295.0,
1064///      "minimum": 0.0
1065///    },
1066///    "kind": {
1067///      "type": "string",
1068///      "const": "PlotImage"
1069///    },
1070///    "scale": {
1071///      "type": "number"
1072///    },
1073///    "stroke_color": {
1074///      "type": "string"
1075///    },
1076///    "width_nm": {
1077///      "$ref": "#/$defs/JavaScriptSafeInteger"
1078///    },
1079///    "x": {
1080///      "$ref": "#/$defs/JavaScriptSafeInteger"
1081///    },
1082///    "y": {
1083///      "$ref": "#/$defs/JavaScriptSafeInteger"
1084///    }
1085///  },
1086///  "additionalProperties": false
1087///}
1088/// ```
1089/// </details>
1090#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1091#[serde(deny_unknown_fields)]
1092pub struct PlotImageOperation {
1093    pub height_nm: crate::JavaScriptSafeInteger,
1094    pub image_data_b64: ::std::string::String,
1095    pub image_format: ::std::string::String,
1096    pub index: u32,
1097    #[serde(deserialize_with = "crate::deserialize_plot_image_kind")]
1098    pub kind: ::std::string::String,
1099    pub scale: f64,
1100    #[serde(
1101        default,
1102        deserialize_with = "crate::deserialize_present_nonnull",
1103        skip_serializing_if = "::std::option::Option::is_none"
1104    )]
1105    pub stroke_color: ::std::option::Option<::std::string::String>,
1106    pub width_nm: crate::JavaScriptSafeInteger,
1107    pub x: crate::JavaScriptSafeInteger,
1108    pub y: crate::JavaScriptSafeInteger,
1109}
1110///Filled or outlined polygon operation.
1111///
1112/// <details><summary>JSON schema</summary>
1113///
1114/// ```json
1115///{
1116///  "description": "Filled or outlined polygon operation.",
1117///  "type": "object",
1118///  "required": [
1119///    "fill",
1120///    "index",
1121///    "kind",
1122///    "points",
1123///    "width_nm"
1124///  ],
1125///  "properties": {
1126///    "fill": {
1127///      "$ref": "#/$defs/PlotterFill"
1128///    },
1129///    "fill_color": {
1130///      "type": "string"
1131///    },
1132///    "index": {
1133///      "type": "integer",
1134///      "maximum": 4294967295.0,
1135///      "minimum": 0.0
1136///    },
1137///    "kind": {
1138///      "type": "string",
1139///      "const": "PlotPoly"
1140///    },
1141///    "layer": {
1142///      "type": "string"
1143///    },
1144///    "line_style": {
1145///      "$ref": "#/$defs/PlotterLineStyle"
1146///    },
1147///    "points": {
1148///      "type": "array",
1149///      "items": {
1150///        "$ref": "#/$defs/PlotterPoint"
1151///      }
1152///    },
1153///    "stroke_color": {
1154///      "type": "string"
1155///    },
1156///    "width_nm": {
1157///      "$ref": "#/$defs/JavaScriptSafeInteger"
1158///    }
1159///  },
1160///  "additionalProperties": false
1161///}
1162/// ```
1163/// </details>
1164#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1165#[serde(deny_unknown_fields)]
1166pub struct PlotPolyOperation {
1167    pub fill: PlotterFill,
1168    #[serde(
1169        default,
1170        deserialize_with = "crate::deserialize_present_nonnull",
1171        skip_serializing_if = "::std::option::Option::is_none"
1172    )]
1173    pub fill_color: ::std::option::Option<::std::string::String>,
1174    pub index: u32,
1175    #[serde(deserialize_with = "crate::deserialize_plot_poly_kind")]
1176    pub kind: ::std::string::String,
1177    #[serde(
1178        default,
1179        deserialize_with = "crate::deserialize_present_nonnull",
1180        skip_serializing_if = "::std::option::Option::is_none"
1181    )]
1182    pub layer: ::std::option::Option<::std::string::String>,
1183    #[serde(
1184        default,
1185        deserialize_with = "crate::deserialize_present_nonnull",
1186        skip_serializing_if = "::std::option::Option::is_none"
1187    )]
1188    pub line_style: ::std::option::Option<PlotterLineStyle>,
1189    pub points: ::std::vec::Vec<PlotterPoint>,
1190    #[serde(
1191        default,
1192        deserialize_with = "crate::deserialize_present_nonnull",
1193        skip_serializing_if = "::std::option::Option::is_none"
1194    )]
1195    pub stroke_color: ::std::option::Option<::std::string::String>,
1196    pub width_nm: crate::JavaScriptSafeInteger,
1197}
1198///Coordinate convention for the footprint plotter slice.
1199///
1200/// <details><summary>JSON schema</summary>
1201///
1202/// ```json
1203///{
1204///  "description": "Coordinate convention for the footprint plotter slice.",
1205///  "type": "object",
1206///  "required": [
1207///    "unit",
1208///    "y_axis"
1209///  ],
1210///  "properties": {
1211///    "unit": {
1212///      "type": "string",
1213///      "const": "nm"
1214///    },
1215///    "y_axis": {
1216///      "type": "string",
1217///      "const": "down"
1218///    }
1219///  },
1220///  "additionalProperties": false
1221///}
1222/// ```
1223/// </details>
1224#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1225#[serde(deny_unknown_fields)]
1226pub struct PlotterCoordinateSpace {
1227    pub unit: ::std::string::String,
1228    pub y_axis: ::std::string::String,
1229}
1230///Semantic roles allowed on shared circle and segment drill operations.
1231///
1232/// <details><summary>JSON schema</summary>
1233///
1234/// ```json
1235///{
1236///  "description": "Semantic roles allowed on shared circle and segment drill operations.",
1237///  "type": "string",
1238///  "enum": [
1239///    "pad_drill",
1240///    "npth_hole",
1241///    "via_drill",
1242///    "via_mask_drill"
1243///  ]
1244///}
1245/// ```
1246/// </details>
1247#[derive(
1248    ::serde::Deserialize,
1249    ::serde::Serialize,
1250    Clone,
1251    Copy,
1252    Debug,
1253    Eq,
1254    Hash,
1255    Ord,
1256    PartialEq,
1257    PartialOrd,
1258)]
1259pub enum PlotterDrillRole {
1260    #[serde(rename = "pad_drill")]
1261    PadDrill,
1262    #[serde(rename = "npth_hole")]
1263    NpthHole,
1264    #[serde(rename = "via_drill")]
1265    ViaDrill,
1266    #[serde(rename = "via_mask_drill")]
1267    ViaMaskDrill,
1268}
1269impl ::std::fmt::Display for PlotterDrillRole {
1270    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1271        match *self {
1272            Self::PadDrill => f.write_str("pad_drill"),
1273            Self::NpthHole => f.write_str("npth_hole"),
1274            Self::ViaDrill => f.write_str("via_drill"),
1275            Self::ViaMaskDrill => f.write_str("via_mask_drill"),
1276        }
1277    }
1278}
1279impl ::std::str::FromStr for PlotterDrillRole {
1280    type Err = self::error::ConversionError;
1281    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1282        match value {
1283            "pad_drill" => Ok(Self::PadDrill),
1284            "npth_hole" => Ok(Self::NpthHole),
1285            "via_drill" => Ok(Self::ViaDrill),
1286            "via_mask_drill" => Ok(Self::ViaMaskDrill),
1287            _ => Err("invalid value".into()),
1288        }
1289    }
1290}
1291impl ::std::convert::TryFrom<&str> for PlotterDrillRole {
1292    type Error = self::error::ConversionError;
1293    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1294        value.parse()
1295    }
1296}
1297impl ::std::convert::TryFrom<&::std::string::String> for PlotterDrillRole {
1298    type Error = self::error::ConversionError;
1299    fn try_from(
1300        value: &::std::string::String,
1301    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1302        value.parse()
1303    }
1304}
1305impl ::std::convert::TryFrom<::std::string::String> for PlotterDrillRole {
1306    type Error = self::error::ConversionError;
1307    fn try_from(
1308        value: ::std::string::String,
1309    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1310        value.parse()
1311    }
1312}
1313///Fill values shared by plotter operation producers.
1314///
1315/// <details><summary>JSON schema</summary>
1316///
1317/// ```json
1318///{
1319///  "description": "Fill values shared by plotter operation producers.",
1320///  "type": "string",
1321///  "enum": [
1322///    "NO_FILL",
1323///    "FILLED_SHAPE",
1324///    "FILLED_WITH_BG_BODYCOLOR",
1325///    "FILLED_WITH_COLOR",
1326///    "HATCH",
1327///    "REVERSE_HATCH",
1328///    "CROSS_HATCH"
1329///  ]
1330///}
1331/// ```
1332/// </details>
1333#[derive(
1334    ::serde::Deserialize,
1335    ::serde::Serialize,
1336    Clone,
1337    Copy,
1338    Debug,
1339    Eq,
1340    Hash,
1341    Ord,
1342    PartialEq,
1343    PartialOrd,
1344)]
1345pub enum PlotterFill {
1346    #[serde(rename = "NO_FILL")]
1347    NoFill,
1348    #[serde(rename = "FILLED_SHAPE")]
1349    FilledShape,
1350    #[serde(rename = "FILLED_WITH_BG_BODYCOLOR")]
1351    FilledWithBgBodycolor,
1352    #[serde(rename = "FILLED_WITH_COLOR")]
1353    FilledWithColor,
1354    #[serde(rename = "HATCH")]
1355    Hatch,
1356    #[serde(rename = "REVERSE_HATCH")]
1357    ReverseHatch,
1358    #[serde(rename = "CROSS_HATCH")]
1359    CrossHatch,
1360}
1361impl ::std::fmt::Display for PlotterFill {
1362    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1363        match *self {
1364            Self::NoFill => f.write_str("NO_FILL"),
1365            Self::FilledShape => f.write_str("FILLED_SHAPE"),
1366            Self::FilledWithBgBodycolor => f.write_str("FILLED_WITH_BG_BODYCOLOR"),
1367            Self::FilledWithColor => f.write_str("FILLED_WITH_COLOR"),
1368            Self::Hatch => f.write_str("HATCH"),
1369            Self::ReverseHatch => f.write_str("REVERSE_HATCH"),
1370            Self::CrossHatch => f.write_str("CROSS_HATCH"),
1371        }
1372    }
1373}
1374impl ::std::str::FromStr for PlotterFill {
1375    type Err = self::error::ConversionError;
1376    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1377        match value {
1378            "NO_FILL" => Ok(Self::NoFill),
1379            "FILLED_SHAPE" => Ok(Self::FilledShape),
1380            "FILLED_WITH_BG_BODYCOLOR" => Ok(Self::FilledWithBgBodycolor),
1381            "FILLED_WITH_COLOR" => Ok(Self::FilledWithColor),
1382            "HATCH" => Ok(Self::Hatch),
1383            "REVERSE_HATCH" => Ok(Self::ReverseHatch),
1384            "CROSS_HATCH" => Ok(Self::CrossHatch),
1385            _ => Err("invalid value".into()),
1386        }
1387    }
1388}
1389impl ::std::convert::TryFrom<&str> for PlotterFill {
1390    type Error = self::error::ConversionError;
1391    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1392        value.parse()
1393    }
1394}
1395impl ::std::convert::TryFrom<&::std::string::String> for PlotterFill {
1396    type Error = self::error::ConversionError;
1397    fn try_from(
1398        value: &::std::string::String,
1399    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1400        value.parse()
1401    }
1402}
1403impl ::std::convert::TryFrom<::std::string::String> for PlotterFill {
1404    type Error = self::error::ConversionError;
1405    fn try_from(
1406        value: ::std::string::String,
1407    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1408        value.parse()
1409    }
1410}
1411///One exact hyperlink attached to an authored plotter text carrier.
1412///
1413/// <details><summary>JSON schema</summary>
1414///
1415/// ```json
1416///{
1417///  "description": "One exact hyperlink attached to an authored plotter text carrier.",
1418///  "type": "object",
1419///  "required": [
1420///    "href"
1421///  ],
1422///  "properties": {
1423///    "href": {
1424///      "type": "string",
1425///      "minLength": 1
1426///    }
1427///  },
1428///  "additionalProperties": false
1429///}
1430/// ```
1431/// </details>
1432#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1433#[serde(deny_unknown_fields)]
1434pub struct PlotterHyperlink {
1435    pub href: PlotterHyperlinkHref,
1436}
1437///`PlotterHyperlinkHref`
1438///
1439/// <details><summary>JSON schema</summary>
1440///
1441/// ```json
1442///{
1443///  "type": "string",
1444///  "minLength": 1
1445///}
1446/// ```
1447/// </details>
1448#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1449#[serde(transparent)]
1450pub struct PlotterHyperlinkHref(::std::string::String);
1451impl ::std::ops::Deref for PlotterHyperlinkHref {
1452    type Target = ::std::string::String;
1453    fn deref(&self) -> &::std::string::String {
1454        &self.0
1455    }
1456}
1457impl ::std::convert::From<PlotterHyperlinkHref> for ::std::string::String {
1458    fn from(value: PlotterHyperlinkHref) -> Self {
1459        value.0
1460    }
1461}
1462impl ::std::str::FromStr for PlotterHyperlinkHref {
1463    type Err = self::error::ConversionError;
1464    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1465        if value.chars().count() < 1usize {
1466            return Err("shorter than 1 characters".into());
1467        }
1468        Ok(Self(value.to_string()))
1469    }
1470}
1471impl ::std::convert::TryFrom<&str> for PlotterHyperlinkHref {
1472    type Error = self::error::ConversionError;
1473    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1474        value.parse()
1475    }
1476}
1477impl ::std::convert::TryFrom<&::std::string::String> for PlotterHyperlinkHref {
1478    type Error = self::error::ConversionError;
1479    fn try_from(
1480        value: &::std::string::String,
1481    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1482        value.parse()
1483    }
1484}
1485impl ::std::convert::TryFrom<::std::string::String> for PlotterHyperlinkHref {
1486    type Error = self::error::ConversionError;
1487    fn try_from(
1488        value: ::std::string::String,
1489    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1490        value.parse()
1491    }
1492}
1493impl<'de> ::serde::Deserialize<'de> for PlotterHyperlinkHref {
1494    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1495    where
1496        D: ::serde::Deserializer<'de>,
1497    {
1498        ::std::string::String::deserialize(deserializer)?
1499            .parse()
1500            .map_err(|e: self::error::ConversionError| {
1501                <D::Error as ::serde::de::Error>::custom(e.to_string())
1502            })
1503    }
1504}
1505///KiCad stroke styles carried without producer-specific decomposition.
1506///
1507/// <details><summary>JSON schema</summary>
1508///
1509/// ```json
1510///{
1511///  "description": "KiCad stroke styles carried without producer-specific decomposition.",
1512///  "type": "string",
1513///  "enum": [
1514///    "DEFAULT",
1515///    "SOLID",
1516///    "DASH",
1517///    "DOT",
1518///    "DASH_DOT",
1519///    "DASH_DOT_DOT"
1520///  ]
1521///}
1522/// ```
1523/// </details>
1524#[derive(
1525    ::serde::Deserialize,
1526    ::serde::Serialize,
1527    Clone,
1528    Copy,
1529    Debug,
1530    Eq,
1531    Hash,
1532    Ord,
1533    PartialEq,
1534    PartialOrd,
1535)]
1536pub enum PlotterLineStyle {
1537    #[serde(rename = "DEFAULT")]
1538    Default,
1539    #[serde(rename = "SOLID")]
1540    Solid,
1541    #[serde(rename = "DASH")]
1542    Dash,
1543    #[serde(rename = "DOT")]
1544    Dot,
1545    #[serde(rename = "DASH_DOT")]
1546    DashDot,
1547    #[serde(rename = "DASH_DOT_DOT")]
1548    DashDotDot,
1549}
1550impl ::std::fmt::Display for PlotterLineStyle {
1551    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1552        match *self {
1553            Self::Default => f.write_str("DEFAULT"),
1554            Self::Solid => f.write_str("SOLID"),
1555            Self::Dash => f.write_str("DASH"),
1556            Self::Dot => f.write_str("DOT"),
1557            Self::DashDot => f.write_str("DASH_DOT"),
1558            Self::DashDotDot => f.write_str("DASH_DOT_DOT"),
1559        }
1560    }
1561}
1562impl ::std::str::FromStr for PlotterLineStyle {
1563    type Err = self::error::ConversionError;
1564    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1565        match value {
1566            "DEFAULT" => Ok(Self::Default),
1567            "SOLID" => Ok(Self::Solid),
1568            "DASH" => Ok(Self::Dash),
1569            "DOT" => Ok(Self::Dot),
1570            "DASH_DOT" => Ok(Self::DashDot),
1571            "DASH_DOT_DOT" => Ok(Self::DashDotDot),
1572            _ => Err("invalid value".into()),
1573        }
1574    }
1575}
1576impl ::std::convert::TryFrom<&str> for PlotterLineStyle {
1577    type Error = self::error::ConversionError;
1578    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1579        value.parse()
1580    }
1581}
1582impl ::std::convert::TryFrom<&::std::string::String> for PlotterLineStyle {
1583    type Error = self::error::ConversionError;
1584    fn try_from(
1585        value: &::std::string::String,
1586    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1587        value.parse()
1588    }
1589}
1590impl ::std::convert::TryFrom<::std::string::String> for PlotterLineStyle {
1591    type Error = self::error::ConversionError;
1592    fn try_from(
1593        value: ::std::string::String,
1594    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1595        value.parse()
1596    }
1597}
1598///Shared plotter operation vocabulary promoted across source producers.
1599///
1600/// <details><summary>JSON schema</summary>
1601///
1602/// ```json
1603///{
1604///  "description": "Shared plotter operation vocabulary promoted across source producers.",
1605///  "anyOf": [
1606///    {
1607///      "$ref": "#/$defs/ThickSegmentOperation"
1608///    },
1609///    {
1610///      "$ref": "#/$defs/ArcThreePointOperation"
1611///    },
1612///    {
1613///      "$ref": "#/$defs/CircleOperation"
1614///    },
1615///    {
1616///      "$ref": "#/$defs/RectOperation"
1617///    },
1618///    {
1619///      "$ref": "#/$defs/PlotPolyOperation"
1620///    },
1621///    {
1622///      "$ref": "#/$defs/BezierCurveOperation"
1623///    },
1624///    {
1625///      "$ref": "#/$defs/TextOperation"
1626///    },
1627///    {
1628///      "$ref": "#/$defs/PlotImageOperation"
1629///    },
1630///    {
1631///      "$ref": "#/$defs/FlashPadCircleOperation"
1632///    },
1633///    {
1634///      "$ref": "#/$defs/FlashPadOvalOperation"
1635///    },
1636///    {
1637///      "$ref": "#/$defs/FlashPadRectOperation"
1638///    },
1639///    {
1640///      "$ref": "#/$defs/FlashPadRoundRectOperation"
1641///    },
1642///    {
1643///      "$ref": "#/$defs/FlashPadCustomOperation"
1644///    },
1645///    {
1646///      "$ref": "#/$defs/FlashPadTrapezOperation"
1647///    }
1648///  ]
1649///}
1650/// ```
1651/// </details>
1652#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1653#[serde(untagged)]
1654pub enum PlotterOperation {
1655    ThickSegmentOperation(ThickSegmentOperation),
1656    ArcThreePointOperation(ArcThreePointOperation),
1657    CircleOperation(CircleOperation),
1658    RectOperation(RectOperation),
1659    PlotPolyOperation(PlotPolyOperation),
1660    BezierCurveOperation(BezierCurveOperation),
1661    TextOperation(TextOperation),
1662    PlotImageOperation(PlotImageOperation),
1663    FlashPadCircleOperation(FlashPadCircleOperation),
1664    FlashPadOvalOperation(FlashPadOvalOperation),
1665    FlashPadRectOperation(FlashPadRectOperation),
1666    FlashPadRoundRectOperation(FlashPadRoundRectOperation),
1667    FlashPadCustomOperation(FlashPadCustomOperation),
1668    FlashPadTrapezOperation(FlashPadTrapezOperation),
1669}
1670impl ::std::convert::From<ThickSegmentOperation> for PlotterOperation {
1671    fn from(value: ThickSegmentOperation) -> Self {
1672        Self::ThickSegmentOperation(value)
1673    }
1674}
1675impl ::std::convert::From<ArcThreePointOperation> for PlotterOperation {
1676    fn from(value: ArcThreePointOperation) -> Self {
1677        Self::ArcThreePointOperation(value)
1678    }
1679}
1680impl ::std::convert::From<CircleOperation> for PlotterOperation {
1681    fn from(value: CircleOperation) -> Self {
1682        Self::CircleOperation(value)
1683    }
1684}
1685impl ::std::convert::From<RectOperation> for PlotterOperation {
1686    fn from(value: RectOperation) -> Self {
1687        Self::RectOperation(value)
1688    }
1689}
1690impl ::std::convert::From<PlotPolyOperation> for PlotterOperation {
1691    fn from(value: PlotPolyOperation) -> Self {
1692        Self::PlotPolyOperation(value)
1693    }
1694}
1695impl ::std::convert::From<BezierCurveOperation> for PlotterOperation {
1696    fn from(value: BezierCurveOperation) -> Self {
1697        Self::BezierCurveOperation(value)
1698    }
1699}
1700impl ::std::convert::From<TextOperation> for PlotterOperation {
1701    fn from(value: TextOperation) -> Self {
1702        Self::TextOperation(value)
1703    }
1704}
1705impl ::std::convert::From<PlotImageOperation> for PlotterOperation {
1706    fn from(value: PlotImageOperation) -> Self {
1707        Self::PlotImageOperation(value)
1708    }
1709}
1710impl ::std::convert::From<FlashPadCircleOperation> for PlotterOperation {
1711    fn from(value: FlashPadCircleOperation) -> Self {
1712        Self::FlashPadCircleOperation(value)
1713    }
1714}
1715impl ::std::convert::From<FlashPadOvalOperation> for PlotterOperation {
1716    fn from(value: FlashPadOvalOperation) -> Self {
1717        Self::FlashPadOvalOperation(value)
1718    }
1719}
1720impl ::std::convert::From<FlashPadRectOperation> for PlotterOperation {
1721    fn from(value: FlashPadRectOperation) -> Self {
1722        Self::FlashPadRectOperation(value)
1723    }
1724}
1725impl ::std::convert::From<FlashPadRoundRectOperation> for PlotterOperation {
1726    fn from(value: FlashPadRoundRectOperation) -> Self {
1727        Self::FlashPadRoundRectOperation(value)
1728    }
1729}
1730impl ::std::convert::From<FlashPadCustomOperation> for PlotterOperation {
1731    fn from(value: FlashPadCustomOperation) -> Self {
1732        Self::FlashPadCustomOperation(value)
1733    }
1734}
1735impl ::std::convert::From<FlashPadTrapezOperation> for PlotterOperation {
1736    fn from(value: FlashPadTrapezOperation) -> Self {
1737        Self::FlashPadTrapezOperation(value)
1738    }
1739}
1740///Strict operation-local context emitted by current plotter producers.
1741///
1742/// <details><summary>JSON schema</summary>
1743///
1744/// ```json
1745///{
1746///  "description": "Strict operation-local context emitted by current plotter producers.",
1747///  "type": "object",
1748///  "required": [
1749///    "hyperlink"
1750///  ],
1751///  "properties": {
1752///    "hyperlink": {
1753///      "$ref": "#/$defs/PlotterHyperlink"
1754///    }
1755///  },
1756///  "additionalProperties": false
1757///}
1758/// ```
1759/// </details>
1760#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1761#[serde(deny_unknown_fields)]
1762pub struct PlotterOperationContext {
1763    pub hyperlink: PlotterHyperlink,
1764}
1765///Plotter point encoded as an exact coordinate pair.
1766///
1767/// <details><summary>JSON schema</summary>
1768///
1769/// ```json
1770///{
1771///  "description": "Plotter point encoded as an exact coordinate pair.",
1772///  "type": "array",
1773///  "items": {
1774///    "$ref": "#/$defs/JavaScriptSafeInteger"
1775///  },
1776///  "maxItems": 2,
1777///  "minItems": 2
1778///}
1779/// ```
1780/// </details>
1781#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1782#[serde(transparent)]
1783pub struct PlotterPoint(pub [crate::JavaScriptSafeInteger; 2usize]);
1784impl ::std::ops::Deref for PlotterPoint {
1785    type Target = [crate::JavaScriptSafeInteger; 2usize];
1786    fn deref(&self) -> &[crate::JavaScriptSafeInteger; 2usize] {
1787        &self.0
1788    }
1789}
1790impl ::std::convert::From<PlotterPoint> for [crate::JavaScriptSafeInteger; 2usize] {
1791    fn from(value: PlotterPoint) -> Self {
1792        value.0
1793    }
1794}
1795impl ::std::convert::From<[crate::JavaScriptSafeInteger; 2usize]> for PlotterPoint {
1796    fn from(value: [crate::JavaScriptSafeInteger; 2usize]) -> Self {
1797        Self(value)
1798    }
1799}
1800///Four pad-local trapezoid corners.
1801///
1802/// <details><summary>JSON schema</summary>
1803///
1804/// ```json
1805///{
1806///  "description": "Four pad-local trapezoid corners.",
1807///  "type": "array",
1808///  "items": {
1809///    "$ref": "#/$defs/PlotterPoint"
1810///  },
1811///  "maxItems": 4,
1812///  "minItems": 4
1813///}
1814/// ```
1815/// </details>
1816#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1817#[serde(transparent)]
1818pub struct PlotterQuad(pub [PlotterPoint; 4usize]);
1819impl ::std::ops::Deref for PlotterQuad {
1820    type Target = [PlotterPoint; 4usize];
1821    fn deref(&self) -> &[PlotterPoint; 4usize] {
1822        &self.0
1823    }
1824}
1825impl ::std::convert::From<PlotterQuad> for [PlotterPoint; 4usize] {
1826    fn from(value: PlotterQuad) -> Self {
1827        value.0
1828    }
1829}
1830impl ::std::convert::From<[PlotterPoint; 4usize]> for PlotterQuad {
1831    fn from(value: [PlotterPoint; 4usize]) -> Self {
1832        Self(value)
1833    }
1834}
1835///Horizontal text alignments emitted by the board producers.
1836///
1837/// <details><summary>JSON schema</summary>
1838///
1839/// ```json
1840///{
1841///  "description": "Horizontal text alignments emitted by the board producers.",
1842///  "type": "string",
1843///  "enum": [
1844///    "GR_TEXT_H_ALIGN_LEFT",
1845///    "GR_TEXT_H_ALIGN_CENTER",
1846///    "GR_TEXT_H_ALIGN_RIGHT"
1847///  ]
1848///}
1849/// ```
1850/// </details>
1851#[derive(
1852    ::serde::Deserialize,
1853    ::serde::Serialize,
1854    Clone,
1855    Copy,
1856    Debug,
1857    Eq,
1858    Hash,
1859    Ord,
1860    PartialEq,
1861    PartialOrd,
1862)]
1863pub enum PlotterTextHAlign {
1864    #[serde(rename = "GR_TEXT_H_ALIGN_LEFT")]
1865    GrTextHAlignLeft,
1866    #[serde(rename = "GR_TEXT_H_ALIGN_CENTER")]
1867    GrTextHAlignCenter,
1868    #[serde(rename = "GR_TEXT_H_ALIGN_RIGHT")]
1869    GrTextHAlignRight,
1870}
1871impl ::std::fmt::Display for PlotterTextHAlign {
1872    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1873        match *self {
1874            Self::GrTextHAlignLeft => f.write_str("GR_TEXT_H_ALIGN_LEFT"),
1875            Self::GrTextHAlignCenter => f.write_str("GR_TEXT_H_ALIGN_CENTER"),
1876            Self::GrTextHAlignRight => f.write_str("GR_TEXT_H_ALIGN_RIGHT"),
1877        }
1878    }
1879}
1880impl ::std::str::FromStr for PlotterTextHAlign {
1881    type Err = self::error::ConversionError;
1882    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1883        match value {
1884            "GR_TEXT_H_ALIGN_LEFT" => Ok(Self::GrTextHAlignLeft),
1885            "GR_TEXT_H_ALIGN_CENTER" => Ok(Self::GrTextHAlignCenter),
1886            "GR_TEXT_H_ALIGN_RIGHT" => Ok(Self::GrTextHAlignRight),
1887            _ => Err("invalid value".into()),
1888        }
1889    }
1890}
1891impl ::std::convert::TryFrom<&str> for PlotterTextHAlign {
1892    type Error = self::error::ConversionError;
1893    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1894        value.parse()
1895    }
1896}
1897impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextHAlign {
1898    type Error = self::error::ConversionError;
1899    fn try_from(
1900        value: &::std::string::String,
1901    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1902        value.parse()
1903    }
1904}
1905impl ::std::convert::TryFrom<::std::string::String> for PlotterTextHAlign {
1906    type Error = self::error::ConversionError;
1907    fn try_from(
1908        value: ::std::string::String,
1909    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1910        value.parse()
1911    }
1912}
1913///Coordinate space carried by one typed text render cache.
1914///
1915/// <details><summary>JSON schema</summary>
1916///
1917/// ```json
1918///{
1919///  "description": "Coordinate space carried by one typed text render cache.",
1920///  "type": "string",
1921///  "enum": [
1922///    "board",
1923///    "footprint_local"
1924///  ]
1925///}
1926/// ```
1927/// </details>
1928#[derive(
1929    ::serde::Deserialize,
1930    ::serde::Serialize,
1931    Clone,
1932    Copy,
1933    Debug,
1934    Eq,
1935    Hash,
1936    Ord,
1937    PartialEq,
1938    PartialOrd,
1939)]
1940pub enum PlotterTextRenderCacheCoordinateSpace {
1941    #[serde(rename = "board")]
1942    Board,
1943    #[serde(rename = "footprint_local")]
1944    FootprintLocal,
1945}
1946impl ::std::fmt::Display for PlotterTextRenderCacheCoordinateSpace {
1947    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1948        match *self {
1949            Self::Board => f.write_str("board"),
1950            Self::FootprintLocal => f.write_str("footprint_local"),
1951        }
1952    }
1953}
1954impl ::std::str::FromStr for PlotterTextRenderCacheCoordinateSpace {
1955    type Err = self::error::ConversionError;
1956    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1957        match value {
1958            "board" => Ok(Self::Board),
1959            "footprint_local" => Ok(Self::FootprintLocal),
1960            _ => Err("invalid value".into()),
1961        }
1962    }
1963}
1964impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheCoordinateSpace {
1965    type Error = self::error::ConversionError;
1966    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1967        value.parse()
1968    }
1969}
1970impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1971    type Error = self::error::ConversionError;
1972    fn try_from(
1973        value: &::std::string::String,
1974    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1975        value.parse()
1976    }
1977}
1978impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1979    type Error = self::error::ConversionError;
1980    fn try_from(
1981        value: ::std::string::String,
1982    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1983        value.parse()
1984    }
1985}
1986///Provenance of one attached text render cache.
1987///
1988/// <details><summary>JSON schema</summary>
1989///
1990/// ```json
1991///{
1992///  "description": "Provenance of one attached text render cache.",
1993///  "type": "string",
1994///  "enum": [
1995///    "existing_file_cache",
1996///    "python_generated_cache",
1997///    "native_generated_cache"
1998///  ]
1999///}
2000/// ```
2001/// </details>
2002#[derive(
2003    ::serde::Deserialize,
2004    ::serde::Serialize,
2005    Clone,
2006    Copy,
2007    Debug,
2008    Eq,
2009    Hash,
2010    Ord,
2011    PartialEq,
2012    PartialOrd,
2013)]
2014pub enum PlotterTextRenderCacheSource {
2015    #[serde(rename = "existing_file_cache")]
2016    ExistingFileCache,
2017    #[serde(rename = "python_generated_cache")]
2018    PythonGeneratedCache,
2019    #[serde(rename = "native_generated_cache")]
2020    NativeGeneratedCache,
2021}
2022impl ::std::fmt::Display for PlotterTextRenderCacheSource {
2023    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2024        match *self {
2025            Self::ExistingFileCache => f.write_str("existing_file_cache"),
2026            Self::PythonGeneratedCache => f.write_str("python_generated_cache"),
2027            Self::NativeGeneratedCache => f.write_str("native_generated_cache"),
2028        }
2029    }
2030}
2031impl ::std::str::FromStr for PlotterTextRenderCacheSource {
2032    type Err = self::error::ConversionError;
2033    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2034        match value {
2035            "existing_file_cache" => Ok(Self::ExistingFileCache),
2036            "python_generated_cache" => Ok(Self::PythonGeneratedCache),
2037            "native_generated_cache" => Ok(Self::NativeGeneratedCache),
2038            _ => Err("invalid value".into()),
2039        }
2040    }
2041}
2042impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheSource {
2043    type Error = self::error::ConversionError;
2044    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2045        value.parse()
2046    }
2047}
2048impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheSource {
2049    type Error = self::error::ConversionError;
2050    fn try_from(
2051        value: &::std::string::String,
2052    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2053        value.parse()
2054    }
2055}
2056impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheSource {
2057    type Error = self::error::ConversionError;
2058    fn try_from(
2059        value: ::std::string::String,
2060    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2061        value.parse()
2062    }
2063}
2064///Vertical text alignments emitted by the board producers.
2065///
2066/// <details><summary>JSON schema</summary>
2067///
2068/// ```json
2069///{
2070///  "description": "Vertical text alignments emitted by the board producers.",
2071///  "type": "string",
2072///  "enum": [
2073///    "GR_TEXT_V_ALIGN_TOP",
2074///    "GR_TEXT_V_ALIGN_CENTER",
2075///    "GR_TEXT_V_ALIGN_BOTTOM"
2076///  ]
2077///}
2078/// ```
2079/// </details>
2080#[derive(
2081    ::serde::Deserialize,
2082    ::serde::Serialize,
2083    Clone,
2084    Copy,
2085    Debug,
2086    Eq,
2087    Hash,
2088    Ord,
2089    PartialEq,
2090    PartialOrd,
2091)]
2092pub enum PlotterTextVAlign {
2093    #[serde(rename = "GR_TEXT_V_ALIGN_TOP")]
2094    GrTextVAlignTop,
2095    #[serde(rename = "GR_TEXT_V_ALIGN_CENTER")]
2096    GrTextVAlignCenter,
2097    #[serde(rename = "GR_TEXT_V_ALIGN_BOTTOM")]
2098    GrTextVAlignBottom,
2099}
2100impl ::std::fmt::Display for PlotterTextVAlign {
2101    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2102        match *self {
2103            Self::GrTextVAlignTop => f.write_str("GR_TEXT_V_ALIGN_TOP"),
2104            Self::GrTextVAlignCenter => f.write_str("GR_TEXT_V_ALIGN_CENTER"),
2105            Self::GrTextVAlignBottom => f.write_str("GR_TEXT_V_ALIGN_BOTTOM"),
2106        }
2107    }
2108}
2109impl ::std::str::FromStr for PlotterTextVAlign {
2110    type Err = self::error::ConversionError;
2111    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2112        match value {
2113            "GR_TEXT_V_ALIGN_TOP" => Ok(Self::GrTextVAlignTop),
2114            "GR_TEXT_V_ALIGN_CENTER" => Ok(Self::GrTextVAlignCenter),
2115            "GR_TEXT_V_ALIGN_BOTTOM" => Ok(Self::GrTextVAlignBottom),
2116            _ => Err("invalid value".into()),
2117        }
2118    }
2119}
2120impl ::std::convert::TryFrom<&str> for PlotterTextVAlign {
2121    type Error = self::error::ConversionError;
2122    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2123        value.parse()
2124    }
2125}
2126impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextVAlign {
2127    type Error = self::error::ConversionError;
2128    fn try_from(
2129        value: &::std::string::String,
2130    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2131        value.parse()
2132    }
2133}
2134impl ::std::convert::TryFrom<::std::string::String> for PlotterTextVAlign {
2135    type Error = self::error::ConversionError;
2136    fn try_from(
2137        value: ::std::string::String,
2138    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2139        value.parse()
2140    }
2141}
2142///Semantic roles allowed on board via flash operations.
2143///
2144/// <details><summary>JSON schema</summary>
2145///
2146/// ```json
2147///{
2148///  "description": "Semantic roles allowed on board via flash operations.",
2149///  "type": "string",
2150///  "enum": [
2151///    "via_aperture",
2152///    "via_mask_opening"
2153///  ]
2154///}
2155/// ```
2156/// </details>
2157#[derive(
2158    ::serde::Deserialize,
2159    ::serde::Serialize,
2160    Clone,
2161    Copy,
2162    Debug,
2163    Eq,
2164    Hash,
2165    Ord,
2166    PartialEq,
2167    PartialOrd,
2168)]
2169pub enum PlotterViaFlashRole {
2170    #[serde(rename = "via_aperture")]
2171    ViaAperture,
2172    #[serde(rename = "via_mask_opening")]
2173    ViaMaskOpening,
2174}
2175impl ::std::fmt::Display for PlotterViaFlashRole {
2176    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2177        match *self {
2178            Self::ViaAperture => f.write_str("via_aperture"),
2179            Self::ViaMaskOpening => f.write_str("via_mask_opening"),
2180        }
2181    }
2182}
2183impl ::std::str::FromStr for PlotterViaFlashRole {
2184    type Err = self::error::ConversionError;
2185    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2186        match value {
2187            "via_aperture" => Ok(Self::ViaAperture),
2188            "via_mask_opening" => Ok(Self::ViaMaskOpening),
2189            _ => Err("invalid value".into()),
2190        }
2191    }
2192}
2193impl ::std::convert::TryFrom<&str> for PlotterViaFlashRole {
2194    type Error = self::error::ConversionError;
2195    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2196        value.parse()
2197    }
2198}
2199impl ::std::convert::TryFrom<&::std::string::String> for PlotterViaFlashRole {
2200    type Error = self::error::ConversionError;
2201    fn try_from(
2202        value: &::std::string::String,
2203    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2204        value.parse()
2205    }
2206}
2207impl ::std::convert::TryFrom<::std::string::String> for PlotterViaFlashRole {
2208    type Error = self::error::ConversionError;
2209    fn try_from(
2210        value: ::std::string::String,
2211    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2212        value.parse()
2213    }
2214}
2215///Rectangle with square corners.
2216///
2217/// <details><summary>JSON schema</summary>
2218///
2219/// ```json
2220///{
2221///  "description": "Rectangle with square corners.",
2222///  "type": "object",
2223///  "required": [
2224///    "corner_radius_nm",
2225///    "fill",
2226///    "index",
2227///    "kind",
2228///    "width_nm",
2229///    "x1",
2230///    "x2",
2231///    "y1",
2232///    "y2"
2233///  ],
2234///  "properties": {
2235///    "corner_radius_nm": {
2236///      "$ref": "#/$defs/JavaScriptSafeInteger"
2237///    },
2238///    "fill": {
2239///      "$ref": "#/$defs/PlotterFill"
2240///    },
2241///    "fill_color": {
2242///      "type": "string"
2243///    },
2244///    "index": {
2245///      "type": "integer",
2246///      "maximum": 4294967295.0,
2247///      "minimum": 0.0
2248///    },
2249///    "kind": {
2250///      "type": "string",
2251///      "const": "Rect"
2252///    },
2253///    "layer": {
2254///      "type": "string"
2255///    },
2256///    "line_style": {
2257///      "$ref": "#/$defs/PlotterLineStyle"
2258///    },
2259///    "stroke_color": {
2260///      "type": "string"
2261///    },
2262///    "width_nm": {
2263///      "$ref": "#/$defs/JavaScriptSafeInteger"
2264///    },
2265///    "x1": {
2266///      "$ref": "#/$defs/JavaScriptSafeInteger"
2267///    },
2268///    "x2": {
2269///      "$ref": "#/$defs/JavaScriptSafeInteger"
2270///    },
2271///    "y1": {
2272///      "$ref": "#/$defs/JavaScriptSafeInteger"
2273///    },
2274///    "y2": {
2275///      "$ref": "#/$defs/JavaScriptSafeInteger"
2276///    }
2277///  },
2278///  "additionalProperties": false
2279///}
2280/// ```
2281/// </details>
2282#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2283#[serde(deny_unknown_fields)]
2284pub struct RectOperation {
2285    pub corner_radius_nm: crate::JavaScriptSafeInteger,
2286    pub fill: PlotterFill,
2287    #[serde(
2288        default,
2289        deserialize_with = "crate::deserialize_present_nonnull",
2290        skip_serializing_if = "::std::option::Option::is_none"
2291    )]
2292    pub fill_color: ::std::option::Option<::std::string::String>,
2293    pub index: u32,
2294    #[serde(deserialize_with = "crate::deserialize_rect_kind")]
2295    pub kind: ::std::string::String,
2296    #[serde(
2297        default,
2298        deserialize_with = "crate::deserialize_present_nonnull",
2299        skip_serializing_if = "::std::option::Option::is_none"
2300    )]
2301    pub layer: ::std::option::Option<::std::string::String>,
2302    #[serde(
2303        default,
2304        deserialize_with = "crate::deserialize_present_nonnull",
2305        skip_serializing_if = "::std::option::Option::is_none"
2306    )]
2307    pub line_style: ::std::option::Option<PlotterLineStyle>,
2308    #[serde(
2309        default,
2310        deserialize_with = "crate::deserialize_present_nonnull",
2311        skip_serializing_if = "::std::option::Option::is_none"
2312    )]
2313    pub stroke_color: ::std::option::Option<::std::string::String>,
2314    pub width_nm: crate::JavaScriptSafeInteger,
2315    pub x1: crate::JavaScriptSafeInteger,
2316    pub x2: crate::JavaScriptSafeInteger,
2317    pub y1: crate::JavaScriptSafeInteger,
2318    pub y2: crate::JavaScriptSafeInteger,
2319}
2320/**Stroke or cached text operation. Boolean marker keys (`mirror`,
2321`text_as_polygons`, `polyline_per_segment`, `knockout`) are present-only
2322-when-true, matching the established Python emitter. Render-cache keys
2323appear together when an authored cache resolves; `render_cache_polygons`
2324carries the exterior rings in nanometres.*/
2325///
2326/// <details><summary>JSON schema</summary>
2327///
2328/// ```json
2329///{
2330///  "description": "Stroke or cached text operation. Boolean marker keys (`mirror`,\n`text_as_polygons`, `polyline_per_segment`, `knockout`) are present-only\n-when-true, matching the established Python emitter. Render-cache keys\nappear together when an authored cache resolves; `render_cache_polygons`\ncarries the exterior rings in nanometres.",
2331///  "type": "object",
2332///  "required": [
2333///    "bold",
2334///    "color",
2335///    "font_face",
2336///    "h_align",
2337///    "index",
2338///    "italic",
2339///    "kind",
2340///    "multiline",
2341///    "orient_deg",
2342///    "pen_width_nm",
2343///    "size_x_nm",
2344///    "size_y_nm",
2345///    "text",
2346///    "v_align",
2347///    "x",
2348///    "y"
2349///  ],
2350///  "properties": {
2351///    "bold": {
2352///      "type": "boolean"
2353///    },
2354///    "color": {
2355///      "type": "string"
2356///    },
2357///    "context": {
2358///      "$ref": "#/$defs/PlotterOperationContext"
2359///    },
2360///    "font_face": {
2361///      "type": "string"
2362///    },
2363///    "h_align": {
2364///      "$ref": "#/$defs/PlotterTextHAlign"
2365///    },
2366///    "index": {
2367///      "type": "integer",
2368///      "maximum": 4294967295.0,
2369///      "minimum": 0.0
2370///    },
2371///    "italic": {
2372///      "type": "boolean"
2373///    },
2374///    "kind": {
2375///      "type": "string",
2376///      "const": "Text"
2377///    },
2378///    "knockout": {
2379///      "type": "boolean"
2380///    },
2381///    "layer": {
2382///      "type": "string"
2383///    },
2384///    "mirror": {
2385///      "type": "boolean"
2386///    },
2387///    "multiline": {
2388///      "type": "boolean"
2389///    },
2390///    "orient_deg": {
2391///      "type": "number"
2392///    },
2393///    "pen_width_nm": {
2394///      "$ref": "#/$defs/JavaScriptSafeInteger"
2395///    },
2396///    "polyline_per_segment": {
2397///      "type": "boolean"
2398///    },
2399///    "render_cache": {
2400///      "$ref": "#/$defs/TextRenderCache"
2401///    },
2402///    "render_cache_exact": {
2403///      "type": "boolean"
2404///    },
2405///    "render_cache_polygons": {
2406///      "type": "array",
2407///      "items": {
2408///        "type": "array",
2409///        "items": {
2410///          "$ref": "#/$defs/PlotterPoint"
2411///        }
2412///      }
2413///    },
2414///    "render_cache_source": {
2415///      "$ref": "#/$defs/PlotterTextRenderCacheSource"
2416///    },
2417///    "size_x_nm": {
2418///      "$ref": "#/$defs/JavaScriptSafeInteger"
2419///    },
2420///    "size_y_nm": {
2421///      "$ref": "#/$defs/JavaScriptSafeInteger"
2422///    },
2423///    "text": {
2424///      "type": "string"
2425///    },
2426///    "text_as_polygons": {
2427///      "type": "boolean"
2428///    },
2429///    "v_align": {
2430///      "$ref": "#/$defs/PlotterTextVAlign"
2431///    },
2432///    "x": {
2433///      "$ref": "#/$defs/JavaScriptSafeInteger"
2434///    },
2435///    "y": {
2436///      "$ref": "#/$defs/JavaScriptSafeInteger"
2437///    }
2438///  },
2439///  "additionalProperties": false
2440///}
2441/// ```
2442/// </details>
2443#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2444#[serde(deny_unknown_fields)]
2445pub struct TextOperation {
2446    pub bold: bool,
2447    pub color: ::std::string::String,
2448    #[serde(
2449        default,
2450        deserialize_with = "crate::deserialize_present_nonnull",
2451        skip_serializing_if = "::std::option::Option::is_none"
2452    )]
2453    pub context: ::std::option::Option<PlotterOperationContext>,
2454    pub font_face: ::std::string::String,
2455    pub h_align: PlotterTextHAlign,
2456    pub index: u32,
2457    pub italic: bool,
2458    #[serde(deserialize_with = "crate::deserialize_text_kind")]
2459    pub kind: ::std::string::String,
2460    #[serde(
2461        default,
2462        deserialize_with = "crate::deserialize_present_nonnull",
2463        skip_serializing_if = "::std::option::Option::is_none"
2464    )]
2465    pub knockout: ::std::option::Option<bool>,
2466    #[serde(
2467        default,
2468        deserialize_with = "crate::deserialize_present_nonnull",
2469        skip_serializing_if = "::std::option::Option::is_none"
2470    )]
2471    pub layer: ::std::option::Option<::std::string::String>,
2472    #[serde(
2473        default,
2474        deserialize_with = "crate::deserialize_present_nonnull",
2475        skip_serializing_if = "::std::option::Option::is_none"
2476    )]
2477    pub mirror: ::std::option::Option<bool>,
2478    pub multiline: bool,
2479    pub orient_deg: f64,
2480    pub pen_width_nm: crate::JavaScriptSafeInteger,
2481    #[serde(
2482        default,
2483        deserialize_with = "crate::deserialize_present_nonnull",
2484        skip_serializing_if = "::std::option::Option::is_none"
2485    )]
2486    pub polyline_per_segment: ::std::option::Option<bool>,
2487    #[serde(
2488        default,
2489        deserialize_with = "crate::deserialize_present_nonnull",
2490        skip_serializing_if = "::std::option::Option::is_none"
2491    )]
2492    pub render_cache: ::std::option::Option<TextRenderCache>,
2493    #[serde(
2494        default,
2495        deserialize_with = "crate::deserialize_present_nonnull",
2496        skip_serializing_if = "::std::option::Option::is_none"
2497    )]
2498    pub render_cache_exact: ::std::option::Option<bool>,
2499    #[serde(
2500        default,
2501        deserialize_with = "crate::reject_present_render_cache_polygons",
2502        skip_serializing_if = "::std::vec::Vec::is_empty"
2503    )]
2504    pub render_cache_polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
2505    #[serde(
2506        default,
2507        deserialize_with = "crate::deserialize_present_nonnull",
2508        skip_serializing_if = "::std::option::Option::is_none"
2509    )]
2510    pub render_cache_source: ::std::option::Option<PlotterTextRenderCacheSource>,
2511    pub size_x_nm: crate::JavaScriptSafeInteger,
2512    pub size_y_nm: crate::JavaScriptSafeInteger,
2513    pub text: ::std::string::String,
2514    #[serde(
2515        default,
2516        deserialize_with = "crate::deserialize_present_nonnull",
2517        skip_serializing_if = "::std::option::Option::is_none"
2518    )]
2519    pub text_as_polygons: ::std::option::Option<bool>,
2520    pub v_align: PlotterTextVAlign,
2521    pub x: crate::JavaScriptSafeInteger,
2522    pub y: crate::JavaScriptSafeInteger,
2523}
2524/**Typed render cache from an authored `(render_cache ...)` form, the Python
2525resolver, or the deterministic native hinted outline engine. `knockout` appears when the
2526knockout background restructure replaced the polygons.*/
2527///
2528/// <details><summary>JSON schema</summary>
2529///
2530/// ```json
2531///{
2532///  "description": "Typed render cache from an authored `(render_cache ...)` form, the Python\nresolver, or the deterministic native hinted outline engine. `knockout` appears when the\nknockout background restructure replaced the polygons.",
2533///  "type": "object",
2534///  "required": [
2535///    "angle",
2536///    "coordinate_space",
2537///    "exact",
2538///    "polygons",
2539///    "schema",
2540///    "source",
2541///    "text",
2542///    "unit"
2543///  ],
2544///  "properties": {
2545///    "angle": {
2546///      "type": "number"
2547///    },
2548///    "coordinate_space": {
2549///      "$ref": "#/$defs/PlotterTextRenderCacheCoordinateSpace"
2550///    },
2551///    "exact": {
2552///      "type": "boolean"
2553///    },
2554///    "knockout": {
2555///      "type": "boolean"
2556///    },
2557///    "polygons": {
2558///      "type": "array",
2559///      "items": {
2560///        "$ref": "#/$defs/TextRenderCachePolygon"
2561///      }
2562///    },
2563///    "schema": {
2564///      "type": "string",
2565///      "const": "kicad.render_cache.v1"
2566///    },
2567///    "source": {
2568///      "$ref": "#/$defs/PlotterTextRenderCacheSource"
2569///    },
2570///    "text": {
2571///      "type": "string"
2572///    },
2573///    "unit": {
2574///      "type": "string",
2575///      "const": "nm"
2576///    }
2577///  },
2578///  "additionalProperties": false
2579///}
2580/// ```
2581/// </details>
2582#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2583#[serde(deny_unknown_fields)]
2584pub struct TextRenderCache {
2585    pub angle: f64,
2586    pub coordinate_space: PlotterTextRenderCacheCoordinateSpace,
2587    pub exact: bool,
2588    #[serde(
2589        default,
2590        deserialize_with = "crate::deserialize_present_nonnull",
2591        skip_serializing_if = "::std::option::Option::is_none"
2592    )]
2593    pub knockout: ::std::option::Option<bool>,
2594    pub polygons: ::std::vec::Vec<TextRenderCachePolygon>,
2595    pub schema: ::std::string::String,
2596    pub source: PlotterTextRenderCacheSource,
2597    pub text: ::std::string::String,
2598    pub unit: ::std::string::String,
2599}
2600///One render-cache polygon as ordered contours, exterior ring first.
2601///
2602/// <details><summary>JSON schema</summary>
2603///
2604/// ```json
2605///{
2606///  "description": "One render-cache polygon as ordered contours, exterior ring first.",
2607///  "type": "object",
2608///  "required": [
2609///    "contours"
2610///  ],
2611///  "properties": {
2612///    "contours": {
2613///      "type": "array",
2614///      "items": {
2615///        "type": "array",
2616///        "items": {
2617///          "$ref": "#/$defs/PlotterPoint"
2618///        }
2619///      }
2620///    }
2621///  },
2622///  "additionalProperties": false
2623///}
2624/// ```
2625/// </details>
2626#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2627#[serde(deny_unknown_fields)]
2628pub struct TextRenderCachePolygon {
2629    pub contours: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
2630}
2631/**Solid or decomposed segment shared by PCB, footprint, and drill producers.
2632Graphic state requires only layer. Drill state requires role plus layers;
2633NPTH drill state additionally requires all mask and pad-size hints. The
2634generated semantic validator enforces these mutually exclusive states.*/
2635///
2636/// <details><summary>JSON schema</summary>
2637///
2638/// ```json
2639///{
2640///  "description": "Solid or decomposed segment shared by PCB, footprint, and drill producers.\nGraphic state requires only layer. Drill state requires role plus layers;\nNPTH drill state additionally requires all mask and pad-size hints. The\ngenerated semantic validator enforces these mutually exclusive states.",
2641///  "type": "object",
2642///  "required": [
2643///    "end_x",
2644///    "end_y",
2645///    "index",
2646///    "kind",
2647///    "start_x",
2648///    "start_y",
2649///    "width_nm"
2650///  ],
2651///  "properties": {
2652///    "end_x": {
2653///      "$ref": "#/$defs/JavaScriptSafeInteger"
2654///    },
2655///    "end_y": {
2656///      "$ref": "#/$defs/JavaScriptSafeInteger"
2657///    },
2658///    "index": {
2659///      "type": "integer",
2660///      "maximum": 4294967295.0,
2661///      "minimum": 0.0
2662///    },
2663///    "kind": {
2664///      "type": "string",
2665///      "const": "ThickSegment"
2666///    },
2667///    "layer": {
2668///      "type": "string"
2669///    },
2670///    "layers": {
2671///      "type": "array",
2672///      "items": {
2673///        "type": "string"
2674///      }
2675///    },
2676///    "mask_margin_nm": {
2677///      "$ref": "#/$defs/JavaScriptSafeInteger"
2678///    },
2679///    "pad_size_x_nm": {
2680///      "$ref": "#/$defs/JavaScriptSafeInteger"
2681///    },
2682///    "pad_size_y_nm": {
2683///      "$ref": "#/$defs/JavaScriptSafeInteger"
2684///    },
2685///    "role": {
2686///      "$ref": "#/$defs/PlotterDrillRole"
2687///    },
2688///    "start_x": {
2689///      "$ref": "#/$defs/JavaScriptSafeInteger"
2690///    },
2691///    "start_y": {
2692///      "$ref": "#/$defs/JavaScriptSafeInteger"
2693///    },
2694///    "stroke_color": {
2695///      "type": "string"
2696///    },
2697///    "width_nm": {
2698///      "$ref": "#/$defs/JavaScriptSafeInteger"
2699///    }
2700///  },
2701///  "additionalProperties": false
2702///}
2703/// ```
2704/// </details>
2705#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2706#[serde(deny_unknown_fields)]
2707pub struct ThickSegmentOperation {
2708    pub end_x: crate::JavaScriptSafeInteger,
2709    pub end_y: crate::JavaScriptSafeInteger,
2710    pub index: u32,
2711    #[serde(deserialize_with = "crate::deserialize_thick_segment_kind")]
2712    pub kind: ::std::string::String,
2713    #[serde(
2714        default,
2715        deserialize_with = "crate::deserialize_present_nonnull",
2716        skip_serializing_if = "::std::option::Option::is_none"
2717    )]
2718    pub layer: ::std::option::Option<::std::string::String>,
2719    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2720    pub layers: ::std::vec::Vec<::std::string::String>,
2721    #[serde(
2722        default,
2723        deserialize_with = "crate::deserialize_present_nonnull",
2724        skip_serializing_if = "::std::option::Option::is_none"
2725    )]
2726    pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2727    #[serde(
2728        default,
2729        deserialize_with = "crate::deserialize_present_nonnull",
2730        skip_serializing_if = "::std::option::Option::is_none"
2731    )]
2732    pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2733    #[serde(
2734        default,
2735        deserialize_with = "crate::deserialize_present_nonnull",
2736        skip_serializing_if = "::std::option::Option::is_none"
2737    )]
2738    pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2739    #[serde(
2740        default,
2741        deserialize_with = "crate::deserialize_present_nonnull",
2742        skip_serializing_if = "::std::option::Option::is_none"
2743    )]
2744    pub role: ::std::option::Option<PlotterDrillRole>,
2745    pub start_x: crate::JavaScriptSafeInteger,
2746    pub start_y: crate::JavaScriptSafeInteger,
2747    #[serde(
2748        default,
2749        deserialize_with = "crate::deserialize_present_nonnull",
2750        skip_serializing_if = "::std::option::Option::is_none"
2751    )]
2752    pub stroke_color: ::std::option::Option<::std::string::String>,
2753    pub width_nm: crate::JavaScriptSafeInteger,
2754}