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

kicad_monkey_contracts/generated/
schematic_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///Decoded image placement shared by worksheet and schematic producers.
860///
861/// <details><summary>JSON schema</summary>
862///
863/// ```json
864///{
865///  "description": "Decoded image placement shared by worksheet and schematic producers.",
866///  "type": "object",
867///  "required": [
868///    "height_nm",
869///    "image_data_b64",
870///    "image_format",
871///    "index",
872///    "kind",
873///    "scale",
874///    "width_nm",
875///    "x",
876///    "y"
877///  ],
878///  "properties": {
879///    "height_nm": {
880///      "$ref": "#/$defs/JavaScriptSafeInteger"
881///    },
882///    "image_data_b64": {
883///      "type": "string"
884///    },
885///    "image_format": {
886///      "type": "string"
887///    },
888///    "index": {
889///      "type": "integer",
890///      "maximum": 4294967295.0,
891///      "minimum": 0.0
892///    },
893///    "kind": {
894///      "type": "string",
895///      "const": "PlotImage"
896///    },
897///    "scale": {
898///      "type": "number"
899///    },
900///    "stroke_color": {
901///      "type": "string"
902///    },
903///    "width_nm": {
904///      "$ref": "#/$defs/JavaScriptSafeInteger"
905///    },
906///    "x": {
907///      "$ref": "#/$defs/JavaScriptSafeInteger"
908///    },
909///    "y": {
910///      "$ref": "#/$defs/JavaScriptSafeInteger"
911///    }
912///  },
913///  "additionalProperties": false
914///}
915/// ```
916/// </details>
917#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
918#[serde(deny_unknown_fields)]
919pub struct PlotImageOperation {
920    pub height_nm: crate::JavaScriptSafeInteger,
921    pub image_data_b64: ::std::string::String,
922    pub image_format: ::std::string::String,
923    pub index: u32,
924    #[serde(deserialize_with = "crate::deserialize_plot_image_kind")]
925    pub kind: ::std::string::String,
926    pub scale: f64,
927    #[serde(
928        default,
929        deserialize_with = "crate::deserialize_present_nonnull",
930        skip_serializing_if = "::std::option::Option::is_none"
931    )]
932    pub stroke_color: ::std::option::Option<::std::string::String>,
933    pub width_nm: crate::JavaScriptSafeInteger,
934    pub x: crate::JavaScriptSafeInteger,
935    pub y: crate::JavaScriptSafeInteger,
936}
937///Filled or outlined polygon operation.
938///
939/// <details><summary>JSON schema</summary>
940///
941/// ```json
942///{
943///  "description": "Filled or outlined polygon operation.",
944///  "type": "object",
945///  "required": [
946///    "fill",
947///    "index",
948///    "kind",
949///    "points",
950///    "width_nm"
951///  ],
952///  "properties": {
953///    "fill": {
954///      "$ref": "#/$defs/PlotterFill"
955///    },
956///    "fill_color": {
957///      "type": "string"
958///    },
959///    "index": {
960///      "type": "integer",
961///      "maximum": 4294967295.0,
962///      "minimum": 0.0
963///    },
964///    "kind": {
965///      "type": "string",
966///      "const": "PlotPoly"
967///    },
968///    "layer": {
969///      "type": "string"
970///    },
971///    "line_style": {
972///      "$ref": "#/$defs/PlotterLineStyle"
973///    },
974///    "points": {
975///      "type": "array",
976///      "items": {
977///        "$ref": "#/$defs/PlotterPoint"
978///      }
979///    },
980///    "stroke_color": {
981///      "type": "string"
982///    },
983///    "width_nm": {
984///      "$ref": "#/$defs/JavaScriptSafeInteger"
985///    }
986///  },
987///  "additionalProperties": false
988///}
989/// ```
990/// </details>
991#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
992#[serde(deny_unknown_fields)]
993pub struct PlotPolyOperation {
994    pub fill: PlotterFill,
995    #[serde(
996        default,
997        deserialize_with = "crate::deserialize_present_nonnull",
998        skip_serializing_if = "::std::option::Option::is_none"
999    )]
1000    pub fill_color: ::std::option::Option<::std::string::String>,
1001    pub index: u32,
1002    #[serde(deserialize_with = "crate::deserialize_plot_poly_kind")]
1003    pub kind: ::std::string::String,
1004    #[serde(
1005        default,
1006        deserialize_with = "crate::deserialize_present_nonnull",
1007        skip_serializing_if = "::std::option::Option::is_none"
1008    )]
1009    pub layer: ::std::option::Option<::std::string::String>,
1010    #[serde(
1011        default,
1012        deserialize_with = "crate::deserialize_present_nonnull",
1013        skip_serializing_if = "::std::option::Option::is_none"
1014    )]
1015    pub line_style: ::std::option::Option<PlotterLineStyle>,
1016    pub points: ::std::vec::Vec<PlotterPoint>,
1017    #[serde(
1018        default,
1019        deserialize_with = "crate::deserialize_present_nonnull",
1020        skip_serializing_if = "::std::option::Option::is_none"
1021    )]
1022    pub stroke_color: ::std::option::Option<::std::string::String>,
1023    pub width_nm: crate::JavaScriptSafeInteger,
1024}
1025///Coordinate convention for the footprint plotter slice.
1026///
1027/// <details><summary>JSON schema</summary>
1028///
1029/// ```json
1030///{
1031///  "description": "Coordinate convention for the footprint plotter slice.",
1032///  "type": "object",
1033///  "required": [
1034///    "unit",
1035///    "y_axis"
1036///  ],
1037///  "properties": {
1038///    "unit": {
1039///      "type": "string",
1040///      "const": "nm"
1041///    },
1042///    "y_axis": {
1043///      "type": "string",
1044///      "const": "down"
1045///    }
1046///  },
1047///  "additionalProperties": false
1048///}
1049/// ```
1050/// </details>
1051#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1052#[serde(deny_unknown_fields)]
1053pub struct PlotterCoordinateSpace {
1054    pub unit: ::std::string::String,
1055    pub y_axis: ::std::string::String,
1056}
1057///Semantic roles allowed on shared circle and segment drill operations.
1058///
1059/// <details><summary>JSON schema</summary>
1060///
1061/// ```json
1062///{
1063///  "description": "Semantic roles allowed on shared circle and segment drill operations.",
1064///  "type": "string",
1065///  "enum": [
1066///    "pad_drill",
1067///    "npth_hole",
1068///    "via_drill",
1069///    "via_mask_drill"
1070///  ]
1071///}
1072/// ```
1073/// </details>
1074#[derive(
1075    ::serde::Deserialize,
1076    ::serde::Serialize,
1077    Clone,
1078    Copy,
1079    Debug,
1080    Eq,
1081    Hash,
1082    Ord,
1083    PartialEq,
1084    PartialOrd,
1085)]
1086pub enum PlotterDrillRole {
1087    #[serde(rename = "pad_drill")]
1088    PadDrill,
1089    #[serde(rename = "npth_hole")]
1090    NpthHole,
1091    #[serde(rename = "via_drill")]
1092    ViaDrill,
1093    #[serde(rename = "via_mask_drill")]
1094    ViaMaskDrill,
1095}
1096impl ::std::fmt::Display for PlotterDrillRole {
1097    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1098        match *self {
1099            Self::PadDrill => f.write_str("pad_drill"),
1100            Self::NpthHole => f.write_str("npth_hole"),
1101            Self::ViaDrill => f.write_str("via_drill"),
1102            Self::ViaMaskDrill => f.write_str("via_mask_drill"),
1103        }
1104    }
1105}
1106impl ::std::str::FromStr for PlotterDrillRole {
1107    type Err = self::error::ConversionError;
1108    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1109        match value {
1110            "pad_drill" => Ok(Self::PadDrill),
1111            "npth_hole" => Ok(Self::NpthHole),
1112            "via_drill" => Ok(Self::ViaDrill),
1113            "via_mask_drill" => Ok(Self::ViaMaskDrill),
1114            _ => Err("invalid value".into()),
1115        }
1116    }
1117}
1118impl ::std::convert::TryFrom<&str> for PlotterDrillRole {
1119    type Error = self::error::ConversionError;
1120    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1121        value.parse()
1122    }
1123}
1124impl ::std::convert::TryFrom<&::std::string::String> for PlotterDrillRole {
1125    type Error = self::error::ConversionError;
1126    fn try_from(
1127        value: &::std::string::String,
1128    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1129        value.parse()
1130    }
1131}
1132impl ::std::convert::TryFrom<::std::string::String> for PlotterDrillRole {
1133    type Error = self::error::ConversionError;
1134    fn try_from(
1135        value: ::std::string::String,
1136    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1137        value.parse()
1138    }
1139}
1140///Fill values shared by plotter operation producers.
1141///
1142/// <details><summary>JSON schema</summary>
1143///
1144/// ```json
1145///{
1146///  "description": "Fill values shared by plotter operation producers.",
1147///  "type": "string",
1148///  "enum": [
1149///    "NO_FILL",
1150///    "FILLED_SHAPE",
1151///    "FILLED_WITH_BG_BODYCOLOR",
1152///    "FILLED_WITH_COLOR",
1153///    "HATCH",
1154///    "REVERSE_HATCH",
1155///    "CROSS_HATCH"
1156///  ]
1157///}
1158/// ```
1159/// </details>
1160#[derive(
1161    ::serde::Deserialize,
1162    ::serde::Serialize,
1163    Clone,
1164    Copy,
1165    Debug,
1166    Eq,
1167    Hash,
1168    Ord,
1169    PartialEq,
1170    PartialOrd,
1171)]
1172pub enum PlotterFill {
1173    #[serde(rename = "NO_FILL")]
1174    NoFill,
1175    #[serde(rename = "FILLED_SHAPE")]
1176    FilledShape,
1177    #[serde(rename = "FILLED_WITH_BG_BODYCOLOR")]
1178    FilledWithBgBodycolor,
1179    #[serde(rename = "FILLED_WITH_COLOR")]
1180    FilledWithColor,
1181    #[serde(rename = "HATCH")]
1182    Hatch,
1183    #[serde(rename = "REVERSE_HATCH")]
1184    ReverseHatch,
1185    #[serde(rename = "CROSS_HATCH")]
1186    CrossHatch,
1187}
1188impl ::std::fmt::Display for PlotterFill {
1189    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1190        match *self {
1191            Self::NoFill => f.write_str("NO_FILL"),
1192            Self::FilledShape => f.write_str("FILLED_SHAPE"),
1193            Self::FilledWithBgBodycolor => f.write_str("FILLED_WITH_BG_BODYCOLOR"),
1194            Self::FilledWithColor => f.write_str("FILLED_WITH_COLOR"),
1195            Self::Hatch => f.write_str("HATCH"),
1196            Self::ReverseHatch => f.write_str("REVERSE_HATCH"),
1197            Self::CrossHatch => f.write_str("CROSS_HATCH"),
1198        }
1199    }
1200}
1201impl ::std::str::FromStr for PlotterFill {
1202    type Err = self::error::ConversionError;
1203    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1204        match value {
1205            "NO_FILL" => Ok(Self::NoFill),
1206            "FILLED_SHAPE" => Ok(Self::FilledShape),
1207            "FILLED_WITH_BG_BODYCOLOR" => Ok(Self::FilledWithBgBodycolor),
1208            "FILLED_WITH_COLOR" => Ok(Self::FilledWithColor),
1209            "HATCH" => Ok(Self::Hatch),
1210            "REVERSE_HATCH" => Ok(Self::ReverseHatch),
1211            "CROSS_HATCH" => Ok(Self::CrossHatch),
1212            _ => Err("invalid value".into()),
1213        }
1214    }
1215}
1216impl ::std::convert::TryFrom<&str> for PlotterFill {
1217    type Error = self::error::ConversionError;
1218    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1219        value.parse()
1220    }
1221}
1222impl ::std::convert::TryFrom<&::std::string::String> for PlotterFill {
1223    type Error = self::error::ConversionError;
1224    fn try_from(
1225        value: &::std::string::String,
1226    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1227        value.parse()
1228    }
1229}
1230impl ::std::convert::TryFrom<::std::string::String> for PlotterFill {
1231    type Error = self::error::ConversionError;
1232    fn try_from(
1233        value: ::std::string::String,
1234    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1235        value.parse()
1236    }
1237}
1238///One exact hyperlink attached to an authored plotter text carrier.
1239///
1240/// <details><summary>JSON schema</summary>
1241///
1242/// ```json
1243///{
1244///  "description": "One exact hyperlink attached to an authored plotter text carrier.",
1245///  "type": "object",
1246///  "required": [
1247///    "href"
1248///  ],
1249///  "properties": {
1250///    "href": {
1251///      "type": "string",
1252///      "minLength": 1
1253///    }
1254///  },
1255///  "additionalProperties": false
1256///}
1257/// ```
1258/// </details>
1259#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1260#[serde(deny_unknown_fields)]
1261pub struct PlotterHyperlink {
1262    pub href: PlotterHyperlinkHref,
1263}
1264///`PlotterHyperlinkHref`
1265///
1266/// <details><summary>JSON schema</summary>
1267///
1268/// ```json
1269///{
1270///  "type": "string",
1271///  "minLength": 1
1272///}
1273/// ```
1274/// </details>
1275#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1276#[serde(transparent)]
1277pub struct PlotterHyperlinkHref(::std::string::String);
1278impl ::std::ops::Deref for PlotterHyperlinkHref {
1279    type Target = ::std::string::String;
1280    fn deref(&self) -> &::std::string::String {
1281        &self.0
1282    }
1283}
1284impl ::std::convert::From<PlotterHyperlinkHref> for ::std::string::String {
1285    fn from(value: PlotterHyperlinkHref) -> Self {
1286        value.0
1287    }
1288}
1289impl ::std::str::FromStr for PlotterHyperlinkHref {
1290    type Err = self::error::ConversionError;
1291    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1292        if value.chars().count() < 1usize {
1293            return Err("shorter than 1 characters".into());
1294        }
1295        Ok(Self(value.to_string()))
1296    }
1297}
1298impl ::std::convert::TryFrom<&str> for PlotterHyperlinkHref {
1299    type Error = self::error::ConversionError;
1300    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1301        value.parse()
1302    }
1303}
1304impl ::std::convert::TryFrom<&::std::string::String> for PlotterHyperlinkHref {
1305    type Error = self::error::ConversionError;
1306    fn try_from(
1307        value: &::std::string::String,
1308    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1309        value.parse()
1310    }
1311}
1312impl ::std::convert::TryFrom<::std::string::String> for PlotterHyperlinkHref {
1313    type Error = self::error::ConversionError;
1314    fn try_from(
1315        value: ::std::string::String,
1316    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1317        value.parse()
1318    }
1319}
1320impl<'de> ::serde::Deserialize<'de> for PlotterHyperlinkHref {
1321    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1322    where
1323        D: ::serde::Deserializer<'de>,
1324    {
1325        ::std::string::String::deserialize(deserializer)?
1326            .parse()
1327            .map_err(|e: self::error::ConversionError| {
1328                <D::Error as ::serde::de::Error>::custom(e.to_string())
1329            })
1330    }
1331}
1332///KiCad stroke styles carried without producer-specific decomposition.
1333///
1334/// <details><summary>JSON schema</summary>
1335///
1336/// ```json
1337///{
1338///  "description": "KiCad stroke styles carried without producer-specific decomposition.",
1339///  "type": "string",
1340///  "enum": [
1341///    "DEFAULT",
1342///    "SOLID",
1343///    "DASH",
1344///    "DOT",
1345///    "DASH_DOT",
1346///    "DASH_DOT_DOT"
1347///  ]
1348///}
1349/// ```
1350/// </details>
1351#[derive(
1352    ::serde::Deserialize,
1353    ::serde::Serialize,
1354    Clone,
1355    Copy,
1356    Debug,
1357    Eq,
1358    Hash,
1359    Ord,
1360    PartialEq,
1361    PartialOrd,
1362)]
1363pub enum PlotterLineStyle {
1364    #[serde(rename = "DEFAULT")]
1365    Default,
1366    #[serde(rename = "SOLID")]
1367    Solid,
1368    #[serde(rename = "DASH")]
1369    Dash,
1370    #[serde(rename = "DOT")]
1371    Dot,
1372    #[serde(rename = "DASH_DOT")]
1373    DashDot,
1374    #[serde(rename = "DASH_DOT_DOT")]
1375    DashDotDot,
1376}
1377impl ::std::fmt::Display for PlotterLineStyle {
1378    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1379        match *self {
1380            Self::Default => f.write_str("DEFAULT"),
1381            Self::Solid => f.write_str("SOLID"),
1382            Self::Dash => f.write_str("DASH"),
1383            Self::Dot => f.write_str("DOT"),
1384            Self::DashDot => f.write_str("DASH_DOT"),
1385            Self::DashDotDot => f.write_str("DASH_DOT_DOT"),
1386        }
1387    }
1388}
1389impl ::std::str::FromStr for PlotterLineStyle {
1390    type Err = self::error::ConversionError;
1391    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1392        match value {
1393            "DEFAULT" => Ok(Self::Default),
1394            "SOLID" => Ok(Self::Solid),
1395            "DASH" => Ok(Self::Dash),
1396            "DOT" => Ok(Self::Dot),
1397            "DASH_DOT" => Ok(Self::DashDot),
1398            "DASH_DOT_DOT" => Ok(Self::DashDotDot),
1399            _ => Err("invalid value".into()),
1400        }
1401    }
1402}
1403impl ::std::convert::TryFrom<&str> for PlotterLineStyle {
1404    type Error = self::error::ConversionError;
1405    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1406        value.parse()
1407    }
1408}
1409impl ::std::convert::TryFrom<&::std::string::String> for PlotterLineStyle {
1410    type Error = self::error::ConversionError;
1411    fn try_from(
1412        value: &::std::string::String,
1413    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1414        value.parse()
1415    }
1416}
1417impl ::std::convert::TryFrom<::std::string::String> for PlotterLineStyle {
1418    type Error = self::error::ConversionError;
1419    fn try_from(
1420        value: ::std::string::String,
1421    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1422        value.parse()
1423    }
1424}
1425///Shared plotter operation vocabulary promoted across source producers.
1426///
1427/// <details><summary>JSON schema</summary>
1428///
1429/// ```json
1430///{
1431///  "description": "Shared plotter operation vocabulary promoted across source producers.",
1432///  "anyOf": [
1433///    {
1434///      "$ref": "#/$defs/ThickSegmentOperation"
1435///    },
1436///    {
1437///      "$ref": "#/$defs/ArcThreePointOperation"
1438///    },
1439///    {
1440///      "$ref": "#/$defs/CircleOperation"
1441///    },
1442///    {
1443///      "$ref": "#/$defs/RectOperation"
1444///    },
1445///    {
1446///      "$ref": "#/$defs/PlotPolyOperation"
1447///    },
1448///    {
1449///      "$ref": "#/$defs/BezierCurveOperation"
1450///    },
1451///    {
1452///      "$ref": "#/$defs/TextOperation"
1453///    },
1454///    {
1455///      "$ref": "#/$defs/PlotImageOperation"
1456///    },
1457///    {
1458///      "$ref": "#/$defs/FlashPadCircleOperation"
1459///    },
1460///    {
1461///      "$ref": "#/$defs/FlashPadOvalOperation"
1462///    },
1463///    {
1464///      "$ref": "#/$defs/FlashPadRectOperation"
1465///    },
1466///    {
1467///      "$ref": "#/$defs/FlashPadRoundRectOperation"
1468///    },
1469///    {
1470///      "$ref": "#/$defs/FlashPadCustomOperation"
1471///    },
1472///    {
1473///      "$ref": "#/$defs/FlashPadTrapezOperation"
1474///    }
1475///  ]
1476///}
1477/// ```
1478/// </details>
1479#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1480#[serde(untagged)]
1481pub enum PlotterOperation {
1482    ThickSegmentOperation(ThickSegmentOperation),
1483    ArcThreePointOperation(ArcThreePointOperation),
1484    CircleOperation(CircleOperation),
1485    RectOperation(RectOperation),
1486    PlotPolyOperation(PlotPolyOperation),
1487    BezierCurveOperation(BezierCurveOperation),
1488    TextOperation(TextOperation),
1489    PlotImageOperation(PlotImageOperation),
1490    FlashPadCircleOperation(FlashPadCircleOperation),
1491    FlashPadOvalOperation(FlashPadOvalOperation),
1492    FlashPadRectOperation(FlashPadRectOperation),
1493    FlashPadRoundRectOperation(FlashPadRoundRectOperation),
1494    FlashPadCustomOperation(FlashPadCustomOperation),
1495    FlashPadTrapezOperation(FlashPadTrapezOperation),
1496}
1497impl ::std::convert::From<ThickSegmentOperation> for PlotterOperation {
1498    fn from(value: ThickSegmentOperation) -> Self {
1499        Self::ThickSegmentOperation(value)
1500    }
1501}
1502impl ::std::convert::From<ArcThreePointOperation> for PlotterOperation {
1503    fn from(value: ArcThreePointOperation) -> Self {
1504        Self::ArcThreePointOperation(value)
1505    }
1506}
1507impl ::std::convert::From<CircleOperation> for PlotterOperation {
1508    fn from(value: CircleOperation) -> Self {
1509        Self::CircleOperation(value)
1510    }
1511}
1512impl ::std::convert::From<RectOperation> for PlotterOperation {
1513    fn from(value: RectOperation) -> Self {
1514        Self::RectOperation(value)
1515    }
1516}
1517impl ::std::convert::From<PlotPolyOperation> for PlotterOperation {
1518    fn from(value: PlotPolyOperation) -> Self {
1519        Self::PlotPolyOperation(value)
1520    }
1521}
1522impl ::std::convert::From<BezierCurveOperation> for PlotterOperation {
1523    fn from(value: BezierCurveOperation) -> Self {
1524        Self::BezierCurveOperation(value)
1525    }
1526}
1527impl ::std::convert::From<TextOperation> for PlotterOperation {
1528    fn from(value: TextOperation) -> Self {
1529        Self::TextOperation(value)
1530    }
1531}
1532impl ::std::convert::From<PlotImageOperation> for PlotterOperation {
1533    fn from(value: PlotImageOperation) -> Self {
1534        Self::PlotImageOperation(value)
1535    }
1536}
1537impl ::std::convert::From<FlashPadCircleOperation> for PlotterOperation {
1538    fn from(value: FlashPadCircleOperation) -> Self {
1539        Self::FlashPadCircleOperation(value)
1540    }
1541}
1542impl ::std::convert::From<FlashPadOvalOperation> for PlotterOperation {
1543    fn from(value: FlashPadOvalOperation) -> Self {
1544        Self::FlashPadOvalOperation(value)
1545    }
1546}
1547impl ::std::convert::From<FlashPadRectOperation> for PlotterOperation {
1548    fn from(value: FlashPadRectOperation) -> Self {
1549        Self::FlashPadRectOperation(value)
1550    }
1551}
1552impl ::std::convert::From<FlashPadRoundRectOperation> for PlotterOperation {
1553    fn from(value: FlashPadRoundRectOperation) -> Self {
1554        Self::FlashPadRoundRectOperation(value)
1555    }
1556}
1557impl ::std::convert::From<FlashPadCustomOperation> for PlotterOperation {
1558    fn from(value: FlashPadCustomOperation) -> Self {
1559        Self::FlashPadCustomOperation(value)
1560    }
1561}
1562impl ::std::convert::From<FlashPadTrapezOperation> for PlotterOperation {
1563    fn from(value: FlashPadTrapezOperation) -> Self {
1564        Self::FlashPadTrapezOperation(value)
1565    }
1566}
1567///Strict operation-local context emitted by current plotter producers.
1568///
1569/// <details><summary>JSON schema</summary>
1570///
1571/// ```json
1572///{
1573///  "description": "Strict operation-local context emitted by current plotter producers.",
1574///  "type": "object",
1575///  "required": [
1576///    "hyperlink"
1577///  ],
1578///  "properties": {
1579///    "hyperlink": {
1580///      "$ref": "#/$defs/PlotterHyperlink"
1581///    }
1582///  },
1583///  "additionalProperties": false
1584///}
1585/// ```
1586/// </details>
1587#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1588#[serde(deny_unknown_fields)]
1589pub struct PlotterOperationContext {
1590    pub hyperlink: PlotterHyperlink,
1591}
1592///Plotter point encoded as an exact coordinate pair.
1593///
1594/// <details><summary>JSON schema</summary>
1595///
1596/// ```json
1597///{
1598///  "description": "Plotter point encoded as an exact coordinate pair.",
1599///  "type": "array",
1600///  "items": {
1601///    "$ref": "#/$defs/JavaScriptSafeInteger"
1602///  },
1603///  "maxItems": 2,
1604///  "minItems": 2
1605///}
1606/// ```
1607/// </details>
1608#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1609#[serde(transparent)]
1610pub struct PlotterPoint(pub [crate::JavaScriptSafeInteger; 2usize]);
1611impl ::std::ops::Deref for PlotterPoint {
1612    type Target = [crate::JavaScriptSafeInteger; 2usize];
1613    fn deref(&self) -> &[crate::JavaScriptSafeInteger; 2usize] {
1614        &self.0
1615    }
1616}
1617impl ::std::convert::From<PlotterPoint> for [crate::JavaScriptSafeInteger; 2usize] {
1618    fn from(value: PlotterPoint) -> Self {
1619        value.0
1620    }
1621}
1622impl ::std::convert::From<[crate::JavaScriptSafeInteger; 2usize]> for PlotterPoint {
1623    fn from(value: [crate::JavaScriptSafeInteger; 2usize]) -> Self {
1624        Self(value)
1625    }
1626}
1627///Four pad-local trapezoid corners.
1628///
1629/// <details><summary>JSON schema</summary>
1630///
1631/// ```json
1632///{
1633///  "description": "Four pad-local trapezoid corners.",
1634///  "type": "array",
1635///  "items": {
1636///    "$ref": "#/$defs/PlotterPoint"
1637///  },
1638///  "maxItems": 4,
1639///  "minItems": 4
1640///}
1641/// ```
1642/// </details>
1643#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1644#[serde(transparent)]
1645pub struct PlotterQuad(pub [PlotterPoint; 4usize]);
1646impl ::std::ops::Deref for PlotterQuad {
1647    type Target = [PlotterPoint; 4usize];
1648    fn deref(&self) -> &[PlotterPoint; 4usize] {
1649        &self.0
1650    }
1651}
1652impl ::std::convert::From<PlotterQuad> for [PlotterPoint; 4usize] {
1653    fn from(value: PlotterQuad) -> Self {
1654        value.0
1655    }
1656}
1657impl ::std::convert::From<[PlotterPoint; 4usize]> for PlotterQuad {
1658    fn from(value: [PlotterPoint; 4usize]) -> Self {
1659        Self(value)
1660    }
1661}
1662///Horizontal text alignments emitted by the board producers.
1663///
1664/// <details><summary>JSON schema</summary>
1665///
1666/// ```json
1667///{
1668///  "description": "Horizontal text alignments emitted by the board producers.",
1669///  "type": "string",
1670///  "enum": [
1671///    "GR_TEXT_H_ALIGN_LEFT",
1672///    "GR_TEXT_H_ALIGN_CENTER",
1673///    "GR_TEXT_H_ALIGN_RIGHT"
1674///  ]
1675///}
1676/// ```
1677/// </details>
1678#[derive(
1679    ::serde::Deserialize,
1680    ::serde::Serialize,
1681    Clone,
1682    Copy,
1683    Debug,
1684    Eq,
1685    Hash,
1686    Ord,
1687    PartialEq,
1688    PartialOrd,
1689)]
1690pub enum PlotterTextHAlign {
1691    #[serde(rename = "GR_TEXT_H_ALIGN_LEFT")]
1692    GrTextHAlignLeft,
1693    #[serde(rename = "GR_TEXT_H_ALIGN_CENTER")]
1694    GrTextHAlignCenter,
1695    #[serde(rename = "GR_TEXT_H_ALIGN_RIGHT")]
1696    GrTextHAlignRight,
1697}
1698impl ::std::fmt::Display for PlotterTextHAlign {
1699    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1700        match *self {
1701            Self::GrTextHAlignLeft => f.write_str("GR_TEXT_H_ALIGN_LEFT"),
1702            Self::GrTextHAlignCenter => f.write_str("GR_TEXT_H_ALIGN_CENTER"),
1703            Self::GrTextHAlignRight => f.write_str("GR_TEXT_H_ALIGN_RIGHT"),
1704        }
1705    }
1706}
1707impl ::std::str::FromStr for PlotterTextHAlign {
1708    type Err = self::error::ConversionError;
1709    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1710        match value {
1711            "GR_TEXT_H_ALIGN_LEFT" => Ok(Self::GrTextHAlignLeft),
1712            "GR_TEXT_H_ALIGN_CENTER" => Ok(Self::GrTextHAlignCenter),
1713            "GR_TEXT_H_ALIGN_RIGHT" => Ok(Self::GrTextHAlignRight),
1714            _ => Err("invalid value".into()),
1715        }
1716    }
1717}
1718impl ::std::convert::TryFrom<&str> for PlotterTextHAlign {
1719    type Error = self::error::ConversionError;
1720    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1721        value.parse()
1722    }
1723}
1724impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextHAlign {
1725    type Error = self::error::ConversionError;
1726    fn try_from(
1727        value: &::std::string::String,
1728    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1729        value.parse()
1730    }
1731}
1732impl ::std::convert::TryFrom<::std::string::String> for PlotterTextHAlign {
1733    type Error = self::error::ConversionError;
1734    fn try_from(
1735        value: ::std::string::String,
1736    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1737        value.parse()
1738    }
1739}
1740///Coordinate space carried by one typed text render cache.
1741///
1742/// <details><summary>JSON schema</summary>
1743///
1744/// ```json
1745///{
1746///  "description": "Coordinate space carried by one typed text render cache.",
1747///  "type": "string",
1748///  "enum": [
1749///    "board",
1750///    "footprint_local"
1751///  ]
1752///}
1753/// ```
1754/// </details>
1755#[derive(
1756    ::serde::Deserialize,
1757    ::serde::Serialize,
1758    Clone,
1759    Copy,
1760    Debug,
1761    Eq,
1762    Hash,
1763    Ord,
1764    PartialEq,
1765    PartialOrd,
1766)]
1767pub enum PlotterTextRenderCacheCoordinateSpace {
1768    #[serde(rename = "board")]
1769    Board,
1770    #[serde(rename = "footprint_local")]
1771    FootprintLocal,
1772}
1773impl ::std::fmt::Display for PlotterTextRenderCacheCoordinateSpace {
1774    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1775        match *self {
1776            Self::Board => f.write_str("board"),
1777            Self::FootprintLocal => f.write_str("footprint_local"),
1778        }
1779    }
1780}
1781impl ::std::str::FromStr for PlotterTextRenderCacheCoordinateSpace {
1782    type Err = self::error::ConversionError;
1783    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1784        match value {
1785            "board" => Ok(Self::Board),
1786            "footprint_local" => Ok(Self::FootprintLocal),
1787            _ => Err("invalid value".into()),
1788        }
1789    }
1790}
1791impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheCoordinateSpace {
1792    type Error = self::error::ConversionError;
1793    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1794        value.parse()
1795    }
1796}
1797impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1798    type Error = self::error::ConversionError;
1799    fn try_from(
1800        value: &::std::string::String,
1801    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1802        value.parse()
1803    }
1804}
1805impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1806    type Error = self::error::ConversionError;
1807    fn try_from(
1808        value: ::std::string::String,
1809    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1810        value.parse()
1811    }
1812}
1813///Provenance of one attached text render cache.
1814///
1815/// <details><summary>JSON schema</summary>
1816///
1817/// ```json
1818///{
1819///  "description": "Provenance of one attached text render cache.",
1820///  "type": "string",
1821///  "enum": [
1822///    "existing_file_cache",
1823///    "python_generated_cache",
1824///    "native_generated_cache"
1825///  ]
1826///}
1827/// ```
1828/// </details>
1829#[derive(
1830    ::serde::Deserialize,
1831    ::serde::Serialize,
1832    Clone,
1833    Copy,
1834    Debug,
1835    Eq,
1836    Hash,
1837    Ord,
1838    PartialEq,
1839    PartialOrd,
1840)]
1841pub enum PlotterTextRenderCacheSource {
1842    #[serde(rename = "existing_file_cache")]
1843    ExistingFileCache,
1844    #[serde(rename = "python_generated_cache")]
1845    PythonGeneratedCache,
1846    #[serde(rename = "native_generated_cache")]
1847    NativeGeneratedCache,
1848}
1849impl ::std::fmt::Display for PlotterTextRenderCacheSource {
1850    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1851        match *self {
1852            Self::ExistingFileCache => f.write_str("existing_file_cache"),
1853            Self::PythonGeneratedCache => f.write_str("python_generated_cache"),
1854            Self::NativeGeneratedCache => f.write_str("native_generated_cache"),
1855        }
1856    }
1857}
1858impl ::std::str::FromStr for PlotterTextRenderCacheSource {
1859    type Err = self::error::ConversionError;
1860    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1861        match value {
1862            "existing_file_cache" => Ok(Self::ExistingFileCache),
1863            "python_generated_cache" => Ok(Self::PythonGeneratedCache),
1864            "native_generated_cache" => Ok(Self::NativeGeneratedCache),
1865            _ => Err("invalid value".into()),
1866        }
1867    }
1868}
1869impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheSource {
1870    type Error = self::error::ConversionError;
1871    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1872        value.parse()
1873    }
1874}
1875impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheSource {
1876    type Error = self::error::ConversionError;
1877    fn try_from(
1878        value: &::std::string::String,
1879    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1880        value.parse()
1881    }
1882}
1883impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheSource {
1884    type Error = self::error::ConversionError;
1885    fn try_from(
1886        value: ::std::string::String,
1887    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1888        value.parse()
1889    }
1890}
1891///Vertical text alignments emitted by the board producers.
1892///
1893/// <details><summary>JSON schema</summary>
1894///
1895/// ```json
1896///{
1897///  "description": "Vertical text alignments emitted by the board producers.",
1898///  "type": "string",
1899///  "enum": [
1900///    "GR_TEXT_V_ALIGN_TOP",
1901///    "GR_TEXT_V_ALIGN_CENTER",
1902///    "GR_TEXT_V_ALIGN_BOTTOM"
1903///  ]
1904///}
1905/// ```
1906/// </details>
1907#[derive(
1908    ::serde::Deserialize,
1909    ::serde::Serialize,
1910    Clone,
1911    Copy,
1912    Debug,
1913    Eq,
1914    Hash,
1915    Ord,
1916    PartialEq,
1917    PartialOrd,
1918)]
1919pub enum PlotterTextVAlign {
1920    #[serde(rename = "GR_TEXT_V_ALIGN_TOP")]
1921    GrTextVAlignTop,
1922    #[serde(rename = "GR_TEXT_V_ALIGN_CENTER")]
1923    GrTextVAlignCenter,
1924    #[serde(rename = "GR_TEXT_V_ALIGN_BOTTOM")]
1925    GrTextVAlignBottom,
1926}
1927impl ::std::fmt::Display for PlotterTextVAlign {
1928    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1929        match *self {
1930            Self::GrTextVAlignTop => f.write_str("GR_TEXT_V_ALIGN_TOP"),
1931            Self::GrTextVAlignCenter => f.write_str("GR_TEXT_V_ALIGN_CENTER"),
1932            Self::GrTextVAlignBottom => f.write_str("GR_TEXT_V_ALIGN_BOTTOM"),
1933        }
1934    }
1935}
1936impl ::std::str::FromStr for PlotterTextVAlign {
1937    type Err = self::error::ConversionError;
1938    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1939        match value {
1940            "GR_TEXT_V_ALIGN_TOP" => Ok(Self::GrTextVAlignTop),
1941            "GR_TEXT_V_ALIGN_CENTER" => Ok(Self::GrTextVAlignCenter),
1942            "GR_TEXT_V_ALIGN_BOTTOM" => Ok(Self::GrTextVAlignBottom),
1943            _ => Err("invalid value".into()),
1944        }
1945    }
1946}
1947impl ::std::convert::TryFrom<&str> for PlotterTextVAlign {
1948    type Error = self::error::ConversionError;
1949    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1950        value.parse()
1951    }
1952}
1953impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextVAlign {
1954    type Error = self::error::ConversionError;
1955    fn try_from(
1956        value: &::std::string::String,
1957    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1958        value.parse()
1959    }
1960}
1961impl ::std::convert::TryFrom<::std::string::String> for PlotterTextVAlign {
1962    type Error = self::error::ConversionError;
1963    fn try_from(
1964        value: ::std::string::String,
1965    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1966        value.parse()
1967    }
1968}
1969///Semantic roles allowed on board via flash operations.
1970///
1971/// <details><summary>JSON schema</summary>
1972///
1973/// ```json
1974///{
1975///  "description": "Semantic roles allowed on board via flash operations.",
1976///  "type": "string",
1977///  "enum": [
1978///    "via_aperture",
1979///    "via_mask_opening"
1980///  ]
1981///}
1982/// ```
1983/// </details>
1984#[derive(
1985    ::serde::Deserialize,
1986    ::serde::Serialize,
1987    Clone,
1988    Copy,
1989    Debug,
1990    Eq,
1991    Hash,
1992    Ord,
1993    PartialEq,
1994    PartialOrd,
1995)]
1996pub enum PlotterViaFlashRole {
1997    #[serde(rename = "via_aperture")]
1998    ViaAperture,
1999    #[serde(rename = "via_mask_opening")]
2000    ViaMaskOpening,
2001}
2002impl ::std::fmt::Display for PlotterViaFlashRole {
2003    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2004        match *self {
2005            Self::ViaAperture => f.write_str("via_aperture"),
2006            Self::ViaMaskOpening => f.write_str("via_mask_opening"),
2007        }
2008    }
2009}
2010impl ::std::str::FromStr for PlotterViaFlashRole {
2011    type Err = self::error::ConversionError;
2012    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2013        match value {
2014            "via_aperture" => Ok(Self::ViaAperture),
2015            "via_mask_opening" => Ok(Self::ViaMaskOpening),
2016            _ => Err("invalid value".into()),
2017        }
2018    }
2019}
2020impl ::std::convert::TryFrom<&str> for PlotterViaFlashRole {
2021    type Error = self::error::ConversionError;
2022    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2023        value.parse()
2024    }
2025}
2026impl ::std::convert::TryFrom<&::std::string::String> for PlotterViaFlashRole {
2027    type Error = self::error::ConversionError;
2028    fn try_from(
2029        value: &::std::string::String,
2030    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2031        value.parse()
2032    }
2033}
2034impl ::std::convert::TryFrom<::std::string::String> for PlotterViaFlashRole {
2035    type Error = self::error::ConversionError;
2036    fn try_from(
2037        value: ::std::string::String,
2038    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2039        value.parse()
2040    }
2041}
2042///`RecordString`
2043///
2044/// <details><summary>JSON schema</summary>
2045///
2046/// ```json
2047///{
2048///  "type": "object",
2049///  "additionalProperties": {
2050///    "type": "string"
2051///  }
2052///}
2053/// ```
2054/// </details>
2055#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2056#[serde(transparent)]
2057pub struct RecordString(
2058    pub ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
2059);
2060impl ::std::ops::Deref for RecordString {
2061    type Target = ::std::collections::BTreeMap<::std::string::String, ::std::string::String>;
2062    fn deref(&self) -> &::std::collections::BTreeMap<::std::string::String, ::std::string::String> {
2063        &self.0
2064    }
2065}
2066impl ::std::convert::From<RecordString>
2067    for ::std::collections::BTreeMap<::std::string::String, ::std::string::String>
2068{
2069    fn from(value: RecordString) -> Self {
2070        value.0
2071    }
2072}
2073impl
2074    ::std::convert::From<::std::collections::BTreeMap<::std::string::String, ::std::string::String>>
2075    for RecordString
2076{
2077    fn from(
2078        value: ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
2079    ) -> Self {
2080        Self(value)
2081    }
2082}
2083///Rectangle with square corners.
2084///
2085/// <details><summary>JSON schema</summary>
2086///
2087/// ```json
2088///{
2089///  "description": "Rectangle with square corners.",
2090///  "type": "object",
2091///  "required": [
2092///    "corner_radius_nm",
2093///    "fill",
2094///    "index",
2095///    "kind",
2096///    "width_nm",
2097///    "x1",
2098///    "x2",
2099///    "y1",
2100///    "y2"
2101///  ],
2102///  "properties": {
2103///    "corner_radius_nm": {
2104///      "$ref": "#/$defs/JavaScriptSafeInteger"
2105///    },
2106///    "fill": {
2107///      "$ref": "#/$defs/PlotterFill"
2108///    },
2109///    "fill_color": {
2110///      "type": "string"
2111///    },
2112///    "index": {
2113///      "type": "integer",
2114///      "maximum": 4294967295.0,
2115///      "minimum": 0.0
2116///    },
2117///    "kind": {
2118///      "type": "string",
2119///      "const": "Rect"
2120///    },
2121///    "layer": {
2122///      "type": "string"
2123///    },
2124///    "line_style": {
2125///      "$ref": "#/$defs/PlotterLineStyle"
2126///    },
2127///    "stroke_color": {
2128///      "type": "string"
2129///    },
2130///    "width_nm": {
2131///      "$ref": "#/$defs/JavaScriptSafeInteger"
2132///    },
2133///    "x1": {
2134///      "$ref": "#/$defs/JavaScriptSafeInteger"
2135///    },
2136///    "x2": {
2137///      "$ref": "#/$defs/JavaScriptSafeInteger"
2138///    },
2139///    "y1": {
2140///      "$ref": "#/$defs/JavaScriptSafeInteger"
2141///    },
2142///    "y2": {
2143///      "$ref": "#/$defs/JavaScriptSafeInteger"
2144///    }
2145///  },
2146///  "additionalProperties": false
2147///}
2148/// ```
2149/// </details>
2150#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2151#[serde(deny_unknown_fields)]
2152pub struct RectOperation {
2153    pub corner_radius_nm: crate::JavaScriptSafeInteger,
2154    pub fill: PlotterFill,
2155    #[serde(
2156        default,
2157        deserialize_with = "crate::deserialize_present_nonnull",
2158        skip_serializing_if = "::std::option::Option::is_none"
2159    )]
2160    pub fill_color: ::std::option::Option<::std::string::String>,
2161    pub index: u32,
2162    #[serde(deserialize_with = "crate::deserialize_rect_kind")]
2163    pub kind: ::std::string::String,
2164    #[serde(
2165        default,
2166        deserialize_with = "crate::deserialize_present_nonnull",
2167        skip_serializing_if = "::std::option::Option::is_none"
2168    )]
2169    pub layer: ::std::option::Option<::std::string::String>,
2170    #[serde(
2171        default,
2172        deserialize_with = "crate::deserialize_present_nonnull",
2173        skip_serializing_if = "::std::option::Option::is_none"
2174    )]
2175    pub line_style: ::std::option::Option<PlotterLineStyle>,
2176    #[serde(
2177        default,
2178        deserialize_with = "crate::deserialize_present_nonnull",
2179        skip_serializing_if = "::std::option::Option::is_none"
2180    )]
2181    pub stroke_color: ::std::option::Option<::std::string::String>,
2182    pub width_nm: crate::JavaScriptSafeInteger,
2183    pub x1: crate::JavaScriptSafeInteger,
2184    pub x2: crate::JavaScriptSafeInteger,
2185    pub y1: crate::JavaScriptSafeInteger,
2186    pub y2: crate::JavaScriptSafeInteger,
2187}
2188///One schematic bus-entry segment.
2189///
2190/// <details><summary>JSON schema</summary>
2191///
2192/// ```json
2193///{
2194///  "description": "One schematic bus-entry segment.",
2195///  "type": "object",
2196///  "required": [
2197///    "kind",
2198///    "object_id",
2199///    "operation_count",
2200///    "operations",
2201///    "uuid"
2202///  ],
2203///  "properties": {
2204///    "kind": {
2205///      "type": "string",
2206///      "const": "bus_entry"
2207///    },
2208///    "object_id": {
2209///      "type": "string"
2210///    },
2211///    "operation_count": {
2212///      "type": "integer",
2213///      "maximum": 4294967295.0,
2214///      "minimum": 0.0
2215///    },
2216///    "operations": {
2217///      "type": "array",
2218///      "items": {
2219///        "$ref": "#/$defs/PlotterOperation"
2220///      }
2221///    },
2222///    "uuid": {
2223///      "type": "string"
2224///    }
2225///  },
2226///  "additionalProperties": false
2227///}
2228/// ```
2229/// </details>
2230#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2231#[serde(deny_unknown_fields)]
2232pub struct SchematicBusEntryPlotRecord {
2233    #[serde(deserialize_with = "crate::deserialize_bus_entry_record_kind")]
2234    pub kind: ::std::string::String,
2235    pub object_id: ::std::string::String,
2236    pub operation_count: u32,
2237    pub operations: ::std::vec::Vec<PlotterOperation>,
2238    pub uuid: ::std::string::String,
2239}
2240///One schematic bus polyline.
2241///
2242/// <details><summary>JSON schema</summary>
2243///
2244/// ```json
2245///{
2246///  "description": "One schematic bus polyline.",
2247///  "type": "object",
2248///  "required": [
2249///    "kind",
2250///    "object_id",
2251///    "operation_count",
2252///    "operations",
2253///    "uuid"
2254///  ],
2255///  "properties": {
2256///    "kind": {
2257///      "type": "string",
2258///      "const": "bus"
2259///    },
2260///    "object_id": {
2261///      "type": "string"
2262///    },
2263///    "operation_count": {
2264///      "type": "integer",
2265///      "maximum": 4294967295.0,
2266///      "minimum": 0.0
2267///    },
2268///    "operations": {
2269///      "type": "array",
2270///      "items": {
2271///        "$ref": "#/$defs/PlotterOperation"
2272///      }
2273///    },
2274///    "uuid": {
2275///      "type": "string"
2276///    }
2277///  },
2278///  "additionalProperties": false
2279///}
2280/// ```
2281/// </details>
2282#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2283#[serde(deny_unknown_fields)]
2284pub struct SchematicBusPlotRecord {
2285    #[serde(deserialize_with = "crate::deserialize_bus_record_kind")]
2286    pub kind: ::std::string::String,
2287    pub object_id: ::std::string::String,
2288    pub operation_count: u32,
2289    pub operations: ::std::vec::Vec<PlotterOperation>,
2290    pub uuid: ::std::string::String,
2291}
2292///One global schematic label and its optional decoration.
2293///
2294/// <details><summary>JSON schema</summary>
2295///
2296/// ```json
2297///{
2298///  "description": "One global schematic label and its optional decoration.",
2299///  "type": "object",
2300///  "required": [
2301///    "kind",
2302///    "object_id",
2303///    "operation_count",
2304///    "operations",
2305///    "shape",
2306///    "text",
2307///    "uuid"
2308///  ],
2309///  "properties": {
2310///    "kind": {
2311///      "type": "string",
2312///      "const": "global_label"
2313///    },
2314///    "object_id": {
2315///      "type": "string"
2316///    },
2317///    "operation_count": {
2318///      "type": "integer",
2319///      "maximum": 4294967295.0,
2320///      "minimum": 0.0
2321///    },
2322///    "operations": {
2323///      "type": "array",
2324///      "items": {
2325///        "$ref": "#/$defs/PlotterOperation"
2326///      }
2327///    },
2328///    "shape": {
2329///      "$ref": "#/$defs/SchematicLabelShape"
2330///    },
2331///    "text": {
2332///      "type": "string"
2333///    },
2334///    "uuid": {
2335///      "type": "string"
2336///    }
2337///  },
2338///  "additionalProperties": false
2339///}
2340/// ```
2341/// </details>
2342#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2343#[serde(deny_unknown_fields)]
2344pub struct SchematicGlobalLabelPlotRecord {
2345    #[serde(deserialize_with = "crate::deserialize_global_label_record_kind")]
2346    pub kind: ::std::string::String,
2347    pub object_id: ::std::string::String,
2348    pub operation_count: u32,
2349    pub operations: ::std::vec::Vec<PlotterOperation>,
2350    pub shape: SchematicLabelShape,
2351    pub text: ::std::string::String,
2352    pub uuid: ::std::string::String,
2353}
2354///One top-level schematic graphic arc.
2355///
2356/// <details><summary>JSON schema</summary>
2357///
2358/// ```json
2359///{
2360///  "description": "One top-level schematic graphic arc.",
2361///  "type": "object",
2362///  "required": [
2363///    "kind",
2364///    "object_id",
2365///    "operation_count",
2366///    "operations",
2367///    "uuid"
2368///  ],
2369///  "properties": {
2370///    "kind": {
2371///      "type": "string",
2372///      "const": "graphic_arc"
2373///    },
2374///    "object_id": {
2375///      "type": "string"
2376///    },
2377///    "operation_count": {
2378///      "type": "integer",
2379///      "maximum": 4294967295.0,
2380///      "minimum": 0.0
2381///    },
2382///    "operations": {
2383///      "type": "array",
2384///      "items": {
2385///        "$ref": "#/$defs/PlotterOperation"
2386///      }
2387///    },
2388///    "uuid": {
2389///      "type": "string"
2390///    }
2391///  },
2392///  "additionalProperties": false
2393///}
2394/// ```
2395/// </details>
2396#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2397#[serde(deny_unknown_fields)]
2398pub struct SchematicGraphicArcPlotRecord {
2399    #[serde(deserialize_with = "crate::deserialize_graphic_arc_record_kind")]
2400    pub kind: ::std::string::String,
2401    pub object_id: ::std::string::String,
2402    pub operation_count: u32,
2403    pub operations: ::std::vec::Vec<PlotterOperation>,
2404    pub uuid: ::std::string::String,
2405}
2406///One canonical four-point top-level schematic graphic Bezier.
2407///
2408/// <details><summary>JSON schema</summary>
2409///
2410/// ```json
2411///{
2412///  "description": "One canonical four-point top-level schematic graphic Bezier.",
2413///  "type": "object",
2414///  "required": [
2415///    "kind",
2416///    "object_id",
2417///    "operation_count",
2418///    "operations",
2419///    "uuid"
2420///  ],
2421///  "properties": {
2422///    "kind": {
2423///      "type": "string",
2424///      "const": "graphic_bezier"
2425///    },
2426///    "object_id": {
2427///      "type": "string"
2428///    },
2429///    "operation_count": {
2430///      "type": "integer",
2431///      "maximum": 4294967295.0,
2432///      "minimum": 0.0
2433///    },
2434///    "operations": {
2435///      "type": "array",
2436///      "items": {
2437///        "$ref": "#/$defs/PlotterOperation"
2438///      }
2439///    },
2440///    "uuid": {
2441///      "type": "string"
2442///    }
2443///  },
2444///  "additionalProperties": false
2445///}
2446/// ```
2447/// </details>
2448#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2449#[serde(deny_unknown_fields)]
2450pub struct SchematicGraphicBezierPlotRecord {
2451    #[serde(deserialize_with = "crate::deserialize_graphic_bezier_record_kind")]
2452    pub kind: ::std::string::String,
2453    pub object_id: ::std::string::String,
2454    pub operation_count: u32,
2455    pub operations: ::std::vec::Vec<PlotterOperation>,
2456    pub uuid: ::std::string::String,
2457}
2458///One top-level schematic graphic circle.
2459///
2460/// <details><summary>JSON schema</summary>
2461///
2462/// ```json
2463///{
2464///  "description": "One top-level schematic graphic circle.",
2465///  "type": "object",
2466///  "required": [
2467///    "kind",
2468///    "object_id",
2469///    "operation_count",
2470///    "operations",
2471///    "uuid"
2472///  ],
2473///  "properties": {
2474///    "kind": {
2475///      "type": "string",
2476///      "const": "graphic_circle"
2477///    },
2478///    "object_id": {
2479///      "type": "string"
2480///    },
2481///    "operation_count": {
2482///      "type": "integer",
2483///      "maximum": 4294967295.0,
2484///      "minimum": 0.0
2485///    },
2486///    "operations": {
2487///      "type": "array",
2488///      "items": {
2489///        "$ref": "#/$defs/PlotterOperation"
2490///      }
2491///    },
2492///    "uuid": {
2493///      "type": "string"
2494///    }
2495///  },
2496///  "additionalProperties": false
2497///}
2498/// ```
2499/// </details>
2500#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2501#[serde(deny_unknown_fields)]
2502pub struct SchematicGraphicCirclePlotRecord {
2503    #[serde(deserialize_with = "crate::deserialize_graphic_circle_record_kind")]
2504    pub kind: ::std::string::String,
2505    pub object_id: ::std::string::String,
2506    pub operation_count: u32,
2507    pub operations: ::std::vec::Vec<PlotterOperation>,
2508    pub uuid: ::std::string::String,
2509}
2510///One top-level schematic graphic polyline.
2511///
2512/// <details><summary>JSON schema</summary>
2513///
2514/// ```json
2515///{
2516///  "description": "One top-level schematic graphic polyline.",
2517///  "type": "object",
2518///  "required": [
2519///    "kind",
2520///    "object_id",
2521///    "operation_count",
2522///    "operations",
2523///    "uuid"
2524///  ],
2525///  "properties": {
2526///    "kind": {
2527///      "type": "string",
2528///      "const": "graphic_polyline"
2529///    },
2530///    "object_id": {
2531///      "type": "string"
2532///    },
2533///    "operation_count": {
2534///      "type": "integer",
2535///      "maximum": 4294967295.0,
2536///      "minimum": 0.0
2537///    },
2538///    "operations": {
2539///      "type": "array",
2540///      "items": {
2541///        "$ref": "#/$defs/PlotterOperation"
2542///      }
2543///    },
2544///    "uuid": {
2545///      "type": "string"
2546///    }
2547///  },
2548///  "additionalProperties": false
2549///}
2550/// ```
2551/// </details>
2552#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2553#[serde(deny_unknown_fields)]
2554pub struct SchematicGraphicPolylinePlotRecord {
2555    #[serde(deserialize_with = "crate::deserialize_graphic_polyline_record_kind")]
2556    pub kind: ::std::string::String,
2557    pub object_id: ::std::string::String,
2558    pub operation_count: u32,
2559    pub operations: ::std::vec::Vec<PlotterOperation>,
2560    pub uuid: ::std::string::String,
2561}
2562///One top-level schematic graphic rectangle.
2563///
2564/// <details><summary>JSON schema</summary>
2565///
2566/// ```json
2567///{
2568///  "description": "One top-level schematic graphic rectangle.",
2569///  "type": "object",
2570///  "required": [
2571///    "kind",
2572///    "object_id",
2573///    "operation_count",
2574///    "operations",
2575///    "uuid"
2576///  ],
2577///  "properties": {
2578///    "kind": {
2579///      "type": "string",
2580///      "const": "graphic_rectangle"
2581///    },
2582///    "object_id": {
2583///      "type": "string"
2584///    },
2585///    "operation_count": {
2586///      "type": "integer",
2587///      "maximum": 4294967295.0,
2588///      "minimum": 0.0
2589///    },
2590///    "operations": {
2591///      "type": "array",
2592///      "items": {
2593///        "$ref": "#/$defs/PlotterOperation"
2594///      }
2595///    },
2596///    "uuid": {
2597///      "type": "string"
2598///    }
2599///  },
2600///  "additionalProperties": false
2601///}
2602/// ```
2603/// </details>
2604#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2605#[serde(deny_unknown_fields)]
2606pub struct SchematicGraphicRectanglePlotRecord {
2607    #[serde(deserialize_with = "crate::deserialize_graphic_rectangle_record_kind")]
2608    pub kind: ::std::string::String,
2609    pub object_id: ::std::string::String,
2610    pub operation_count: u32,
2611    pub operations: ::std::vec::Vec<PlotterOperation>,
2612    pub uuid: ::std::string::String,
2613}
2614///One hierarchical schematic label and its optional decoration.
2615///
2616/// <details><summary>JSON schema</summary>
2617///
2618/// ```json
2619///{
2620///  "description": "One hierarchical schematic label and its optional decoration.",
2621///  "type": "object",
2622///  "required": [
2623///    "kind",
2624///    "object_id",
2625///    "operation_count",
2626///    "operations",
2627///    "shape",
2628///    "text",
2629///    "uuid"
2630///  ],
2631///  "properties": {
2632///    "kind": {
2633///      "type": "string",
2634///      "const": "hierarchical_label"
2635///    },
2636///    "object_id": {
2637///      "type": "string"
2638///    },
2639///    "operation_count": {
2640///      "type": "integer",
2641///      "maximum": 4294967295.0,
2642///      "minimum": 0.0
2643///    },
2644///    "operations": {
2645///      "type": "array",
2646///      "items": {
2647///        "$ref": "#/$defs/PlotterOperation"
2648///      }
2649///    },
2650///    "shape": {
2651///      "$ref": "#/$defs/SchematicLabelShape"
2652///    },
2653///    "text": {
2654///      "type": "string"
2655///    },
2656///    "uuid": {
2657///      "type": "string"
2658///    }
2659///  },
2660///  "additionalProperties": false
2661///}
2662/// ```
2663/// </details>
2664#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2665#[serde(deny_unknown_fields)]
2666pub struct SchematicHierarchicalLabelPlotRecord {
2667    #[serde(deserialize_with = "crate::deserialize_hierarchical_label_record_kind")]
2668    pub kind: ::std::string::String,
2669    pub object_id: ::std::string::String,
2670    pub operation_count: u32,
2671    pub operations: ::std::vec::Vec<PlotterOperation>,
2672    pub shape: SchematicLabelShape,
2673    pub text: ::std::string::String,
2674    pub uuid: ::std::string::String,
2675}
2676///Decoded image formats admitted by the schematic image family.
2677///
2678/// <details><summary>JSON schema</summary>
2679///
2680/// ```json
2681///{
2682///  "description": "Decoded image formats admitted by the schematic image family.",
2683///  "type": "string",
2684///  "enum": [
2685///    "png",
2686///    "jpeg",
2687///    "bmp"
2688///  ]
2689///}
2690/// ```
2691/// </details>
2692#[derive(
2693    ::serde::Deserialize,
2694    ::serde::Serialize,
2695    Clone,
2696    Copy,
2697    Debug,
2698    Eq,
2699    Hash,
2700    Ord,
2701    PartialEq,
2702    PartialOrd,
2703)]
2704pub enum SchematicImageFormat {
2705    #[serde(rename = "png")]
2706    Png,
2707    #[serde(rename = "jpeg")]
2708    Jpeg,
2709    #[serde(rename = "bmp")]
2710    Bmp,
2711}
2712impl ::std::fmt::Display for SchematicImageFormat {
2713    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2714        match *self {
2715            Self::Png => f.write_str("png"),
2716            Self::Jpeg => f.write_str("jpeg"),
2717            Self::Bmp => f.write_str("bmp"),
2718        }
2719    }
2720}
2721impl ::std::str::FromStr for SchematicImageFormat {
2722    type Err = self::error::ConversionError;
2723    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2724        match value {
2725            "png" => Ok(Self::Png),
2726            "jpeg" => Ok(Self::Jpeg),
2727            "bmp" => Ok(Self::Bmp),
2728            _ => Err("invalid value".into()),
2729        }
2730    }
2731}
2732impl ::std::convert::TryFrom<&str> for SchematicImageFormat {
2733    type Error = self::error::ConversionError;
2734    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2735        value.parse()
2736    }
2737}
2738impl ::std::convert::TryFrom<&::std::string::String> for SchematicImageFormat {
2739    type Error = self::error::ConversionError;
2740    fn try_from(
2741        value: &::std::string::String,
2742    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2743        value.parse()
2744    }
2745}
2746impl ::std::convert::TryFrom<::std::string::String> for SchematicImageFormat {
2747    type Error = self::error::ConversionError;
2748    fn try_from(
2749        value: ::std::string::String,
2750    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2751        value.parse()
2752    }
2753}
2754///One decoded embedded schematic image.
2755///
2756/// <details><summary>JSON schema</summary>
2757///
2758/// ```json
2759///{
2760///  "description": "One decoded embedded schematic image.",
2761///  "type": "object",
2762///  "required": [
2763///    "height_nm",
2764///    "image_format",
2765///    "kind",
2766///    "object_id",
2767///    "operation_count",
2768///    "operations",
2769///    "scale",
2770///    "uuid",
2771///    "width_nm"
2772///  ],
2773///  "properties": {
2774///    "height_nm": {
2775///      "$ref": "#/$defs/JavaScriptSafeInteger"
2776///    },
2777///    "image_format": {
2778///      "$ref": "#/$defs/SchematicImageFormat"
2779///    },
2780///    "kind": {
2781///      "type": "string",
2782///      "const": "image"
2783///    },
2784///    "object_id": {
2785///      "type": "string"
2786///    },
2787///    "operation_count": {
2788///      "type": "integer",
2789///      "maximum": 4294967295.0,
2790///      "minimum": 0.0
2791///    },
2792///    "operations": {
2793///      "type": "array",
2794///      "items": {
2795///        "$ref": "#/$defs/PlotterOperation"
2796///      }
2797///    },
2798///    "scale": {
2799///      "type": "number"
2800///    },
2801///    "uuid": {
2802///      "type": "string"
2803///    },
2804///    "width_nm": {
2805///      "$ref": "#/$defs/JavaScriptSafeInteger"
2806///    }
2807///  },
2808///  "additionalProperties": false
2809///}
2810/// ```
2811/// </details>
2812#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2813#[serde(deny_unknown_fields)]
2814pub struct SchematicImagePlotRecord {
2815    pub height_nm: crate::JavaScriptSafeInteger,
2816    pub image_format: SchematicImageFormat,
2817    #[serde(deserialize_with = "crate::deserialize_image_record_kind")]
2818    pub kind: ::std::string::String,
2819    pub object_id: ::std::string::String,
2820    pub operation_count: u32,
2821    pub operations: ::std::vec::Vec<PlotterOperation>,
2822    pub scale: f64,
2823    pub uuid: ::std::string::String,
2824    pub width_nm: crate::JavaScriptSafeInteger,
2825}
2826///One schematic junction marker.
2827///
2828/// <details><summary>JSON schema</summary>
2829///
2830/// ```json
2831///{
2832///  "description": "One schematic junction marker.",
2833///  "type": "object",
2834///  "required": [
2835///    "kind",
2836///    "object_id",
2837///    "operation_count",
2838///    "operations",
2839///    "uuid"
2840///  ],
2841///  "properties": {
2842///    "color": {
2843///      "description": "Authored junction color; null preserves an authored transparent color.",
2844///      "anyOf": [
2845///        {
2846///          "type": "string"
2847///        },
2848///        {
2849///          "type": "null"
2850///        }
2851///      ]
2852///    },
2853///    "kind": {
2854///      "type": "string",
2855///      "const": "junction"
2856///    },
2857///    "object_id": {
2858///      "type": "string"
2859///    },
2860///    "operation_count": {
2861///      "type": "integer",
2862///      "maximum": 4294967295.0,
2863///      "minimum": 0.0
2864///    },
2865///    "operations": {
2866///      "type": "array",
2867///      "items": {
2868///        "$ref": "#/$defs/PlotterOperation"
2869///      }
2870///    },
2871///    "uuid": {
2872///      "type": "string"
2873///    }
2874///  },
2875///  "additionalProperties": false
2876///}
2877/// ```
2878/// </details>
2879#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2880#[serde(deny_unknown_fields)]
2881pub struct SchematicJunctionPlotRecord {
2882    ///Authored junction color; null preserves an authored transparent color.
2883    #[serde(
2884        default,
2885        deserialize_with = "crate::deserialize_present_nullable_string",
2886        skip_serializing_if = "::std::option::Option::is_none"
2887    )]
2888    pub color: ::std::option::Option<::std::option::Option<::std::string::String>>,
2889    #[serde(deserialize_with = "crate::deserialize_junction_record_kind")]
2890    pub kind: ::std::string::String,
2891    pub object_id: ::std::string::String,
2892    pub operation_count: u32,
2893    pub operations: ::std::vec::Vec<PlotterOperation>,
2894    pub uuid: ::std::string::String,
2895}
2896///One local schematic label.
2897///
2898/// <details><summary>JSON schema</summary>
2899///
2900/// ```json
2901///{
2902///  "description": "One local schematic label.",
2903///  "type": "object",
2904///  "required": [
2905///    "kind",
2906///    "object_id",
2907///    "operation_count",
2908///    "operations",
2909///    "text",
2910///    "uuid"
2911///  ],
2912///  "properties": {
2913///    "kind": {
2914///      "type": "string",
2915///      "const": "label"
2916///    },
2917///    "object_id": {
2918///      "type": "string"
2919///    },
2920///    "operation_count": {
2921///      "type": "integer",
2922///      "maximum": 4294967295.0,
2923///      "minimum": 0.0
2924///    },
2925///    "operations": {
2926///      "type": "array",
2927///      "items": {
2928///        "$ref": "#/$defs/PlotterOperation"
2929///      }
2930///    },
2931///    "text": {
2932///      "type": "string"
2933///    },
2934///    "uuid": {
2935///      "type": "string"
2936///    }
2937///  },
2938///  "additionalProperties": false
2939///}
2940/// ```
2941/// </details>
2942#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2943#[serde(deny_unknown_fields)]
2944pub struct SchematicLabelPlotRecord {
2945    #[serde(deserialize_with = "crate::deserialize_label_record_kind")]
2946    pub kind: ::std::string::String,
2947    pub object_id: ::std::string::String,
2948    pub operation_count: u32,
2949    pub operations: ::std::vec::Vec<PlotterOperation>,
2950    pub text: ::std::string::String,
2951    pub uuid: ::std::string::String,
2952}
2953///Signal-direction shapes preserved on global and hierarchical labels.
2954///
2955/// <details><summary>JSON schema</summary>
2956///
2957/// ```json
2958///{
2959///  "description": "Signal-direction shapes preserved on global and hierarchical labels.",
2960///  "type": "string",
2961///  "enum": [
2962///    "input",
2963///    "output",
2964///    "bidirectional",
2965///    "tri_state",
2966///    "passive",
2967///    "dot",
2968///    "round",
2969///    "diamond",
2970///    "rectangle"
2971///  ]
2972///}
2973/// ```
2974/// </details>
2975#[derive(
2976    ::serde::Deserialize,
2977    ::serde::Serialize,
2978    Clone,
2979    Copy,
2980    Debug,
2981    Eq,
2982    Hash,
2983    Ord,
2984    PartialEq,
2985    PartialOrd,
2986)]
2987pub enum SchematicLabelShape {
2988    #[serde(rename = "input")]
2989    Input,
2990    #[serde(rename = "output")]
2991    Output,
2992    #[serde(rename = "bidirectional")]
2993    Bidirectional,
2994    #[serde(rename = "tri_state")]
2995    TriState,
2996    #[serde(rename = "passive")]
2997    Passive,
2998    #[serde(rename = "dot")]
2999    Dot,
3000    #[serde(rename = "round")]
3001    Round,
3002    #[serde(rename = "diamond")]
3003    Diamond,
3004    #[serde(rename = "rectangle")]
3005    Rectangle,
3006}
3007impl ::std::fmt::Display for SchematicLabelShape {
3008    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3009        match *self {
3010            Self::Input => f.write_str("input"),
3011            Self::Output => f.write_str("output"),
3012            Self::Bidirectional => f.write_str("bidirectional"),
3013            Self::TriState => f.write_str("tri_state"),
3014            Self::Passive => f.write_str("passive"),
3015            Self::Dot => f.write_str("dot"),
3016            Self::Round => f.write_str("round"),
3017            Self::Diamond => f.write_str("diamond"),
3018            Self::Rectangle => f.write_str("rectangle"),
3019        }
3020    }
3021}
3022impl ::std::str::FromStr for SchematicLabelShape {
3023    type Err = self::error::ConversionError;
3024    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3025        match value {
3026            "input" => Ok(Self::Input),
3027            "output" => Ok(Self::Output),
3028            "bidirectional" => Ok(Self::Bidirectional),
3029            "tri_state" => Ok(Self::TriState),
3030            "passive" => Ok(Self::Passive),
3031            "dot" => Ok(Self::Dot),
3032            "round" => Ok(Self::Round),
3033            "diamond" => Ok(Self::Diamond),
3034            "rectangle" => Ok(Self::Rectangle),
3035            _ => Err("invalid value".into()),
3036        }
3037    }
3038}
3039impl ::std::convert::TryFrom<&str> for SchematicLabelShape {
3040    type Error = self::error::ConversionError;
3041    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3042        value.parse()
3043    }
3044}
3045impl ::std::convert::TryFrom<&::std::string::String> for SchematicLabelShape {
3046    type Error = self::error::ConversionError;
3047    fn try_from(
3048        value: &::std::string::String,
3049    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3050        value.parse()
3051    }
3052}
3053impl ::std::convert::TryFrom<::std::string::String> for SchematicLabelShape {
3054    type Error = self::error::ConversionError;
3055    fn try_from(
3056        value: ::std::string::String,
3057    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3058        value.parse()
3059    }
3060}
3061///One netclass/directive flag with its visible property text.
3062///
3063/// <details><summary>JSON schema</summary>
3064///
3065/// ```json
3066///{
3067///  "description": "One netclass/directive flag with its visible property text.",
3068///  "type": "object",
3069///  "required": [
3070///    "at_x_nm",
3071///    "at_y_nm",
3072///    "kind",
3073///    "length_nm",
3074///    "object_id",
3075///    "operation_count",
3076///    "operations",
3077///    "shape",
3078///    "uuid"
3079///  ],
3080///  "properties": {
3081///    "at_x_nm": {
3082///      "$ref": "#/$defs/JavaScriptSafeInteger"
3083///    },
3084///    "at_y_nm": {
3085///      "$ref": "#/$defs/JavaScriptSafeInteger"
3086///    },
3087///    "kind": {
3088///      "type": "string",
3089///      "const": "netclass_flag"
3090///    },
3091///    "length_nm": {
3092///      "$ref": "#/$defs/JavaScriptSafeInteger"
3093///    },
3094///    "object_id": {
3095///      "type": "string"
3096///    },
3097///    "operation_count": {
3098///      "type": "integer",
3099///      "maximum": 4294967295.0,
3100///      "minimum": 0.0
3101///    },
3102///    "operations": {
3103///      "type": "array",
3104///      "items": {
3105///        "$ref": "#/$defs/PlotterOperation"
3106///      }
3107///    },
3108///    "shape": {
3109///      "$ref": "#/$defs/SchematicNetclassFlagShape"
3110///    },
3111///    "uuid": {
3112///      "type": "string"
3113///    }
3114///  },
3115///  "additionalProperties": false
3116///}
3117/// ```
3118/// </details>
3119#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3120#[serde(deny_unknown_fields)]
3121pub struct SchematicNetclassFlagPlotRecord {
3122    pub at_x_nm: crate::JavaScriptSafeInteger,
3123    pub at_y_nm: crate::JavaScriptSafeInteger,
3124    #[serde(deserialize_with = "crate::deserialize_netclass_flag_record_kind")]
3125    pub kind: ::std::string::String,
3126    pub length_nm: crate::JavaScriptSafeInteger,
3127    pub object_id: ::std::string::String,
3128    pub operation_count: u32,
3129    pub operations: ::std::vec::Vec<PlotterOperation>,
3130    pub shape: SchematicNetclassFlagShape,
3131    pub uuid: ::std::string::String,
3132}
3133///Marker shapes admitted by schematic netclass/directive flags.
3134///
3135/// <details><summary>JSON schema</summary>
3136///
3137/// ```json
3138///{
3139///  "description": "Marker shapes admitted by schematic netclass/directive flags.",
3140///  "type": "string",
3141///  "enum": [
3142///    "round",
3143///    "dot",
3144///    "diamond",
3145///    "rectangle"
3146///  ]
3147///}
3148/// ```
3149/// </details>
3150#[derive(
3151    ::serde::Deserialize,
3152    ::serde::Serialize,
3153    Clone,
3154    Copy,
3155    Debug,
3156    Eq,
3157    Hash,
3158    Ord,
3159    PartialEq,
3160    PartialOrd,
3161)]
3162pub enum SchematicNetclassFlagShape {
3163    #[serde(rename = "round")]
3164    Round,
3165    #[serde(rename = "dot")]
3166    Dot,
3167    #[serde(rename = "diamond")]
3168    Diamond,
3169    #[serde(rename = "rectangle")]
3170    Rectangle,
3171}
3172impl ::std::fmt::Display for SchematicNetclassFlagShape {
3173    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3174        match *self {
3175            Self::Round => f.write_str("round"),
3176            Self::Dot => f.write_str("dot"),
3177            Self::Diamond => f.write_str("diamond"),
3178            Self::Rectangle => f.write_str("rectangle"),
3179        }
3180    }
3181}
3182impl ::std::str::FromStr for SchematicNetclassFlagShape {
3183    type Err = self::error::ConversionError;
3184    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3185        match value {
3186            "round" => Ok(Self::Round),
3187            "dot" => Ok(Self::Dot),
3188            "diamond" => Ok(Self::Diamond),
3189            "rectangle" => Ok(Self::Rectangle),
3190            _ => Err("invalid value".into()),
3191        }
3192    }
3193}
3194impl ::std::convert::TryFrom<&str> for SchematicNetclassFlagShape {
3195    type Error = self::error::ConversionError;
3196    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3197        value.parse()
3198    }
3199}
3200impl ::std::convert::TryFrom<&::std::string::String> for SchematicNetclassFlagShape {
3201    type Error = self::error::ConversionError;
3202    fn try_from(
3203        value: &::std::string::String,
3204    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3205        value.parse()
3206    }
3207}
3208impl ::std::convert::TryFrom<::std::string::String> for SchematicNetclassFlagShape {
3209    type Error = self::error::ConversionError;
3210    fn try_from(
3211        value: ::std::string::String,
3212    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3213        value.parse()
3214    }
3215}
3216///One schematic no-connect cross.
3217///
3218/// <details><summary>JSON schema</summary>
3219///
3220/// ```json
3221///{
3222///  "description": "One schematic no-connect cross.",
3223///  "type": "object",
3224///  "required": [
3225///    "kind",
3226///    "object_id",
3227///    "operation_count",
3228///    "operations",
3229///    "uuid"
3230///  ],
3231///  "properties": {
3232///    "kind": {
3233///      "type": "string",
3234///      "const": "no_connect"
3235///    },
3236///    "object_id": {
3237///      "type": "string"
3238///    },
3239///    "operation_count": {
3240///      "type": "integer",
3241///      "maximum": 4294967295.0,
3242///      "minimum": 0.0
3243///    },
3244///    "operations": {
3245///      "type": "array",
3246///      "items": {
3247///        "$ref": "#/$defs/PlotterOperation"
3248///      }
3249///    },
3250///    "uuid": {
3251///      "type": "string"
3252///    }
3253///  },
3254///  "additionalProperties": false
3255///}
3256/// ```
3257/// </details>
3258#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3259#[serde(deny_unknown_fields)]
3260pub struct SchematicNoConnectPlotRecord {
3261    #[serde(deserialize_with = "crate::deserialize_no_connect_record_kind")]
3262    pub kind: ::std::string::String,
3263    pub object_id: ::std::string::String,
3264    pub operation_count: u32,
3265    pub operations: ::std::vec::Vec<PlotterOperation>,
3266    pub uuid: ::std::string::String,
3267}
3268///Exact page extent of one schematic instance.
3269///
3270/// <details><summary>JSON schema</summary>
3271///
3272/// ```json
3273///{
3274///  "description": "Exact page extent of one schematic instance.",
3275///  "type": "object",
3276///  "required": [
3277///    "height_nm",
3278///    "width_nm"
3279///  ],
3280///  "properties": {
3281///    "height_nm": {
3282///      "$ref": "#/$defs/JavaScriptSafeInteger"
3283///    },
3284///    "width_nm": {
3285///      "$ref": "#/$defs/JavaScriptSafeInteger"
3286///    }
3287///  },
3288///  "additionalProperties": false
3289///}
3290/// ```
3291/// </details>
3292#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3293#[serde(deny_unknown_fields)]
3294pub struct SchematicPlotCanvas {
3295    pub height_nm: crate::JavaScriptSafeInteger,
3296    pub width_nm: crate::JavaScriptSafeInteger,
3297}
3298///Strict schematic subset through the P5_071 hierarchical-sheet family.
3299///
3300/// <details><summary>JSON schema</summary>
3301///
3302/// ```json
3303///{
3304///  "$id": "urn:wavenumber:schema:kicad_monkey.schematic_plot.document:a0",
3305///  "title": "Schematic plot document a0",
3306///  "description": "Strict schematic subset through the P5_071 hierarchical-sheet family.",
3307///  "type": "object",
3308///  "required": [
3309///    "canvas",
3310///    "coordinate_space",
3311///    "document_id",
3312///    "records",
3313///    "schema",
3314///    "source_kind",
3315///    "total_operations"
3316///  ],
3317///  "properties": {
3318///    "canvas": {
3319///      "$ref": "#/$defs/SchematicPlotCanvas"
3320///    },
3321///    "coordinate_space": {
3322///      "$ref": "#/$defs/PlotterCoordinateSpace"
3323///    },
3324///    "document_id": {
3325///      "type": "string"
3326///    },
3327///    "records": {
3328///      "type": "array",
3329///      "items": {
3330///        "$ref": "#/$defs/SchematicPlotRecord"
3331///      }
3332///    },
3333///    "schema": {
3334///      "type": "string",
3335///      "const": "kicad.plotter_ir.a0"
3336///    },
3337///    "source_kind": {
3338///      "type": "string",
3339///      "const": "SCH"
3340///    },
3341///    "source_path": {
3342///      "type": "string"
3343///    },
3344///    "total_operations": {
3345///      "type": "integer",
3346///      "maximum": 4294967295.0,
3347///      "minimum": 0.0
3348///    }
3349///  },
3350///  "additionalProperties": false
3351///}
3352/// ```
3353/// </details>
3354#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3355#[serde(deny_unknown_fields)]
3356pub struct SchematicPlotDocumentA0 {
3357    pub canvas: SchematicPlotCanvas,
3358    pub coordinate_space: PlotterCoordinateSpace,
3359    pub document_id: ::std::string::String,
3360    pub records: ::std::vec::Vec<SchematicPlotRecord>,
3361    pub schema: ::std::string::String,
3362    pub source_kind: ::std::string::String,
3363    #[serde(
3364        default,
3365        deserialize_with = "crate::deserialize_present_nonnull",
3366        skip_serializing_if = "::std::option::Option::is_none"
3367    )]
3368    pub source_path: ::std::option::Option<::std::string::String>,
3369    pub total_operations: u32,
3370}
3371///Strict source-record vocabulary through the P5_071 hierarchical sheets.
3372///
3373/// <details><summary>JSON schema</summary>
3374///
3375/// ```json
3376///{
3377///  "description": "Strict source-record vocabulary through the P5_071 hierarchical sheets.",
3378///  "oneOf": [
3379///    {
3380///      "$ref": "#/$defs/SchematicSheetHeaderPlotRecord"
3381///    },
3382///    {
3383///      "$ref": "#/$defs/SchematicWirePlotRecord"
3384///    },
3385///    {
3386///      "$ref": "#/$defs/SchematicBusPlotRecord"
3387///    },
3388///    {
3389///      "$ref": "#/$defs/SchematicBusEntryPlotRecord"
3390///    },
3391///    {
3392///      "$ref": "#/$defs/SchematicJunctionPlotRecord"
3393///    },
3394///    {
3395///      "$ref": "#/$defs/SchematicNoConnectPlotRecord"
3396///    },
3397///    {
3398///      "$ref": "#/$defs/SchematicLabelPlotRecord"
3399///    },
3400///    {
3401///      "$ref": "#/$defs/SchematicGlobalLabelPlotRecord"
3402///    },
3403///    {
3404///      "$ref": "#/$defs/SchematicHierarchicalLabelPlotRecord"
3405///    },
3406///    {
3407///      "$ref": "#/$defs/SchematicNetclassFlagPlotRecord"
3408///    },
3409///    {
3410///      "$ref": "#/$defs/SchematicTextPlotRecord"
3411///    },
3412///    {
3413///      "$ref": "#/$defs/SchematicTextBoxPlotRecord"
3414///    },
3415///    {
3416///      "$ref": "#/$defs/SchematicGraphicPolylinePlotRecord"
3417///    },
3418///    {
3419///      "$ref": "#/$defs/SchematicGraphicArcPlotRecord"
3420///    },
3421///    {
3422///      "$ref": "#/$defs/SchematicGraphicCirclePlotRecord"
3423///    },
3424///    {
3425///      "$ref": "#/$defs/SchematicGraphicRectanglePlotRecord"
3426///    },
3427///    {
3428///      "$ref": "#/$defs/SchematicGraphicBezierPlotRecord"
3429///    },
3430///    {
3431///      "$ref": "#/$defs/SchematicRuleAreaPlotRecord"
3432///    },
3433///    {
3434///      "$ref": "#/$defs/SchematicImagePlotRecord"
3435///    },
3436///    {
3437///      "$ref": "#/$defs/SchematicTablePlotRecord"
3438///    },
3439///    {
3440///      "$ref": "#/$defs/SchematicSymbolInstancePlotRecord"
3441///    },
3442///    {
3443///      "$ref": "#/$defs/SchematicSymbolOverplotPlotRecord"
3444///    },
3445///    {
3446///      "$ref": "#/$defs/SchematicSheetPlotRecord"
3447///    }
3448///  ]
3449///}
3450/// ```
3451/// </details>
3452#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3453#[serde(untagged)]
3454pub enum SchematicPlotRecord {
3455    SheetHeaderPlotRecord(SchematicSheetHeaderPlotRecord),
3456    WirePlotRecord(SchematicWirePlotRecord),
3457    BusPlotRecord(SchematicBusPlotRecord),
3458    BusEntryPlotRecord(SchematicBusEntryPlotRecord),
3459    JunctionPlotRecord(SchematicJunctionPlotRecord),
3460    NoConnectPlotRecord(SchematicNoConnectPlotRecord),
3461    LabelPlotRecord(SchematicLabelPlotRecord),
3462    GlobalLabelPlotRecord(SchematicGlobalLabelPlotRecord),
3463    HierarchicalLabelPlotRecord(SchematicHierarchicalLabelPlotRecord),
3464    NetclassFlagPlotRecord(SchematicNetclassFlagPlotRecord),
3465    TextPlotRecord(SchematicTextPlotRecord),
3466    TextBoxPlotRecord(SchematicTextBoxPlotRecord),
3467    GraphicPolylinePlotRecord(SchematicGraphicPolylinePlotRecord),
3468    GraphicArcPlotRecord(SchematicGraphicArcPlotRecord),
3469    GraphicCirclePlotRecord(SchematicGraphicCirclePlotRecord),
3470    GraphicRectanglePlotRecord(SchematicGraphicRectanglePlotRecord),
3471    GraphicBezierPlotRecord(SchematicGraphicBezierPlotRecord),
3472    RuleAreaPlotRecord(SchematicRuleAreaPlotRecord),
3473    ImagePlotRecord(SchematicImagePlotRecord),
3474    TablePlotRecord(SchematicTablePlotRecord),
3475    SymbolInstancePlotRecord(SchematicSymbolInstancePlotRecord),
3476    SymbolOverplotPlotRecord(SchematicSymbolOverplotPlotRecord),
3477    SheetPlotRecord(SchematicSheetPlotRecord),
3478}
3479impl ::std::convert::From<SchematicSheetHeaderPlotRecord> for SchematicPlotRecord {
3480    fn from(value: SchematicSheetHeaderPlotRecord) -> Self {
3481        Self::SheetHeaderPlotRecord(value)
3482    }
3483}
3484impl ::std::convert::From<SchematicWirePlotRecord> for SchematicPlotRecord {
3485    fn from(value: SchematicWirePlotRecord) -> Self {
3486        Self::WirePlotRecord(value)
3487    }
3488}
3489impl ::std::convert::From<SchematicBusPlotRecord> for SchematicPlotRecord {
3490    fn from(value: SchematicBusPlotRecord) -> Self {
3491        Self::BusPlotRecord(value)
3492    }
3493}
3494impl ::std::convert::From<SchematicBusEntryPlotRecord> for SchematicPlotRecord {
3495    fn from(value: SchematicBusEntryPlotRecord) -> Self {
3496        Self::BusEntryPlotRecord(value)
3497    }
3498}
3499impl ::std::convert::From<SchematicJunctionPlotRecord> for SchematicPlotRecord {
3500    fn from(value: SchematicJunctionPlotRecord) -> Self {
3501        Self::JunctionPlotRecord(value)
3502    }
3503}
3504impl ::std::convert::From<SchematicNoConnectPlotRecord> for SchematicPlotRecord {
3505    fn from(value: SchematicNoConnectPlotRecord) -> Self {
3506        Self::NoConnectPlotRecord(value)
3507    }
3508}
3509impl ::std::convert::From<SchematicLabelPlotRecord> for SchematicPlotRecord {
3510    fn from(value: SchematicLabelPlotRecord) -> Self {
3511        Self::LabelPlotRecord(value)
3512    }
3513}
3514impl ::std::convert::From<SchematicGlobalLabelPlotRecord> for SchematicPlotRecord {
3515    fn from(value: SchematicGlobalLabelPlotRecord) -> Self {
3516        Self::GlobalLabelPlotRecord(value)
3517    }
3518}
3519impl ::std::convert::From<SchematicHierarchicalLabelPlotRecord> for SchematicPlotRecord {
3520    fn from(value: SchematicHierarchicalLabelPlotRecord) -> Self {
3521        Self::HierarchicalLabelPlotRecord(value)
3522    }
3523}
3524impl ::std::convert::From<SchematicNetclassFlagPlotRecord> for SchematicPlotRecord {
3525    fn from(value: SchematicNetclassFlagPlotRecord) -> Self {
3526        Self::NetclassFlagPlotRecord(value)
3527    }
3528}
3529impl ::std::convert::From<SchematicTextPlotRecord> for SchematicPlotRecord {
3530    fn from(value: SchematicTextPlotRecord) -> Self {
3531        Self::TextPlotRecord(value)
3532    }
3533}
3534impl ::std::convert::From<SchematicTextBoxPlotRecord> for SchematicPlotRecord {
3535    fn from(value: SchematicTextBoxPlotRecord) -> Self {
3536        Self::TextBoxPlotRecord(value)
3537    }
3538}
3539impl ::std::convert::From<SchematicGraphicPolylinePlotRecord> for SchematicPlotRecord {
3540    fn from(value: SchematicGraphicPolylinePlotRecord) -> Self {
3541        Self::GraphicPolylinePlotRecord(value)
3542    }
3543}
3544impl ::std::convert::From<SchematicGraphicArcPlotRecord> for SchematicPlotRecord {
3545    fn from(value: SchematicGraphicArcPlotRecord) -> Self {
3546        Self::GraphicArcPlotRecord(value)
3547    }
3548}
3549impl ::std::convert::From<SchematicGraphicCirclePlotRecord> for SchematicPlotRecord {
3550    fn from(value: SchematicGraphicCirclePlotRecord) -> Self {
3551        Self::GraphicCirclePlotRecord(value)
3552    }
3553}
3554impl ::std::convert::From<SchematicGraphicRectanglePlotRecord> for SchematicPlotRecord {
3555    fn from(value: SchematicGraphicRectanglePlotRecord) -> Self {
3556        Self::GraphicRectanglePlotRecord(value)
3557    }
3558}
3559impl ::std::convert::From<SchematicGraphicBezierPlotRecord> for SchematicPlotRecord {
3560    fn from(value: SchematicGraphicBezierPlotRecord) -> Self {
3561        Self::GraphicBezierPlotRecord(value)
3562    }
3563}
3564impl ::std::convert::From<SchematicRuleAreaPlotRecord> for SchematicPlotRecord {
3565    fn from(value: SchematicRuleAreaPlotRecord) -> Self {
3566        Self::RuleAreaPlotRecord(value)
3567    }
3568}
3569impl ::std::convert::From<SchematicImagePlotRecord> for SchematicPlotRecord {
3570    fn from(value: SchematicImagePlotRecord) -> Self {
3571        Self::ImagePlotRecord(value)
3572    }
3573}
3574impl ::std::convert::From<SchematicTablePlotRecord> for SchematicPlotRecord {
3575    fn from(value: SchematicTablePlotRecord) -> Self {
3576        Self::TablePlotRecord(value)
3577    }
3578}
3579impl ::std::convert::From<SchematicSymbolInstancePlotRecord> for SchematicPlotRecord {
3580    fn from(value: SchematicSymbolInstancePlotRecord) -> Self {
3581        Self::SymbolInstancePlotRecord(value)
3582    }
3583}
3584impl ::std::convert::From<SchematicSymbolOverplotPlotRecord> for SchematicPlotRecord {
3585    fn from(value: SchematicSymbolOverplotPlotRecord) -> Self {
3586        Self::SymbolOverplotPlotRecord(value)
3587    }
3588}
3589impl ::std::convert::From<SchematicSheetPlotRecord> for SchematicPlotRecord {
3590    fn from(value: SchematicSheetPlotRecord) -> Self {
3591        Self::SheetPlotRecord(value)
3592    }
3593}
3594///Typed title-block metadata carried by the leading sheet-header record.
3595///
3596/// <details><summary>JSON schema</summary>
3597///
3598/// ```json
3599///{
3600///  "description": "Typed title-block metadata carried by the leading sheet-header record.",
3601///  "type": "object",
3602///  "required": [
3603///    "comments",
3604///    "company",
3605///    "date",
3606///    "rev",
3607///    "title"
3608///  ],
3609///  "properties": {
3610///    "comments": {
3611///      "$ref": "#/$defs/RecordString"
3612///    },
3613///    "company": {
3614///      "type": "string"
3615///    },
3616///    "date": {
3617///      "type": "string"
3618///    },
3619///    "rev": {
3620///      "type": "string"
3621///    },
3622///    "title": {
3623///      "type": "string"
3624///    }
3625///  },
3626///  "additionalProperties": false
3627///}
3628/// ```
3629/// </details>
3630#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3631#[serde(deny_unknown_fields)]
3632pub struct SchematicPlotTitleBlock {
3633    pub comments: RecordString,
3634    pub company: ::std::string::String,
3635    pub date: ::std::string::String,
3636    pub rev: ::std::string::String,
3637    pub title: ::std::string::String,
3638}
3639///One schematic rule area with source policy metadata.
3640///
3641/// <details><summary>JSON schema</summary>
3642///
3643/// ```json
3644///{
3645///  "description": "One schematic rule area with source policy metadata.",
3646///  "type": "object",
3647///  "required": [
3648///    "dnp",
3649///    "exclude_from_sim",
3650///    "in_bom",
3651///    "kind",
3652///    "locked",
3653///    "object_id",
3654///    "on_board",
3655///    "operation_count",
3656///    "operations",
3657///    "shape",
3658///    "uuid"
3659///  ],
3660///  "properties": {
3661///    "dnp": {
3662///      "type": "boolean"
3663///    },
3664///    "exclude_from_sim": {
3665///      "type": "boolean"
3666///    },
3667///    "in_bom": {
3668///      "type": "boolean"
3669///    },
3670///    "kind": {
3671///      "type": "string",
3672///      "const": "rule_area"
3673///    },
3674///    "locked": {
3675///      "type": "boolean"
3676///    },
3677///    "object_id": {
3678///      "type": "string"
3679///    },
3680///    "on_board": {
3681///      "type": "boolean"
3682///    },
3683///    "operation_count": {
3684///      "type": "integer",
3685///      "maximum": 4294967295.0,
3686///      "minimum": 0.0
3687///    },
3688///    "operations": {
3689///      "type": "array",
3690///      "items": {
3691///        "$ref": "#/$defs/PlotterOperation"
3692///      }
3693///    },
3694///    "shape": {
3695///      "$ref": "#/$defs/SchematicRuleAreaShape"
3696///    },
3697///    "uuid": {
3698///      "type": "string"
3699///    }
3700///  },
3701///  "additionalProperties": false
3702///}
3703/// ```
3704/// </details>
3705#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3706#[serde(deny_unknown_fields)]
3707pub struct SchematicRuleAreaPlotRecord {
3708    pub dnp: bool,
3709    pub exclude_from_sim: bool,
3710    pub in_bom: bool,
3711    #[serde(deserialize_with = "crate::deserialize_rule_area_record_kind")]
3712    pub kind: ::std::string::String,
3713    pub locked: bool,
3714    pub object_id: ::std::string::String,
3715    pub on_board: bool,
3716    pub operation_count: u32,
3717    pub operations: ::std::vec::Vec<PlotterOperation>,
3718    pub shape: SchematicRuleAreaShape,
3719    pub uuid: ::std::string::String,
3720}
3721///Source-shape discriminator retained by a schematic rule area.
3722///
3723/// <details><summary>JSON schema</summary>
3724///
3725/// ```json
3726///{
3727///  "description": "Source-shape discriminator retained by a schematic rule area.",
3728///  "type": "string",
3729///  "enum": [
3730///    "polyline",
3731///    "rectangle",
3732///    "arc",
3733///    "circle",
3734///    "bezier"
3735///  ]
3736///}
3737/// ```
3738/// </details>
3739#[derive(
3740    ::serde::Deserialize,
3741    ::serde::Serialize,
3742    Clone,
3743    Copy,
3744    Debug,
3745    Eq,
3746    Hash,
3747    Ord,
3748    PartialEq,
3749    PartialOrd,
3750)]
3751pub enum SchematicRuleAreaShape {
3752    #[serde(rename = "polyline")]
3753    Polyline,
3754    #[serde(rename = "rectangle")]
3755    Rectangle,
3756    #[serde(rename = "arc")]
3757    Arc,
3758    #[serde(rename = "circle")]
3759    Circle,
3760    #[serde(rename = "bezier")]
3761    Bezier,
3762}
3763impl ::std::fmt::Display for SchematicRuleAreaShape {
3764    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3765        match *self {
3766            Self::Polyline => f.write_str("polyline"),
3767            Self::Rectangle => f.write_str("rectangle"),
3768            Self::Arc => f.write_str("arc"),
3769            Self::Circle => f.write_str("circle"),
3770            Self::Bezier => f.write_str("bezier"),
3771        }
3772    }
3773}
3774impl ::std::str::FromStr for SchematicRuleAreaShape {
3775    type Err = self::error::ConversionError;
3776    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3777        match value {
3778            "polyline" => Ok(Self::Polyline),
3779            "rectangle" => Ok(Self::Rectangle),
3780            "arc" => Ok(Self::Arc),
3781            "circle" => Ok(Self::Circle),
3782            "bezier" => Ok(Self::Bezier),
3783            _ => Err("invalid value".into()),
3784        }
3785    }
3786}
3787impl ::std::convert::TryFrom<&str> for SchematicRuleAreaShape {
3788    type Error = self::error::ConversionError;
3789    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3790        value.parse()
3791    }
3792}
3793impl ::std::convert::TryFrom<&::std::string::String> for SchematicRuleAreaShape {
3794    type Error = self::error::ConversionError;
3795    fn try_from(
3796        value: &::std::string::String,
3797    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3798        value.parse()
3799    }
3800}
3801impl ::std::convert::TryFrom<::std::string::String> for SchematicRuleAreaShape {
3802    type Error = self::error::ConversionError;
3803    fn try_from(
3804        value: ::std::string::String,
3805    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3806        value.parse()
3807    }
3808}
3809///Trailing ownership marker for one hierarchical-sheet pin group.
3810///
3811/// <details><summary>JSON schema</summary>
3812///
3813/// ```json
3814///{
3815///  "description": "Trailing ownership marker for one hierarchical-sheet pin group.",
3816///  "type": "object",
3817///  "required": [
3818///    "index",
3819///    "kind"
3820///  ],
3821///  "properties": {
3822///    "index": {
3823///      "type": "integer",
3824///      "maximum": 4294967295.0,
3825///      "minimum": 0.0
3826///    },
3827///    "kind": {
3828///      "type": "string",
3829///      "const": "EndBlock"
3830///    }
3831///  },
3832///  "additionalProperties": false
3833///}
3834/// ```
3835/// </details>
3836#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3837#[serde(deny_unknown_fields)]
3838pub struct SchematicSheetEndBlockOperation {
3839    pub index: u32,
3840    #[serde(deserialize_with = "crate::deserialize_end_block_kind")]
3841    pub kind: ::std::string::String,
3842}
3843///Leading paper, title-block, background, and worksheet record.
3844///
3845/// <details><summary>JSON schema</summary>
3846///
3847/// ```json
3848///{
3849///  "description": "Leading paper, title-block, background, and worksheet record.",
3850///  "type": "object",
3851///  "required": [
3852///    "generator",
3853///    "generator_version",
3854///    "kind",
3855///    "object_id",
3856///    "operation_count",
3857///    "operations",
3858///    "paper_height_mm",
3859///    "paper_portrait",
3860///    "paper_size",
3861///    "paper_width_mm",
3862///    "sheet_height_nm",
3863///    "sheet_width_nm",
3864///    "uuid",
3865///    "version"
3866///  ],
3867///  "properties": {
3868///    "generator": {
3869///      "type": "string"
3870///    },
3871///    "generator_version": {
3872///      "type": "string"
3873///    },
3874///    "kind": {
3875///      "type": "string",
3876///      "const": "sheet_header"
3877///    },
3878///    "object_id": {
3879///      "type": "string"
3880///    },
3881///    "operation_count": {
3882///      "type": "integer",
3883///      "maximum": 4294967295.0,
3884///      "minimum": 0.0
3885///    },
3886///    "operations": {
3887///      "type": "array",
3888///      "items": {
3889///        "$ref": "#/$defs/PlotterOperation"
3890///      }
3891///    },
3892///    "paper_height_mm": {
3893///      "anyOf": [
3894///        {
3895///          "type": "number"
3896///        },
3897///        {
3898///          "type": "null"
3899///        }
3900///      ]
3901///    },
3902///    "paper_portrait": {
3903///      "type": "boolean"
3904///    },
3905///    "paper_size": {
3906///      "type": "string"
3907///    },
3908///    "paper_width_mm": {
3909///      "anyOf": [
3910///        {
3911///          "type": "number"
3912///        },
3913///        {
3914///          "type": "null"
3915///        }
3916///      ]
3917///    },
3918///    "sheet_height_nm": {
3919///      "$ref": "#/$defs/JavaScriptSafeInteger"
3920///    },
3921///    "sheet_width_nm": {
3922///      "$ref": "#/$defs/JavaScriptSafeInteger"
3923///    },
3924///    "title_block": {
3925///      "$ref": "#/$defs/SchematicPlotTitleBlock"
3926///    },
3927///    "uuid": {
3928///      "type": "string"
3929///    },
3930///    "version": {
3931///      "$ref": "#/$defs/JavaScriptSafeInteger"
3932///    }
3933///  },
3934///  "additionalProperties": false
3935///}
3936/// ```
3937/// </details>
3938#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3939#[serde(deny_unknown_fields)]
3940pub struct SchematicSheetHeaderPlotRecord {
3941    pub generator: ::std::string::String,
3942    pub generator_version: ::std::string::String,
3943    #[serde(deserialize_with = "crate::deserialize_sheet_header_kind")]
3944    pub kind: ::std::string::String,
3945    pub object_id: ::std::string::String,
3946    pub operation_count: u32,
3947    pub operations: ::std::vec::Vec<PlotterOperation>,
3948    #[serde(deserialize_with = "crate::deserialize_required_nullable")]
3949    pub paper_height_mm: ::std::option::Option<f64>,
3950    pub paper_portrait: bool,
3951    pub paper_size: ::std::string::String,
3952    #[serde(deserialize_with = "crate::deserialize_required_nullable")]
3953    pub paper_width_mm: ::std::option::Option<f64>,
3954    pub sheet_height_nm: crate::JavaScriptSafeInteger,
3955    pub sheet_width_nm: crate::JavaScriptSafeInteger,
3956    #[serde(
3957        default,
3958        deserialize_with = "crate::deserialize_present_nonnull",
3959        skip_serializing_if = "::std::option::Option::is_none"
3960    )]
3961    pub title_block: ::std::option::Option<SchematicPlotTitleBlock>,
3962    pub uuid: ::std::string::String,
3963    pub version: crate::JavaScriptSafeInteger,
3964}
3965///Strict operation vocabulary for hierarchical sheets and their pins.
3966///
3967/// <details><summary>JSON schema</summary>
3968///
3969/// ```json
3970///{
3971///  "description": "Strict operation vocabulary for hierarchical sheets and their pins.",
3972///  "anyOf": [
3973///    {
3974///      "$ref": "#/$defs/ThickSegmentOperation"
3975///    },
3976///    {
3977///      "$ref": "#/$defs/RectOperation"
3978///    },
3979///    {
3980///      "$ref": "#/$defs/PlotPolyOperation"
3981///    },
3982///    {
3983///      "$ref": "#/$defs/TextOperation"
3984///    },
3985///    {
3986///      "$ref": "#/$defs/SchematicSheetStartBlockOperation"
3987///    },
3988///    {
3989///      "$ref": "#/$defs/SchematicSheetEndBlockOperation"
3990///    }
3991///  ]
3992///}
3993/// ```
3994/// </details>
3995#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3996#[serde(untagged)]
3997pub enum SchematicSheetOperation {
3998    ThickSegmentOperation(ThickSegmentOperation),
3999    RectOperation(RectOperation),
4000    PlotPolyOperation(PlotPolyOperation),
4001    TextOperation(TextOperation),
4002    SchematicSheetStartBlockOperation(SchematicSheetStartBlockOperation),
4003    SchematicSheetEndBlockOperation(SchematicSheetEndBlockOperation),
4004}
4005impl ::std::convert::From<ThickSegmentOperation> for SchematicSheetOperation {
4006    fn from(value: ThickSegmentOperation) -> Self {
4007        Self::ThickSegmentOperation(value)
4008    }
4009}
4010impl ::std::convert::From<RectOperation> for SchematicSheetOperation {
4011    fn from(value: RectOperation) -> Self {
4012        Self::RectOperation(value)
4013    }
4014}
4015impl ::std::convert::From<PlotPolyOperation> for SchematicSheetOperation {
4016    fn from(value: PlotPolyOperation) -> Self {
4017        Self::PlotPolyOperation(value)
4018    }
4019}
4020impl ::std::convert::From<TextOperation> for SchematicSheetOperation {
4021    fn from(value: TextOperation) -> Self {
4022        Self::TextOperation(value)
4023    }
4024}
4025impl ::std::convert::From<SchematicSheetStartBlockOperation> for SchematicSheetOperation {
4026    fn from(value: SchematicSheetStartBlockOperation) -> Self {
4027        Self::SchematicSheetStartBlockOperation(value)
4028    }
4029}
4030impl ::std::convert::From<SchematicSheetEndBlockOperation> for SchematicSheetOperation {
4031    fn from(value: SchematicSheetEndBlockOperation) -> Self {
4032        Self::SchematicSheetEndBlockOperation(value)
4033    }
4034}
4035///Exact string metadata retained on one hierarchical-sheet pin group.
4036///
4037/// <details><summary>JSON schema</summary>
4038///
4039/// ```json
4040///{
4041///  "description": "Exact string metadata retained on one hierarchical-sheet pin group.",
4042///  "type": "object",
4043///  "additionalProperties": {
4044///    "type": "string"
4045///  }
4046///}
4047/// ```
4048/// </details>
4049#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4050#[serde(transparent)]
4051pub struct SchematicSheetPinBlockAttrs(
4052    pub ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
4053);
4054impl ::std::ops::Deref for SchematicSheetPinBlockAttrs {
4055    type Target = ::std::collections::BTreeMap<::std::string::String, ::std::string::String>;
4056    fn deref(&self) -> &::std::collections::BTreeMap<::std::string::String, ::std::string::String> {
4057        &self.0
4058    }
4059}
4060impl ::std::convert::From<SchematicSheetPinBlockAttrs>
4061    for ::std::collections::BTreeMap<::std::string::String, ::std::string::String>
4062{
4063    fn from(value: SchematicSheetPinBlockAttrs) -> Self {
4064        value.0
4065    }
4066}
4067impl
4068    ::std::convert::From<::std::collections::BTreeMap<::std::string::String, ::std::string::String>>
4069    for SchematicSheetPinBlockAttrs
4070{
4071    fn from(
4072        value: ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
4073    ) -> Self {
4074        Self(value)
4075    }
4076}
4077///One hierarchical sheet with its box, pins, visible fields, and DNP state.
4078///
4079/// <details><summary>JSON schema</summary>
4080///
4081/// ```json
4082///{
4083///  "description": "One hierarchical sheet with its box, pins, visible fields, and DNP state.",
4084///  "type": "object",
4085///  "required": [
4086///    "at_x_nm",
4087///    "at_y_nm",
4088///    "dnp",
4089///    "kind",
4090///    "object_id",
4091///    "operation_count",
4092///    "operations",
4093///    "sheet_file",
4094///    "sheet_name",
4095///    "size_x_nm",
4096///    "size_y_nm",
4097///    "uuid"
4098///  ],
4099///  "properties": {
4100///    "at_x_nm": {
4101///      "$ref": "#/$defs/JavaScriptSafeInteger"
4102///    },
4103///    "at_y_nm": {
4104///      "$ref": "#/$defs/JavaScriptSafeInteger"
4105///    },
4106///    "dnp": {
4107///      "type": "boolean"
4108///    },
4109///    "kind": {
4110///      "type": "string",
4111///      "const": "sheet"
4112///    },
4113///    "object_id": {
4114///      "type": "string"
4115///    },
4116///    "operation_count": {
4117///      "type": "integer",
4118///      "maximum": 4294967295.0,
4119///      "minimum": 0.0
4120///    },
4121///    "operations": {
4122///      "type": "array",
4123///      "items": {
4124///        "$ref": "#/$defs/SchematicSheetOperation"
4125///      }
4126///    },
4127///    "sheet_file": {
4128///      "type": "string"
4129///    },
4130///    "sheet_name": {
4131///      "type": "string"
4132///    },
4133///    "size_x_nm": {
4134///      "$ref": "#/$defs/JavaScriptSafeInteger"
4135///    },
4136///    "size_y_nm": {
4137///      "$ref": "#/$defs/JavaScriptSafeInteger"
4138///    },
4139///    "uuid": {
4140///      "type": "string"
4141///    }
4142///  },
4143///  "additionalProperties": false
4144///}
4145/// ```
4146/// </details>
4147#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4148#[serde(deny_unknown_fields)]
4149pub struct SchematicSheetPlotRecord {
4150    pub at_x_nm: crate::JavaScriptSafeInteger,
4151    pub at_y_nm: crate::JavaScriptSafeInteger,
4152    pub dnp: bool,
4153    #[serde(deserialize_with = "crate::deserialize_sheet_record_kind")]
4154    pub kind: ::std::string::String,
4155    pub object_id: ::std::string::String,
4156    pub operation_count: u32,
4157    pub operations: ::std::vec::Vec<SchematicSheetOperation>,
4158    pub sheet_file: ::std::string::String,
4159    pub sheet_name: ::std::string::String,
4160    pub size_x_nm: crate::JavaScriptSafeInteger,
4161    pub size_y_nm: crate::JavaScriptSafeInteger,
4162    pub uuid: ::std::string::String,
4163}
4164///Leading ownership marker for one hierarchical-sheet pin group.
4165///
4166/// <details><summary>JSON schema</summary>
4167///
4168/// ```json
4169///{
4170///  "description": "Leading ownership marker for one hierarchical-sheet pin group.",
4171///  "type": "object",
4172///  "required": [
4173///    "data_ref",
4174///    "data_uuid",
4175///    "extra_attrs",
4176///    "index",
4177///    "kind",
4178///    "label",
4179///    "object_id"
4180///  ],
4181///  "properties": {
4182///    "data_ref": {
4183///      "type": "string",
4184///      "const": "sheet_pin"
4185///    },
4186///    "data_uuid": {
4187///      "type": "string"
4188///    },
4189///    "extra_attrs": {
4190///      "$ref": "#/$defs/SchematicSheetPinBlockAttrs"
4191///    },
4192///    "index": {
4193///      "type": "integer",
4194///      "maximum": 4294967295.0,
4195///      "minimum": 0.0
4196///    },
4197///    "kind": {
4198///      "type": "string",
4199///      "const": "StartBlock"
4200///    },
4201///    "label": {
4202///      "type": "string"
4203///    },
4204///    "object_id": {
4205///      "type": "string"
4206///    }
4207///  },
4208///  "additionalProperties": false
4209///}
4210/// ```
4211/// </details>
4212#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4213#[serde(deny_unknown_fields)]
4214pub struct SchematicSheetStartBlockOperation {
4215    pub data_ref: ::std::string::String,
4216    pub data_uuid: ::std::string::String,
4217    pub extra_attrs: SchematicSheetPinBlockAttrs,
4218    pub index: u32,
4219    #[serde(deserialize_with = "crate::deserialize_start_block_kind")]
4220    pub kind: ::std::string::String,
4221    pub label: ::std::string::String,
4222    pub object_id: ::std::string::String,
4223}
4224///Trailing ownership marker for one placed-symbol pin group.
4225///
4226/// <details><summary>JSON schema</summary>
4227///
4228/// ```json
4229///{
4230///  "description": "Trailing ownership marker for one placed-symbol pin group.",
4231///  "type": "object",
4232///  "required": [
4233///    "index",
4234///    "kind"
4235///  ],
4236///  "properties": {
4237///    "index": {
4238///      "type": "integer",
4239///      "maximum": 4294967295.0,
4240///      "minimum": 0.0
4241///    },
4242///    "kind": {
4243///      "type": "string",
4244///      "const": "EndBlock"
4245///    }
4246///  },
4247///  "additionalProperties": false
4248///}
4249/// ```
4250/// </details>
4251#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4252#[serde(deny_unknown_fields)]
4253pub struct SchematicSymbolEndBlockOperation {
4254    pub index: u32,
4255    #[serde(deserialize_with = "crate::deserialize_end_block_kind")]
4256    pub kind: ::std::string::String,
4257}
4258///One placed schematic symbol, including body, pins, and visible fields.
4259///
4260/// <details><summary>JSON schema</summary>
4261///
4262/// ```json
4263///{
4264///  "description": "One placed schematic symbol, including body, pins, and visible fields.",
4265///  "type": "object",
4266///  "required": [
4267///    "at_angle_deg",
4268///    "at_x_nm",
4269///    "at_y_nm",
4270///    "convert",
4271///    "dnp",
4272///    "exclude_from_sim",
4273///    "in_bom",
4274///    "in_pos_files",
4275///    "kind",
4276///    "lib_id",
4277///    "lib_name",
4278///    "mirror",
4279///    "object_id",
4280///    "on_board",
4281///    "operation_count",
4282///    "operations",
4283///    "reference",
4284///    "unit",
4285///    "uuid"
4286///  ],
4287///  "properties": {
4288///    "at_angle_deg": {
4289///      "type": "number"
4290///    },
4291///    "at_x_nm": {
4292///      "$ref": "#/$defs/JavaScriptSafeInteger"
4293///    },
4294///    "at_y_nm": {
4295///      "$ref": "#/$defs/JavaScriptSafeInteger"
4296///    },
4297///    "convert": {
4298///      "type": "integer",
4299///      "maximum": 4294967295.0,
4300///      "minimum": 0.0
4301///    },
4302///    "dnp": {
4303///      "type": "boolean"
4304///    },
4305///    "exclude_from_sim": {
4306///      "type": "boolean"
4307///    },
4308///    "in_bom": {
4309///      "type": "boolean"
4310///    },
4311///    "in_pos_files": {
4312///      "type": "boolean"
4313///    },
4314///    "kind": {
4315///      "type": "string",
4316///      "const": "symbol_instance"
4317///    },
4318///    "lib_id": {
4319///      "type": "string"
4320///    },
4321///    "lib_name": {
4322///      "type": "string"
4323///    },
4324///    "mirror": {
4325///      "anyOf": [
4326///        {
4327///          "type": "string"
4328///        },
4329///        {
4330///          "type": "null"
4331///        }
4332///      ]
4333///    },
4334///    "object_id": {
4335///      "type": "string"
4336///    },
4337///    "on_board": {
4338///      "type": "boolean"
4339///    },
4340///    "operation_count": {
4341///      "type": "integer",
4342///      "maximum": 4294967295.0,
4343///      "minimum": 0.0
4344///    },
4345///    "operations": {
4346///      "type": "array",
4347///      "items": {
4348///        "$ref": "#/$defs/SchematicSymbolOperation"
4349///      }
4350///    },
4351///    "reference": {
4352///      "type": "string"
4353///    },
4354///    "unit": {
4355///      "type": "integer",
4356///      "maximum": 4294967295.0,
4357///      "minimum": 0.0
4358///    },
4359///    "uuid": {
4360///      "type": "string"
4361///    }
4362///  },
4363///  "additionalProperties": false
4364///}
4365/// ```
4366/// </details>
4367#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4368#[serde(deny_unknown_fields)]
4369pub struct SchematicSymbolInstancePlotRecord {
4370    pub at_angle_deg: f64,
4371    pub at_x_nm: crate::JavaScriptSafeInteger,
4372    pub at_y_nm: crate::JavaScriptSafeInteger,
4373    pub convert: u32,
4374    pub dnp: bool,
4375    pub exclude_from_sim: bool,
4376    pub in_bom: bool,
4377    pub in_pos_files: bool,
4378    #[serde(deserialize_with = "crate::deserialize_symbol_instance_record_kind")]
4379    pub kind: ::std::string::String,
4380    pub lib_id: ::std::string::String,
4381    pub lib_name: ::std::string::String,
4382    #[serde(deserialize_with = "crate::deserialize_required_nullable")]
4383    pub mirror: ::std::option::Option<::std::string::String>,
4384    pub object_id: ::std::string::String,
4385    pub on_board: bool,
4386    pub operation_count: u32,
4387    pub operations: ::std::vec::Vec<SchematicSymbolOperation>,
4388    pub reference: ::std::string::String,
4389    pub unit: u32,
4390    pub uuid: ::std::string::String,
4391}
4392///Strict operation vocabulary for placed symbols and their overplots.
4393///
4394/// <details><summary>JSON schema</summary>
4395///
4396/// ```json
4397///{
4398///  "description": "Strict operation vocabulary for placed symbols and their overplots.",
4399///  "anyOf": [
4400///    {
4401///      "$ref": "#/$defs/ThickSegmentOperation"
4402///    },
4403///    {
4404///      "$ref": "#/$defs/ArcThreePointOperation"
4405///    },
4406///    {
4407///      "$ref": "#/$defs/CircleOperation"
4408///    },
4409///    {
4410///      "$ref": "#/$defs/RectOperation"
4411///    },
4412///    {
4413///      "$ref": "#/$defs/PlotPolyOperation"
4414///    },
4415///    {
4416///      "$ref": "#/$defs/BezierCurveOperation"
4417///    },
4418///    {
4419///      "$ref": "#/$defs/TextOperation"
4420///    },
4421///    {
4422///      "$ref": "#/$defs/PlotImageOperation"
4423///    },
4424///    {
4425///      "$ref": "#/$defs/FlashPadCircleOperation"
4426///    },
4427///    {
4428///      "$ref": "#/$defs/FlashPadOvalOperation"
4429///    },
4430///    {
4431///      "$ref": "#/$defs/FlashPadRectOperation"
4432///    },
4433///    {
4434///      "$ref": "#/$defs/FlashPadRoundRectOperation"
4435///    },
4436///    {
4437///      "$ref": "#/$defs/FlashPadCustomOperation"
4438///    },
4439///    {
4440///      "$ref": "#/$defs/FlashPadTrapezOperation"
4441///    },
4442///    {
4443///      "$ref": "#/$defs/SchematicSymbolStartBlockOperation"
4444///    },
4445///    {
4446///      "$ref": "#/$defs/SchematicSymbolEndBlockOperation"
4447///    }
4448///  ]
4449///}
4450/// ```
4451/// </details>
4452#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4453#[serde(untagged)]
4454pub enum SchematicSymbolOperation {
4455    ThickSegmentOperation(ThickSegmentOperation),
4456    ArcThreePointOperation(ArcThreePointOperation),
4457    CircleOperation(CircleOperation),
4458    RectOperation(RectOperation),
4459    PlotPolyOperation(PlotPolyOperation),
4460    BezierCurveOperation(BezierCurveOperation),
4461    TextOperation(TextOperation),
4462    PlotImageOperation(PlotImageOperation),
4463    FlashPadCircleOperation(FlashPadCircleOperation),
4464    FlashPadOvalOperation(FlashPadOvalOperation),
4465    FlashPadRectOperation(FlashPadRectOperation),
4466    FlashPadRoundRectOperation(FlashPadRoundRectOperation),
4467    FlashPadCustomOperation(FlashPadCustomOperation),
4468    FlashPadTrapezOperation(FlashPadTrapezOperation),
4469    SchematicSymbolStartBlockOperation(SchematicSymbolStartBlockOperation),
4470    SchematicSymbolEndBlockOperation(SchematicSymbolEndBlockOperation),
4471}
4472impl ::std::convert::From<ThickSegmentOperation> for SchematicSymbolOperation {
4473    fn from(value: ThickSegmentOperation) -> Self {
4474        Self::ThickSegmentOperation(value)
4475    }
4476}
4477impl ::std::convert::From<ArcThreePointOperation> for SchematicSymbolOperation {
4478    fn from(value: ArcThreePointOperation) -> Self {
4479        Self::ArcThreePointOperation(value)
4480    }
4481}
4482impl ::std::convert::From<CircleOperation> for SchematicSymbolOperation {
4483    fn from(value: CircleOperation) -> Self {
4484        Self::CircleOperation(value)
4485    }
4486}
4487impl ::std::convert::From<RectOperation> for SchematicSymbolOperation {
4488    fn from(value: RectOperation) -> Self {
4489        Self::RectOperation(value)
4490    }
4491}
4492impl ::std::convert::From<PlotPolyOperation> for SchematicSymbolOperation {
4493    fn from(value: PlotPolyOperation) -> Self {
4494        Self::PlotPolyOperation(value)
4495    }
4496}
4497impl ::std::convert::From<BezierCurveOperation> for SchematicSymbolOperation {
4498    fn from(value: BezierCurveOperation) -> Self {
4499        Self::BezierCurveOperation(value)
4500    }
4501}
4502impl ::std::convert::From<TextOperation> for SchematicSymbolOperation {
4503    fn from(value: TextOperation) -> Self {
4504        Self::TextOperation(value)
4505    }
4506}
4507impl ::std::convert::From<PlotImageOperation> for SchematicSymbolOperation {
4508    fn from(value: PlotImageOperation) -> Self {
4509        Self::PlotImageOperation(value)
4510    }
4511}
4512impl ::std::convert::From<FlashPadCircleOperation> for SchematicSymbolOperation {
4513    fn from(value: FlashPadCircleOperation) -> Self {
4514        Self::FlashPadCircleOperation(value)
4515    }
4516}
4517impl ::std::convert::From<FlashPadOvalOperation> for SchematicSymbolOperation {
4518    fn from(value: FlashPadOvalOperation) -> Self {
4519        Self::FlashPadOvalOperation(value)
4520    }
4521}
4522impl ::std::convert::From<FlashPadRectOperation> for SchematicSymbolOperation {
4523    fn from(value: FlashPadRectOperation) -> Self {
4524        Self::FlashPadRectOperation(value)
4525    }
4526}
4527impl ::std::convert::From<FlashPadRoundRectOperation> for SchematicSymbolOperation {
4528    fn from(value: FlashPadRoundRectOperation) -> Self {
4529        Self::FlashPadRoundRectOperation(value)
4530    }
4531}
4532impl ::std::convert::From<FlashPadCustomOperation> for SchematicSymbolOperation {
4533    fn from(value: FlashPadCustomOperation) -> Self {
4534        Self::FlashPadCustomOperation(value)
4535    }
4536}
4537impl ::std::convert::From<FlashPadTrapezOperation> for SchematicSymbolOperation {
4538    fn from(value: FlashPadTrapezOperation) -> Self {
4539        Self::FlashPadTrapezOperation(value)
4540    }
4541}
4542impl ::std::convert::From<SchematicSymbolStartBlockOperation> for SchematicSymbolOperation {
4543    fn from(value: SchematicSymbolStartBlockOperation) -> Self {
4544        Self::SchematicSymbolStartBlockOperation(value)
4545    }
4546}
4547impl ::std::convert::From<SchematicSymbolEndBlockOperation> for SchematicSymbolOperation {
4548    fn from(value: SchematicSymbolEndBlockOperation) -> Self {
4549        Self::SchematicSymbolEndBlockOperation(value)
4550    }
4551}
4552///Replotted pins and fields for one overlapping placed symbol.
4553///
4554/// <details><summary>JSON schema</summary>
4555///
4556/// ```json
4557///{
4558///  "description": "Replotted pins and fields for one overlapping placed symbol.",
4559///  "type": "object",
4560///  "required": [
4561///    "kind",
4562///    "lib_id",
4563///    "object_id",
4564///    "operation_count",
4565///    "operations",
4566///    "source_symbol_uuid",
4567///    "uuid"
4568///  ],
4569///  "properties": {
4570///    "kind": {
4571///      "type": "string",
4572///      "const": "symbol_overplot"
4573///    },
4574///    "lib_id": {
4575///      "type": "string"
4576///    },
4577///    "object_id": {
4578///      "type": "string"
4579///    },
4580///    "operation_count": {
4581///      "type": "integer",
4582///      "maximum": 4294967295.0,
4583///      "minimum": 0.0
4584///    },
4585///    "operations": {
4586///      "type": "array",
4587///      "items": {
4588///        "$ref": "#/$defs/SchematicSymbolOperation"
4589///      }
4590///    },
4591///    "source_symbol_uuid": {
4592///      "type": "string"
4593///    },
4594///    "uuid": {
4595///      "type": "string"
4596///    }
4597///  },
4598///  "additionalProperties": false
4599///}
4600/// ```
4601/// </details>
4602#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4603#[serde(deny_unknown_fields)]
4604pub struct SchematicSymbolOverplotPlotRecord {
4605    #[serde(deserialize_with = "crate::deserialize_symbol_overplot_record_kind")]
4606    pub kind: ::std::string::String,
4607    pub lib_id: ::std::string::String,
4608    pub object_id: ::std::string::String,
4609    pub operation_count: u32,
4610    pub operations: ::std::vec::Vec<SchematicSymbolOperation>,
4611    pub source_symbol_uuid: ::std::string::String,
4612    pub uuid: ::std::string::String,
4613}
4614///Exact string metadata retained on one placed-symbol pin group.
4615///
4616/// <details><summary>JSON schema</summary>
4617///
4618/// ```json
4619///{
4620///  "description": "Exact string metadata retained on one placed-symbol pin group.",
4621///  "type": "object",
4622///  "additionalProperties": {
4623///    "type": "string"
4624///  }
4625///}
4626/// ```
4627/// </details>
4628#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4629#[serde(transparent)]
4630pub struct SchematicSymbolPinBlockAttrs(
4631    pub ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
4632);
4633impl ::std::ops::Deref for SchematicSymbolPinBlockAttrs {
4634    type Target = ::std::collections::BTreeMap<::std::string::String, ::std::string::String>;
4635    fn deref(&self) -> &::std::collections::BTreeMap<::std::string::String, ::std::string::String> {
4636        &self.0
4637    }
4638}
4639impl ::std::convert::From<SchematicSymbolPinBlockAttrs>
4640    for ::std::collections::BTreeMap<::std::string::String, ::std::string::String>
4641{
4642    fn from(value: SchematicSymbolPinBlockAttrs) -> Self {
4643        value.0
4644    }
4645}
4646impl
4647    ::std::convert::From<::std::collections::BTreeMap<::std::string::String, ::std::string::String>>
4648    for SchematicSymbolPinBlockAttrs
4649{
4650    fn from(
4651        value: ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
4652    ) -> Self {
4653        Self(value)
4654    }
4655}
4656///Leading ownership marker for one placed-symbol pin group.
4657///
4658/// <details><summary>JSON schema</summary>
4659///
4660/// ```json
4661///{
4662///  "description": "Leading ownership marker for one placed-symbol pin group.",
4663///  "type": "object",
4664///  "required": [
4665///    "data_ref",
4666///    "data_uuid",
4667///    "extra_attrs",
4668///    "index",
4669///    "kind",
4670///    "label",
4671///    "object_id"
4672///  ],
4673///  "properties": {
4674///    "data_ref": {
4675///      "type": "string",
4676///      "const": "symbol_pin"
4677///    },
4678///    "data_uuid": {
4679///      "type": "string"
4680///    },
4681///    "extra_attrs": {
4682///      "$ref": "#/$defs/SchematicSymbolPinBlockAttrs"
4683///    },
4684///    "index": {
4685///      "type": "integer",
4686///      "maximum": 4294967295.0,
4687///      "minimum": 0.0
4688///    },
4689///    "kind": {
4690///      "type": "string",
4691///      "const": "StartBlock"
4692///    },
4693///    "label": {
4694///      "type": "string"
4695///    },
4696///    "object_id": {
4697///      "type": "string"
4698///    }
4699///  },
4700///  "additionalProperties": false
4701///}
4702/// ```
4703/// </details>
4704#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4705#[serde(deny_unknown_fields)]
4706pub struct SchematicSymbolStartBlockOperation {
4707    pub data_ref: ::std::string::String,
4708    pub data_uuid: ::std::string::String,
4709    pub extra_attrs: SchematicSymbolPinBlockAttrs,
4710    pub index: u32,
4711    #[serde(deserialize_with = "crate::deserialize_start_block_kind")]
4712    pub kind: ::std::string::String,
4713    pub label: ::std::string::String,
4714    pub object_id: ::std::string::String,
4715}
4716///One schematic table rendered as ordered text-box cell blocks.
4717///
4718/// <details><summary>JSON schema</summary>
4719///
4720/// ```json
4721///{
4722///  "description": "One schematic table rendered as ordered text-box cell blocks.",
4723///  "type": "object",
4724///  "required": [
4725///    "cell_count",
4726///    "kind",
4727///    "object_id",
4728///    "operation_count",
4729///    "operations",
4730///    "uuid"
4731///  ],
4732///  "properties": {
4733///    "cell_count": {
4734///      "type": "integer",
4735///      "maximum": 4294967295.0,
4736///      "minimum": 0.0
4737///    },
4738///    "kind": {
4739///      "type": "string",
4740///      "const": "table"
4741///    },
4742///    "object_id": {
4743///      "type": "string"
4744///    },
4745///    "operation_count": {
4746///      "type": "integer",
4747///      "maximum": 4294967295.0,
4748///      "minimum": 0.0
4749///    },
4750///    "operations": {
4751///      "type": "array",
4752///      "items": {
4753///        "$ref": "#/$defs/PlotterOperation"
4754///      }
4755///    },
4756///    "uuid": {
4757///      "type": "string"
4758///    }
4759///  },
4760///  "additionalProperties": false
4761///}
4762/// ```
4763/// </details>
4764#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4765#[serde(deny_unknown_fields)]
4766pub struct SchematicTablePlotRecord {
4767    pub cell_count: u32,
4768    #[serde(deserialize_with = "crate::deserialize_table_record_kind")]
4769    pub kind: ::std::string::String,
4770    pub object_id: ::std::string::String,
4771    pub operation_count: u32,
4772    pub operations: ::std::vec::Vec<PlotterOperation>,
4773    pub uuid: ::std::string::String,
4774}
4775///One schematic text box with its canonical outline and plotted lines.
4776///
4777/// <details><summary>JSON schema</summary>
4778///
4779/// ```json
4780///{
4781///  "description": "One schematic text box with its canonical outline and plotted lines.",
4782///  "type": "object",
4783///  "required": [
4784///    "kind",
4785///    "object_id",
4786///    "operation_count",
4787///    "operations",
4788///    "text",
4789///    "uuid"
4790///  ],
4791///  "properties": {
4792///    "kind": {
4793///      "type": "string",
4794///      "const": "text_box"
4795///    },
4796///    "object_id": {
4797///      "type": "string"
4798///    },
4799///    "operation_count": {
4800///      "type": "integer",
4801///      "maximum": 4294967295.0,
4802///      "minimum": 0.0
4803///    },
4804///    "operations": {
4805///      "type": "array",
4806///      "items": {
4807///        "$ref": "#/$defs/PlotterOperation"
4808///      }
4809///    },
4810///    "text": {
4811///      "type": "string"
4812///    },
4813///    "uuid": {
4814///      "type": "string"
4815///    }
4816///  },
4817///  "additionalProperties": false
4818///}
4819/// ```
4820/// </details>
4821#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4822#[serde(deny_unknown_fields)]
4823pub struct SchematicTextBoxPlotRecord {
4824    #[serde(deserialize_with = "crate::deserialize_text_box_record_kind")]
4825    pub kind: ::std::string::String,
4826    pub object_id: ::std::string::String,
4827    pub operation_count: u32,
4828    pub operations: ::std::vec::Vec<PlotterOperation>,
4829    pub text: ::std::string::String,
4830    pub uuid: ::std::string::String,
4831}
4832///One ordinary top-level schematic text annotation.
4833///
4834/// <details><summary>JSON schema</summary>
4835///
4836/// ```json
4837///{
4838///  "description": "One ordinary top-level schematic text annotation.",
4839///  "type": "object",
4840///  "required": [
4841///    "kind",
4842///    "object_id",
4843///    "operation_count",
4844///    "operations",
4845///    "text",
4846///    "uuid"
4847///  ],
4848///  "properties": {
4849///    "kind": {
4850///      "type": "string",
4851///      "const": "text"
4852///    },
4853///    "object_id": {
4854///      "type": "string"
4855///    },
4856///    "operation_count": {
4857///      "type": "integer",
4858///      "maximum": 4294967295.0,
4859///      "minimum": 0.0
4860///    },
4861///    "operations": {
4862///      "type": "array",
4863///      "items": {
4864///        "$ref": "#/$defs/PlotterOperation"
4865///      }
4866///    },
4867///    "text": {
4868///      "type": "string"
4869///    },
4870///    "uuid": {
4871///      "type": "string"
4872///    }
4873///  },
4874///  "additionalProperties": false
4875///}
4876/// ```
4877/// </details>
4878#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4879#[serde(deny_unknown_fields)]
4880pub struct SchematicTextPlotRecord {
4881    #[serde(deserialize_with = "crate::deserialize_text_record_kind")]
4882    pub kind: ::std::string::String,
4883    pub object_id: ::std::string::String,
4884    pub operation_count: u32,
4885    pub operations: ::std::vec::Vec<PlotterOperation>,
4886    pub text: ::std::string::String,
4887    pub uuid: ::std::string::String,
4888}
4889///One schematic wire polyline.
4890///
4891/// <details><summary>JSON schema</summary>
4892///
4893/// ```json
4894///{
4895///  "description": "One schematic wire polyline.",
4896///  "type": "object",
4897///  "required": [
4898///    "kind",
4899///    "object_id",
4900///    "operation_count",
4901///    "operations",
4902///    "uuid"
4903///  ],
4904///  "properties": {
4905///    "kind": {
4906///      "type": "string",
4907///      "const": "wire"
4908///    },
4909///    "object_id": {
4910///      "type": "string"
4911///    },
4912///    "operation_count": {
4913///      "type": "integer",
4914///      "maximum": 4294967295.0,
4915///      "minimum": 0.0
4916///    },
4917///    "operations": {
4918///      "type": "array",
4919///      "items": {
4920///        "$ref": "#/$defs/PlotterOperation"
4921///      }
4922///    },
4923///    "uuid": {
4924///      "type": "string"
4925///    }
4926///  },
4927///  "additionalProperties": false
4928///}
4929/// ```
4930/// </details>
4931#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4932#[serde(deny_unknown_fields)]
4933pub struct SchematicWirePlotRecord {
4934    #[serde(deserialize_with = "crate::deserialize_wire_record_kind")]
4935    pub kind: ::std::string::String,
4936    pub object_id: ::std::string::String,
4937    pub operation_count: u32,
4938    pub operations: ::std::vec::Vec<PlotterOperation>,
4939    pub uuid: ::std::string::String,
4940}
4941/**Stroke or cached text operation. Boolean marker keys (`mirror`,
4942`text_as_polygons`, `polyline_per_segment`, `knockout`) are present-only
4943-when-true, matching the established Python emitter. Render-cache keys
4944appear together when an authored cache resolves; `render_cache_polygons`
4945carries the exterior rings in nanometres.*/
4946///
4947/// <details><summary>JSON schema</summary>
4948///
4949/// ```json
4950///{
4951///  "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.",
4952///  "type": "object",
4953///  "required": [
4954///    "bold",
4955///    "color",
4956///    "font_face",
4957///    "h_align",
4958///    "index",
4959///    "italic",
4960///    "kind",
4961///    "multiline",
4962///    "orient_deg",
4963///    "pen_width_nm",
4964///    "size_x_nm",
4965///    "size_y_nm",
4966///    "text",
4967///    "v_align",
4968///    "x",
4969///    "y"
4970///  ],
4971///  "properties": {
4972///    "bold": {
4973///      "type": "boolean"
4974///    },
4975///    "color": {
4976///      "type": "string"
4977///    },
4978///    "context": {
4979///      "$ref": "#/$defs/PlotterOperationContext"
4980///    },
4981///    "font_face": {
4982///      "type": "string"
4983///    },
4984///    "h_align": {
4985///      "$ref": "#/$defs/PlotterTextHAlign"
4986///    },
4987///    "index": {
4988///      "type": "integer",
4989///      "maximum": 4294967295.0,
4990///      "minimum": 0.0
4991///    },
4992///    "italic": {
4993///      "type": "boolean"
4994///    },
4995///    "kind": {
4996///      "type": "string",
4997///      "const": "Text"
4998///    },
4999///    "knockout": {
5000///      "type": "boolean"
5001///    },
5002///    "layer": {
5003///      "type": "string"
5004///    },
5005///    "mirror": {
5006///      "type": "boolean"
5007///    },
5008///    "multiline": {
5009///      "type": "boolean"
5010///    },
5011///    "orient_deg": {
5012///      "type": "number"
5013///    },
5014///    "pen_width_nm": {
5015///      "$ref": "#/$defs/JavaScriptSafeInteger"
5016///    },
5017///    "polyline_per_segment": {
5018///      "type": "boolean"
5019///    },
5020///    "render_cache": {
5021///      "$ref": "#/$defs/TextRenderCache"
5022///    },
5023///    "render_cache_exact": {
5024///      "type": "boolean"
5025///    },
5026///    "render_cache_polygons": {
5027///      "type": "array",
5028///      "items": {
5029///        "type": "array",
5030///        "items": {
5031///          "$ref": "#/$defs/PlotterPoint"
5032///        }
5033///      }
5034///    },
5035///    "render_cache_source": {
5036///      "$ref": "#/$defs/PlotterTextRenderCacheSource"
5037///    },
5038///    "size_x_nm": {
5039///      "$ref": "#/$defs/JavaScriptSafeInteger"
5040///    },
5041///    "size_y_nm": {
5042///      "$ref": "#/$defs/JavaScriptSafeInteger"
5043///    },
5044///    "text": {
5045///      "type": "string"
5046///    },
5047///    "text_as_polygons": {
5048///      "type": "boolean"
5049///    },
5050///    "v_align": {
5051///      "$ref": "#/$defs/PlotterTextVAlign"
5052///    },
5053///    "x": {
5054///      "$ref": "#/$defs/JavaScriptSafeInteger"
5055///    },
5056///    "y": {
5057///      "$ref": "#/$defs/JavaScriptSafeInteger"
5058///    }
5059///  },
5060///  "additionalProperties": false
5061///}
5062/// ```
5063/// </details>
5064#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5065#[serde(deny_unknown_fields)]
5066pub struct TextOperation {
5067    pub bold: bool,
5068    pub color: ::std::string::String,
5069    #[serde(
5070        default,
5071        deserialize_with = "crate::deserialize_present_nonnull",
5072        skip_serializing_if = "::std::option::Option::is_none"
5073    )]
5074    pub context: ::std::option::Option<PlotterOperationContext>,
5075    pub font_face: ::std::string::String,
5076    pub h_align: PlotterTextHAlign,
5077    pub index: u32,
5078    pub italic: bool,
5079    #[serde(deserialize_with = "crate::deserialize_text_kind")]
5080    pub kind: ::std::string::String,
5081    #[serde(
5082        default,
5083        deserialize_with = "crate::deserialize_present_nonnull",
5084        skip_serializing_if = "::std::option::Option::is_none"
5085    )]
5086    pub knockout: ::std::option::Option<bool>,
5087    #[serde(
5088        default,
5089        deserialize_with = "crate::deserialize_present_nonnull",
5090        skip_serializing_if = "::std::option::Option::is_none"
5091    )]
5092    pub layer: ::std::option::Option<::std::string::String>,
5093    #[serde(
5094        default,
5095        deserialize_with = "crate::deserialize_present_nonnull",
5096        skip_serializing_if = "::std::option::Option::is_none"
5097    )]
5098    pub mirror: ::std::option::Option<bool>,
5099    pub multiline: bool,
5100    pub orient_deg: f64,
5101    pub pen_width_nm: crate::JavaScriptSafeInteger,
5102    #[serde(
5103        default,
5104        deserialize_with = "crate::deserialize_present_nonnull",
5105        skip_serializing_if = "::std::option::Option::is_none"
5106    )]
5107    pub polyline_per_segment: ::std::option::Option<bool>,
5108    #[serde(
5109        default,
5110        deserialize_with = "crate::deserialize_present_nonnull",
5111        skip_serializing_if = "::std::option::Option::is_none"
5112    )]
5113    pub render_cache: ::std::option::Option<TextRenderCache>,
5114    #[serde(
5115        default,
5116        deserialize_with = "crate::deserialize_present_nonnull",
5117        skip_serializing_if = "::std::option::Option::is_none"
5118    )]
5119    pub render_cache_exact: ::std::option::Option<bool>,
5120    #[serde(
5121        default,
5122        deserialize_with = "crate::reject_present_render_cache_polygons",
5123        skip_serializing_if = "::std::vec::Vec::is_empty"
5124    )]
5125    pub render_cache_polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
5126    #[serde(
5127        default,
5128        deserialize_with = "crate::deserialize_present_nonnull",
5129        skip_serializing_if = "::std::option::Option::is_none"
5130    )]
5131    pub render_cache_source: ::std::option::Option<PlotterTextRenderCacheSource>,
5132    pub size_x_nm: crate::JavaScriptSafeInteger,
5133    pub size_y_nm: crate::JavaScriptSafeInteger,
5134    pub text: ::std::string::String,
5135    #[serde(
5136        default,
5137        deserialize_with = "crate::deserialize_present_nonnull",
5138        skip_serializing_if = "::std::option::Option::is_none"
5139    )]
5140    pub text_as_polygons: ::std::option::Option<bool>,
5141    pub v_align: PlotterTextVAlign,
5142    pub x: crate::JavaScriptSafeInteger,
5143    pub y: crate::JavaScriptSafeInteger,
5144}
5145/**Typed render cache from an authored `(render_cache ...)` form, the Python
5146resolver, or the deterministic native hinted outline engine. `knockout` appears when the
5147knockout background restructure replaced the polygons.*/
5148///
5149/// <details><summary>JSON schema</summary>
5150///
5151/// ```json
5152///{
5153///  "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.",
5154///  "type": "object",
5155///  "required": [
5156///    "angle",
5157///    "coordinate_space",
5158///    "exact",
5159///    "polygons",
5160///    "schema",
5161///    "source",
5162///    "text",
5163///    "unit"
5164///  ],
5165///  "properties": {
5166///    "angle": {
5167///      "type": "number"
5168///    },
5169///    "coordinate_space": {
5170///      "$ref": "#/$defs/PlotterTextRenderCacheCoordinateSpace"
5171///    },
5172///    "exact": {
5173///      "type": "boolean"
5174///    },
5175///    "knockout": {
5176///      "type": "boolean"
5177///    },
5178///    "polygons": {
5179///      "type": "array",
5180///      "items": {
5181///        "$ref": "#/$defs/TextRenderCachePolygon"
5182///      }
5183///    },
5184///    "schema": {
5185///      "type": "string",
5186///      "const": "kicad.render_cache.v1"
5187///    },
5188///    "source": {
5189///      "$ref": "#/$defs/PlotterTextRenderCacheSource"
5190///    },
5191///    "text": {
5192///      "type": "string"
5193///    },
5194///    "unit": {
5195///      "type": "string",
5196///      "const": "nm"
5197///    }
5198///  },
5199///  "additionalProperties": false
5200///}
5201/// ```
5202/// </details>
5203#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5204#[serde(deny_unknown_fields)]
5205pub struct TextRenderCache {
5206    pub angle: f64,
5207    pub coordinate_space: PlotterTextRenderCacheCoordinateSpace,
5208    pub exact: bool,
5209    #[serde(
5210        default,
5211        deserialize_with = "crate::deserialize_present_nonnull",
5212        skip_serializing_if = "::std::option::Option::is_none"
5213    )]
5214    pub knockout: ::std::option::Option<bool>,
5215    pub polygons: ::std::vec::Vec<TextRenderCachePolygon>,
5216    pub schema: ::std::string::String,
5217    pub source: PlotterTextRenderCacheSource,
5218    pub text: ::std::string::String,
5219    pub unit: ::std::string::String,
5220}
5221///One render-cache polygon as ordered contours, exterior ring first.
5222///
5223/// <details><summary>JSON schema</summary>
5224///
5225/// ```json
5226///{
5227///  "description": "One render-cache polygon as ordered contours, exterior ring first.",
5228///  "type": "object",
5229///  "required": [
5230///    "contours"
5231///  ],
5232///  "properties": {
5233///    "contours": {
5234///      "type": "array",
5235///      "items": {
5236///        "type": "array",
5237///        "items": {
5238///          "$ref": "#/$defs/PlotterPoint"
5239///        }
5240///      }
5241///    }
5242///  },
5243///  "additionalProperties": false
5244///}
5245/// ```
5246/// </details>
5247#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5248#[serde(deny_unknown_fields)]
5249pub struct TextRenderCachePolygon {
5250    pub contours: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
5251}
5252/**Solid or decomposed segment shared by PCB, footprint, and drill producers.
5253Graphic state requires only layer. Drill state requires role plus layers;
5254NPTH drill state additionally requires all mask and pad-size hints. The
5255generated semantic validator enforces these mutually exclusive states.*/
5256///
5257/// <details><summary>JSON schema</summary>
5258///
5259/// ```json
5260///{
5261///  "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.",
5262///  "type": "object",
5263///  "required": [
5264///    "end_x",
5265///    "end_y",
5266///    "index",
5267///    "kind",
5268///    "start_x",
5269///    "start_y",
5270///    "width_nm"
5271///  ],
5272///  "properties": {
5273///    "end_x": {
5274///      "$ref": "#/$defs/JavaScriptSafeInteger"
5275///    },
5276///    "end_y": {
5277///      "$ref": "#/$defs/JavaScriptSafeInteger"
5278///    },
5279///    "index": {
5280///      "type": "integer",
5281///      "maximum": 4294967295.0,
5282///      "minimum": 0.0
5283///    },
5284///    "kind": {
5285///      "type": "string",
5286///      "const": "ThickSegment"
5287///    },
5288///    "layer": {
5289///      "type": "string"
5290///    },
5291///    "layers": {
5292///      "type": "array",
5293///      "items": {
5294///        "type": "string"
5295///      }
5296///    },
5297///    "mask_margin_nm": {
5298///      "$ref": "#/$defs/JavaScriptSafeInteger"
5299///    },
5300///    "pad_size_x_nm": {
5301///      "$ref": "#/$defs/JavaScriptSafeInteger"
5302///    },
5303///    "pad_size_y_nm": {
5304///      "$ref": "#/$defs/JavaScriptSafeInteger"
5305///    },
5306///    "role": {
5307///      "$ref": "#/$defs/PlotterDrillRole"
5308///    },
5309///    "start_x": {
5310///      "$ref": "#/$defs/JavaScriptSafeInteger"
5311///    },
5312///    "start_y": {
5313///      "$ref": "#/$defs/JavaScriptSafeInteger"
5314///    },
5315///    "stroke_color": {
5316///      "type": "string"
5317///    },
5318///    "width_nm": {
5319///      "$ref": "#/$defs/JavaScriptSafeInteger"
5320///    }
5321///  },
5322///  "additionalProperties": false
5323///}
5324/// ```
5325/// </details>
5326#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5327#[serde(deny_unknown_fields)]
5328pub struct ThickSegmentOperation {
5329    pub end_x: crate::JavaScriptSafeInteger,
5330    pub end_y: crate::JavaScriptSafeInteger,
5331    pub index: u32,
5332    #[serde(deserialize_with = "crate::deserialize_thick_segment_kind")]
5333    pub kind: ::std::string::String,
5334    #[serde(
5335        default,
5336        deserialize_with = "crate::deserialize_present_nonnull",
5337        skip_serializing_if = "::std::option::Option::is_none"
5338    )]
5339    pub layer: ::std::option::Option<::std::string::String>,
5340    #[serde(
5341        default,
5342        deserialize_with = "crate::reject_present_schematic_segment_layers",
5343        skip_serializing_if = "::std::vec::Vec::is_empty"
5344    )]
5345    pub layers: ::std::vec::Vec<::std::string::String>,
5346    #[serde(
5347        default,
5348        deserialize_with = "crate::deserialize_present_nonnull",
5349        skip_serializing_if = "::std::option::Option::is_none"
5350    )]
5351    pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
5352    #[serde(
5353        default,
5354        deserialize_with = "crate::deserialize_present_nonnull",
5355        skip_serializing_if = "::std::option::Option::is_none"
5356    )]
5357    pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
5358    #[serde(
5359        default,
5360        deserialize_with = "crate::deserialize_present_nonnull",
5361        skip_serializing_if = "::std::option::Option::is_none"
5362    )]
5363    pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
5364    #[serde(
5365        default,
5366        deserialize_with = "crate::deserialize_present_nonnull",
5367        skip_serializing_if = "::std::option::Option::is_none"
5368    )]
5369    pub role: ::std::option::Option<PlotterDrillRole>,
5370    pub start_x: crate::JavaScriptSafeInteger,
5371    pub start_y: crate::JavaScriptSafeInteger,
5372    #[serde(
5373        default,
5374        deserialize_with = "crate::deserialize_present_nonnull",
5375        skip_serializing_if = "::std::option::Option::is_none"
5376    )]
5377    pub stroke_color: ::std::option::Option<::std::string::String>,
5378    pub width_nm: crate::JavaScriptSafeInteger,
5379}