kicad_monkey_contracts/generated/footprint_read_request.rs
1/// Error types.
2pub mod error {
3 /// Error from a `TryFrom` or `FromStr` implementation.
4 pub struct ConversionError(::std::borrow::Cow<'static, str>);
5 impl ::std::error::Error for ConversionError {}
6 impl ::std::fmt::Display for ConversionError {
7 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
8 ::std::fmt::Display::fmt(&self.0, f)
9 }
10 }
11 impl ::std::fmt::Debug for ConversionError {
12 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
13 ::std::fmt::Debug::fmt(&self.0, f)
14 }
15 }
16 impl From<&'static str> for ConversionError {
17 fn from(value: &'static str) -> Self {
18 Self(value.into())
19 }
20 }
21 impl From<String> for ConversionError {
22 fn from(value: String) -> Self {
23 Self(value.into())
24 }
25 }
26}
27///Controls a typed footprint summary read; source bytes are supplied out of band.
28///
29/// <details><summary>JSON schema</summary>
30///
31/// ```json
32///{
33/// "$id": "urn:wavenumber:schema:kicad_monkey.footprint_read.request:a0",
34/// "title": "Footprint read request a0",
35/// "description": "Controls a typed footprint summary read; source bytes are supplied out of band.",
36/// "type": "object",
37/// "required": [
38/// "max_depth",
39/// "max_pads",
40/// "max_properties",
41/// "max_source_bytes",
42/// "type",
43/// "version"
44/// ],
45/// "properties": {
46/// "max_depth": {
47/// "type": "integer",
48/// "maximum": 4294967295.0,
49/// "minimum": 0.0
50/// },
51/// "max_pads": {
52/// "type": "integer",
53/// "maximum": 4294967295.0,
54/// "minimum": 0.0
55/// },
56/// "max_properties": {
57/// "type": "integer",
58/// "maximum": 4294967295.0,
59/// "minimum": 0.0
60/// },
61/// "max_source_bytes": {
62/// "type": "string"
63/// },
64/// "type": {
65/// "type": "string",
66/// "const": "kicad_monkey.footprint_read.request"
67/// },
68/// "version": {
69/// "type": "string",
70/// "const": "a0"
71/// }
72/// },
73/// "additionalProperties": false
74///}
75/// ```
76/// </details>
77#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
78#[serde(deny_unknown_fields)]
79pub struct FootprintReadRequestA0 {
80 pub max_depth: u32,
81 pub max_pads: u32,
82 pub max_properties: u32,
83 pub max_source_bytes: ::std::string::String,
84 #[serde(rename = "type")]
85 pub type_: ::std::string::String,
86 pub version: ::std::string::String,
87}