mnx_rs/
mnx.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(
8            &self,
9            f: &mut ::std::fmt::Formatter<'_>,
10        ) -> Result<(), ::std::fmt::Error> {
11            ::std::fmt::Display::fmt(&self.0, f)
12        }
13    }
14    impl ::std::fmt::Debug for ConversionError {
15        fn fmt(
16            &self,
17            f: &mut ::std::fmt::Formatter<'_>,
18        ) -> Result<(), ::std::fmt::Error> {
19            ::std::fmt::Debug::fmt(&self.0, f)
20        }
21    }
22    impl From<&'static str> for ConversionError {
23        fn from(value: &'static str) -> Self {
24            Self(value.into())
25        }
26    }
27    impl From<String> for ConversionError {
28        fn from(value: String) -> Self {
29            Self(value.into())
30        }
31    }
32}
33///BeamList
34///
35/// <details><summary>JSON schema</summary>
36///
37/// ```json
38///{
39///  "type": "array",
40///  "items": {
41///    "type": "object",
42///    "required": [
43///      "events"
44///    ],
45///    "properties": {
46///      "events": {
47///        "type": "array",
48///        "items": {
49///          "$ref": "#/$defs/id"
50///        }
51///      },
52///      "hooks": {
53///        "type": "array",
54///        "items": {
55///          "type": "object",
56///          "required": [
57///            "direction",
58///            "event"
59///          ],
60///          "properties": {
61///            "direction": {
62///              "type": "string",
63///              "enum": [
64///                "left",
65///                "right"
66///              ]
67///            },
68///            "event": {
69///              "$ref": "#/$defs/id"
70///            }
71///          },
72///          "additionalProperties": false
73///        }
74///      },
75///      "inner": {
76///        "$ref": "#/$defs/beam-list"
77///      }
78///    },
79///    "additionalProperties": false
80///  }
81///}
82/// ```
83/// </details>
84#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
85#[serde(transparent)]
86pub struct BeamList(pub ::std::vec::Vec<BeamListItem>);
87impl ::std::ops::Deref for BeamList {
88    type Target = ::std::vec::Vec<BeamListItem>;
89    fn deref(&self) -> &::std::vec::Vec<BeamListItem> {
90        &self.0
91    }
92}
93impl ::std::convert::From<BeamList> for ::std::vec::Vec<BeamListItem> {
94    fn from(value: BeamList) -> Self {
95        value.0
96    }
97}
98impl ::std::convert::From<&BeamList> for BeamList {
99    fn from(value: &BeamList) -> Self {
100        value.clone()
101    }
102}
103impl ::std::convert::From<::std::vec::Vec<BeamListItem>> for BeamList {
104    fn from(value: ::std::vec::Vec<BeamListItem>) -> Self {
105        Self(value)
106    }
107}
108///BeamListItem
109///
110/// <details><summary>JSON schema</summary>
111///
112/// ```json
113///{
114///  "type": "object",
115///  "required": [
116///    "events"
117///  ],
118///  "properties": {
119///    "events": {
120///      "type": "array",
121///      "items": {
122///        "$ref": "#/$defs/id"
123///      }
124///    },
125///    "hooks": {
126///      "type": "array",
127///      "items": {
128///        "type": "object",
129///        "required": [
130///          "direction",
131///          "event"
132///        ],
133///        "properties": {
134///          "direction": {
135///            "type": "string",
136///            "enum": [
137///              "left",
138///              "right"
139///            ]
140///          },
141///          "event": {
142///            "$ref": "#/$defs/id"
143///          }
144///        },
145///        "additionalProperties": false
146///      }
147///    },
148///    "inner": {
149///      "$ref": "#/$defs/beam-list"
150///    }
151///  },
152///  "additionalProperties": false
153///}
154/// ```
155/// </details>
156#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
157#[serde(deny_unknown_fields)]
158pub struct BeamListItem {
159    pub events: ::std::vec::Vec<Id>,
160    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
161    pub hooks: ::std::vec::Vec<BeamListItemHooksItem>,
162    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
163    pub inner: ::std::option::Option<BeamList>,
164}
165impl ::std::convert::From<&BeamListItem> for BeamListItem {
166    fn from(value: &BeamListItem) -> Self {
167        value.clone()
168    }
169}
170impl BeamListItem {
171    pub fn builder() -> builder::BeamListItem {
172        Default::default()
173    }
174}
175///BeamListItemHooksItem
176///
177/// <details><summary>JSON schema</summary>
178///
179/// ```json
180///{
181///  "type": "object",
182///  "required": [
183///    "direction",
184///    "event"
185///  ],
186///  "properties": {
187///    "direction": {
188///      "type": "string",
189///      "enum": [
190///        "left",
191///        "right"
192///      ]
193///    },
194///    "event": {
195///      "$ref": "#/$defs/id"
196///    }
197///  },
198///  "additionalProperties": false
199///}
200/// ```
201/// </details>
202#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
203#[serde(deny_unknown_fields)]
204pub struct BeamListItemHooksItem {
205    pub direction: BeamListItemHooksItemDirection,
206    pub event: Id,
207}
208impl ::std::convert::From<&BeamListItemHooksItem> for BeamListItemHooksItem {
209    fn from(value: &BeamListItemHooksItem) -> Self {
210        value.clone()
211    }
212}
213impl BeamListItemHooksItem {
214    pub fn builder() -> builder::BeamListItemHooksItem {
215        Default::default()
216    }
217}
218///BeamListItemHooksItemDirection
219///
220/// <details><summary>JSON schema</summary>
221///
222/// ```json
223///{
224///  "type": "string",
225///  "enum": [
226///    "left",
227///    "right"
228///  ]
229///}
230/// ```
231/// </details>
232#[derive(
233    ::serde::Deserialize,
234    ::serde::Serialize,
235    Clone,
236    Copy,
237    Debug,
238    Eq,
239    Hash,
240    Ord,
241    PartialEq,
242    PartialOrd
243)]
244pub enum BeamListItemHooksItemDirection {
245    #[serde(rename = "left")]
246    Left,
247    #[serde(rename = "right")]
248    Right,
249}
250impl ::std::convert::From<&Self> for BeamListItemHooksItemDirection {
251    fn from(value: &BeamListItemHooksItemDirection) -> Self {
252        value.clone()
253    }
254}
255impl ::std::fmt::Display for BeamListItemHooksItemDirection {
256    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
257        match *self {
258            Self::Left => write!(f, "left"),
259            Self::Right => write!(f, "right"),
260        }
261    }
262}
263impl ::std::str::FromStr for BeamListItemHooksItemDirection {
264    type Err = self::error::ConversionError;
265    fn from_str(
266        value: &str,
267    ) -> ::std::result::Result<Self, self::error::ConversionError> {
268        match value {
269            "left" => Ok(Self::Left),
270            "right" => Ok(Self::Right),
271            _ => Err("invalid value".into()),
272        }
273    }
274}
275impl ::std::convert::TryFrom<&str> for BeamListItemHooksItemDirection {
276    type Error = self::error::ConversionError;
277    fn try_from(
278        value: &str,
279    ) -> ::std::result::Result<Self, self::error::ConversionError> {
280        value.parse()
281    }
282}
283impl ::std::convert::TryFrom<&::std::string::String> for BeamListItemHooksItemDirection {
284    type Error = self::error::ConversionError;
285    fn try_from(
286        value: &::std::string::String,
287    ) -> ::std::result::Result<Self, self::error::ConversionError> {
288        value.parse()
289    }
290}
291impl ::std::convert::TryFrom<::std::string::String> for BeamListItemHooksItemDirection {
292    type Error = self::error::ConversionError;
293    fn try_from(
294        value: ::std::string::String,
295    ) -> ::std::result::Result<Self, self::error::ConversionError> {
296        value.parse()
297    }
298}
299///Color
300///
301/// <details><summary>JSON schema</summary>
302///
303/// ```json
304///{
305///  "type": "string"
306///}
307/// ```
308/// </details>
309#[derive(
310    ::serde::Deserialize,
311    ::serde::Serialize,
312    Clone,
313    Debug,
314    Eq,
315    Hash,
316    Ord,
317    PartialEq,
318    PartialOrd
319)]
320#[serde(transparent)]
321pub struct Color(pub ::std::string::String);
322impl ::std::ops::Deref for Color {
323    type Target = ::std::string::String;
324    fn deref(&self) -> &::std::string::String {
325        &self.0
326    }
327}
328impl ::std::convert::From<Color> for ::std::string::String {
329    fn from(value: Color) -> Self {
330        value.0
331    }
332}
333impl ::std::convert::From<&Color> for Color {
334    fn from(value: &Color) -> Self {
335        value.clone()
336    }
337}
338impl ::std::convert::From<::std::string::String> for Color {
339    fn from(value: ::std::string::String) -> Self {
340        Self(value)
341    }
342}
343impl ::std::str::FromStr for Color {
344    type Err = ::std::convert::Infallible;
345    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
346        Ok(Self(value.to_string()))
347    }
348}
349impl ::std::fmt::Display for Color {
350    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
351        self.0.fmt(f)
352    }
353}
354///Event
355///
356/// <details><summary>JSON schema</summary>
357///
358/// ```json
359///{
360///  "type": "object",
361///  "properties": {
362///    "duration": {
363///      "$ref": "#/$defs/note-value"
364///    },
365///    "id": {
366///      "$ref": "#/$defs/id"
367///    },
368///    "lyrics": {
369///      "type": "object",
370///      "properties": {
371///        "lines": {
372///          "type": "object",
373///          "patternProperties": {
374///            "^.*$": {
375///              "type": "object",
376///              "required": [
377///                "text"
378///              ],
379///              "properties": {
380///                "text": {
381///                  "$ref": "#/$defs/string"
382///                },
383///                "type": {
384///                  "type": "string",
385///                  "enum": [
386///                    "start",
387///                    "middle",
388///                    "end",
389///                    "whole"
390///                  ]
391///                }
392///              },
393///              "additionalProperties": false
394///            }
395///          },
396///          "additionalProperties": false
397///        }
398///      },
399///      "additionalProperties": false
400///    },
401///    "markings": {
402///      "type": "object",
403///      "properties": {
404///        "accent": {
405///          "type": "object",
406///          "properties": {
407///            "pointing": {
408///              "$ref": "#/$defs/up-or-down"
409///            }
410///          },
411///          "additionalProperties": false
412///        },
413///        "breath": {
414///          "type": "object",
415///          "properties": {
416///            "symbol": {
417///              "type": "string"
418///            }
419///          },
420///          "additionalProperties": false
421///        },
422///        "softAccent": {
423///          "type": "object",
424///          "additionalProperties": false
425///        },
426///        "spiccato": {
427///          "type": "object",
428///          "additionalProperties": false
429///        },
430///        "staccatissimo": {
431///          "type": "object",
432///          "additionalProperties": false
433///        },
434///        "staccato": {
435///          "type": "object",
436///          "additionalProperties": false
437///        },
438///        "stress": {
439///          "type": "object",
440///          "additionalProperties": false
441///        },
442///        "strongAccent": {
443///          "type": "object",
444///          "properties": {
445///            "pointing": {
446///              "$ref": "#/$defs/up-or-down"
447///            }
448///          },
449///          "additionalProperties": false
450///        },
451///        "tenuto": {
452///          "type": "object",
453///          "additionalProperties": false
454///        },
455///        "tremolo": {
456///          "type": "object",
457///          "required": [
458///            "marks"
459///          ],
460///          "properties": {
461///            "marks": {
462///              "$ref": "#/$defs/positive-integer"
463///            }
464///          },
465///          "additionalProperties": false
466///        },
467///        "unstress": {
468///          "type": "object",
469///          "additionalProperties": false
470///        }
471///      },
472///      "additionalProperties": false
473///    },
474///    "measure": {
475///      "type": "boolean"
476///    },
477///    "notes": {
478///      "type": "array",
479///      "items": {
480///        "type": "object",
481///        "required": [
482///          "pitch"
483///        ],
484///        "properties": {
485///          "accidentalDisplay": {
486///            "type": "object",
487///            "required": [
488///              "show"
489///            ],
490///            "properties": {
491///              "enclosure": {
492///                "type": "object",
493///                "required": [
494///                  "symbol"
495///                ],
496///                "properties": {
497///                  "symbol": {
498///                    "type": "string",
499///                    "enum": [
500///                      "parentheses",
501///                      "brackets"
502///                    ]
503///                  }
504///                },
505///                "additionalProperties": false
506///              },
507///              "force": {
508///                "type": "boolean"
509///              },
510///              "show": {
511///                "type": "boolean"
512///              }
513///            },
514///            "additionalProperties": false
515///          },
516///          "class": {
517///            "$ref": "#/$defs/style-class"
518///          },
519///          "id": {
520///            "$ref": "#/$defs/id"
521///          },
522///          "perform": {
523///            "type": "object",
524///            "additionalProperties": false
525///          },
526///          "pitch": {
527///            "type": "object",
528///            "required": [
529///              "octave",
530///              "step"
531///            ],
532///            "properties": {
533///              "alter": {
534///                "type": "integer"
535///              },
536///              "octave": {
537///                "type": "integer"
538///              },
539///              "step": {
540///                "type": "string",
541///                "enum": [
542///                  "A",
543///                  "B",
544///                  "C",
545///                  "D",
546///                  "E",
547///                  "F",
548///                  "G"
549///                ]
550///              }
551///            },
552///            "additionalProperties": false
553///          },
554///          "smuflFont": {
555///            "$ref": "#/$defs/smufl-font"
556///          },
557///          "staff": {
558///            "$ref": "#/$defs/staff-number"
559///          },
560///          "ties": {
561///            "type": "array",
562///            "items": {
563///              "type": "object",
564///              "properties": {
565///                "lv": {
566///                  "type": "boolean"
567///                },
568///                "side": {
569///                  "$ref": "#/$defs/slur-side"
570///                },
571///                "target": {
572///                  "$ref": "#/$defs/id"
573///                }
574///              },
575///              "additionalProperties": false
576///            }
577///          }
578///        },
579///        "additionalProperties": false
580///      }
581///    },
582///    "orient": {
583///      "$ref": "#/$defs/orientation"
584///    },
585///    "rest": {
586///      "type": "object",
587///      "properties": {
588///        "staffPosition": {
589///          "$ref": "#/$defs/staff-position"
590///        }
591///      },
592///      "additionalProperties": false
593///    },
594///    "slurs": {
595///      "type": "array",
596///      "items": {
597///        "type": "object",
598///        "required": [
599///          "target"
600///        ],
601///        "properties": {
602///          "endNote": {
603///            "$ref": "#/$defs/id"
604///          },
605///          "lineType": {
606///            "type": "string",
607///            "enum": [
608///              "dashed",
609///              "dotted",
610///              "solid",
611///              "wavy"
612///            ]
613///          },
614///          "side": {
615///            "$ref": "#/$defs/slur-side"
616///          },
617///          "sideEnd": {
618///            "$ref": "#/$defs/slur-side"
619///          },
620///          "startNote": {
621///            "$ref": "#/$defs/id"
622///          },
623///          "target": {
624///            "$ref": "#/$defs/id"
625///          }
626///        },
627///        "additionalProperties": false
628///      }
629///    },
630///    "smuflFont": {
631///      "$ref": "#/$defs/smufl-font"
632///    },
633///    "staff": {
634///      "$ref": "#/$defs/staff-number"
635///    },
636///    "stemDirection": {
637///      "$ref": "#/$defs/stem-direction"
638///    },
639///    "type": {
640///      "type": "string",
641///      "const": "event"
642///    }
643///  },
644///  "additionalProperties": false
645///}
646/// ```
647/// </details>
648#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
649#[serde(deny_unknown_fields)]
650pub struct Event {
651    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
652    pub duration: ::std::option::Option<NoteValue>,
653    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
654    pub id: ::std::option::Option<Id>,
655    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
656    pub lyrics: ::std::option::Option<EventLyrics>,
657    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
658    pub markings: ::std::option::Option<EventMarkings>,
659    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
660    pub measure: ::std::option::Option<bool>,
661    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
662    pub notes: ::std::vec::Vec<EventNotesItem>,
663    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
664    pub orient: ::std::option::Option<Orientation>,
665    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
666    pub rest: ::std::option::Option<EventRest>,
667    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
668    pub slurs: ::std::vec::Vec<EventSlursItem>,
669    #[serde(
670        rename = "smuflFont",
671        default,
672        skip_serializing_if = "::std::option::Option::is_none"
673    )]
674    pub smufl_font: ::std::option::Option<SmuflFont>,
675    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
676    pub staff: ::std::option::Option<StaffNumber>,
677    #[serde(
678        rename = "stemDirection",
679        default,
680        skip_serializing_if = "::std::option::Option::is_none"
681    )]
682    pub stem_direction: ::std::option::Option<StemDirection>,
683    #[serde(
684        rename = "type",
685        default,
686        skip_serializing_if = "::std::option::Option::is_none"
687    )]
688    pub type_: ::std::option::Option<::std::string::String>,
689}
690impl ::std::convert::From<&Event> for Event {
691    fn from(value: &Event) -> Self {
692        value.clone()
693    }
694}
695impl ::std::default::Default for Event {
696    fn default() -> Self {
697        Self {
698            duration: Default::default(),
699            id: Default::default(),
700            lyrics: Default::default(),
701            markings: Default::default(),
702            measure: Default::default(),
703            notes: Default::default(),
704            orient: Default::default(),
705            rest: Default::default(),
706            slurs: Default::default(),
707            smufl_font: Default::default(),
708            staff: Default::default(),
709            stem_direction: Default::default(),
710            type_: Default::default(),
711        }
712    }
713}
714impl Event {
715    pub fn builder() -> builder::Event {
716        Default::default()
717    }
718}
719///EventLyrics
720///
721/// <details><summary>JSON schema</summary>
722///
723/// ```json
724///{
725///  "type": "object",
726///  "properties": {
727///    "lines": {
728///      "type": "object",
729///      "patternProperties": {
730///        "^.*$": {
731///          "type": "object",
732///          "required": [
733///            "text"
734///          ],
735///          "properties": {
736///            "text": {
737///              "$ref": "#/$defs/string"
738///            },
739///            "type": {
740///              "type": "string",
741///              "enum": [
742///                "start",
743///                "middle",
744///                "end",
745///                "whole"
746///              ]
747///            }
748///          },
749///          "additionalProperties": false
750///        }
751///      },
752///      "additionalProperties": false
753///    }
754///  },
755///  "additionalProperties": false
756///}
757/// ```
758/// </details>
759#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
760#[serde(deny_unknown_fields)]
761pub struct EventLyrics {
762    #[serde(default, skip_serializing_if = ":: std :: collections :: HashMap::is_empty")]
763    pub lines: ::std::collections::HashMap<EventLyricsLinesKey, EventLyricsLinesValue>,
764}
765impl ::std::convert::From<&EventLyrics> for EventLyrics {
766    fn from(value: &EventLyrics) -> Self {
767        value.clone()
768    }
769}
770impl ::std::default::Default for EventLyrics {
771    fn default() -> Self {
772        Self { lines: Default::default() }
773    }
774}
775impl EventLyrics {
776    pub fn builder() -> builder::EventLyrics {
777        Default::default()
778    }
779}
780///EventLyricsLinesKey
781///
782/// <details><summary>JSON schema</summary>
783///
784/// ```json
785///{
786///  "type": "string",
787///  "pattern": "^.*$"
788///}
789/// ```
790/// </details>
791#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
792#[serde(transparent)]
793pub struct EventLyricsLinesKey(::std::string::String);
794impl ::std::ops::Deref for EventLyricsLinesKey {
795    type Target = ::std::string::String;
796    fn deref(&self) -> &::std::string::String {
797        &self.0
798    }
799}
800impl ::std::convert::From<EventLyricsLinesKey> for ::std::string::String {
801    fn from(value: EventLyricsLinesKey) -> Self {
802        value.0
803    }
804}
805impl ::std::convert::From<&EventLyricsLinesKey> for EventLyricsLinesKey {
806    fn from(value: &EventLyricsLinesKey) -> Self {
807        value.clone()
808    }
809}
810impl ::std::str::FromStr for EventLyricsLinesKey {
811    type Err = self::error::ConversionError;
812    fn from_str(
813        value: &str,
814    ) -> ::std::result::Result<Self, self::error::ConversionError> {
815        if regress::Regex::new("^.*$").unwrap().find(value).is_none() {
816            return Err("doesn't match pattern \"^.*$\"".into());
817        }
818        Ok(Self(value.to_string()))
819    }
820}
821impl ::std::convert::TryFrom<&str> for EventLyricsLinesKey {
822    type Error = self::error::ConversionError;
823    fn try_from(
824        value: &str,
825    ) -> ::std::result::Result<Self, self::error::ConversionError> {
826        value.parse()
827    }
828}
829impl ::std::convert::TryFrom<&::std::string::String> for EventLyricsLinesKey {
830    type Error = self::error::ConversionError;
831    fn try_from(
832        value: &::std::string::String,
833    ) -> ::std::result::Result<Self, self::error::ConversionError> {
834        value.parse()
835    }
836}
837impl ::std::convert::TryFrom<::std::string::String> for EventLyricsLinesKey {
838    type Error = self::error::ConversionError;
839    fn try_from(
840        value: ::std::string::String,
841    ) -> ::std::result::Result<Self, self::error::ConversionError> {
842        value.parse()
843    }
844}
845impl<'de> ::serde::Deserialize<'de> for EventLyricsLinesKey {
846    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
847    where
848        D: ::serde::Deserializer<'de>,
849    {
850        ::std::string::String::deserialize(deserializer)?
851            .parse()
852            .map_err(|e: self::error::ConversionError| {
853                <D::Error as ::serde::de::Error>::custom(e.to_string())
854            })
855    }
856}
857///EventLyricsLinesValue
858///
859/// <details><summary>JSON schema</summary>
860///
861/// ```json
862///{
863///  "type": "object",
864///  "required": [
865///    "text"
866///  ],
867///  "properties": {
868///    "text": {
869///      "$ref": "#/$defs/string"
870///    },
871///    "type": {
872///      "type": "string",
873///      "enum": [
874///        "start",
875///        "middle",
876///        "end",
877///        "whole"
878///      ]
879///    }
880///  },
881///  "additionalProperties": false
882///}
883/// ```
884/// </details>
885#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
886#[serde(deny_unknown_fields)]
887pub struct EventLyricsLinesValue {
888    pub text: String,
889    #[serde(
890        rename = "type",
891        default,
892        skip_serializing_if = "::std::option::Option::is_none"
893    )]
894    pub type_: ::std::option::Option<EventLyricsLinesValueType>,
895}
896impl ::std::convert::From<&EventLyricsLinesValue> for EventLyricsLinesValue {
897    fn from(value: &EventLyricsLinesValue) -> Self {
898        value.clone()
899    }
900}
901impl EventLyricsLinesValue {
902    pub fn builder() -> builder::EventLyricsLinesValue {
903        Default::default()
904    }
905}
906///EventLyricsLinesValueType
907///
908/// <details><summary>JSON schema</summary>
909///
910/// ```json
911///{
912///  "type": "string",
913///  "enum": [
914///    "start",
915///    "middle",
916///    "end",
917///    "whole"
918///  ]
919///}
920/// ```
921/// </details>
922#[derive(
923    ::serde::Deserialize,
924    ::serde::Serialize,
925    Clone,
926    Copy,
927    Debug,
928    Eq,
929    Hash,
930    Ord,
931    PartialEq,
932    PartialOrd
933)]
934pub enum EventLyricsLinesValueType {
935    #[serde(rename = "start")]
936    Start,
937    #[serde(rename = "middle")]
938    Middle,
939    #[serde(rename = "end")]
940    End,
941    #[serde(rename = "whole")]
942    Whole,
943}
944impl ::std::convert::From<&Self> for EventLyricsLinesValueType {
945    fn from(value: &EventLyricsLinesValueType) -> Self {
946        value.clone()
947    }
948}
949impl ::std::fmt::Display for EventLyricsLinesValueType {
950    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
951        match *self {
952            Self::Start => write!(f, "start"),
953            Self::Middle => write!(f, "middle"),
954            Self::End => write!(f, "end"),
955            Self::Whole => write!(f, "whole"),
956        }
957    }
958}
959impl ::std::str::FromStr for EventLyricsLinesValueType {
960    type Err = self::error::ConversionError;
961    fn from_str(
962        value: &str,
963    ) -> ::std::result::Result<Self, self::error::ConversionError> {
964        match value {
965            "start" => Ok(Self::Start),
966            "middle" => Ok(Self::Middle),
967            "end" => Ok(Self::End),
968            "whole" => Ok(Self::Whole),
969            _ => Err("invalid value".into()),
970        }
971    }
972}
973impl ::std::convert::TryFrom<&str> for EventLyricsLinesValueType {
974    type Error = self::error::ConversionError;
975    fn try_from(
976        value: &str,
977    ) -> ::std::result::Result<Self, self::error::ConversionError> {
978        value.parse()
979    }
980}
981impl ::std::convert::TryFrom<&::std::string::String> for EventLyricsLinesValueType {
982    type Error = self::error::ConversionError;
983    fn try_from(
984        value: &::std::string::String,
985    ) -> ::std::result::Result<Self, self::error::ConversionError> {
986        value.parse()
987    }
988}
989impl ::std::convert::TryFrom<::std::string::String> for EventLyricsLinesValueType {
990    type Error = self::error::ConversionError;
991    fn try_from(
992        value: ::std::string::String,
993    ) -> ::std::result::Result<Self, self::error::ConversionError> {
994        value.parse()
995    }
996}
997///EventMarkings
998///
999/// <details><summary>JSON schema</summary>
1000///
1001/// ```json
1002///{
1003///  "type": "object",
1004///  "properties": {
1005///    "accent": {
1006///      "type": "object",
1007///      "properties": {
1008///        "pointing": {
1009///          "$ref": "#/$defs/up-or-down"
1010///        }
1011///      },
1012///      "additionalProperties": false
1013///    },
1014///    "breath": {
1015///      "type": "object",
1016///      "properties": {
1017///        "symbol": {
1018///          "type": "string"
1019///        }
1020///      },
1021///      "additionalProperties": false
1022///    },
1023///    "softAccent": {
1024///      "type": "object",
1025///      "additionalProperties": false
1026///    },
1027///    "spiccato": {
1028///      "type": "object",
1029///      "additionalProperties": false
1030///    },
1031///    "staccatissimo": {
1032///      "type": "object",
1033///      "additionalProperties": false
1034///    },
1035///    "staccato": {
1036///      "type": "object",
1037///      "additionalProperties": false
1038///    },
1039///    "stress": {
1040///      "type": "object",
1041///      "additionalProperties": false
1042///    },
1043///    "strongAccent": {
1044///      "type": "object",
1045///      "properties": {
1046///        "pointing": {
1047///          "$ref": "#/$defs/up-or-down"
1048///        }
1049///      },
1050///      "additionalProperties": false
1051///    },
1052///    "tenuto": {
1053///      "type": "object",
1054///      "additionalProperties": false
1055///    },
1056///    "tremolo": {
1057///      "type": "object",
1058///      "required": [
1059///        "marks"
1060///      ],
1061///      "properties": {
1062///        "marks": {
1063///          "$ref": "#/$defs/positive-integer"
1064///        }
1065///      },
1066///      "additionalProperties": false
1067///    },
1068///    "unstress": {
1069///      "type": "object",
1070///      "additionalProperties": false
1071///    }
1072///  },
1073///  "additionalProperties": false
1074///}
1075/// ```
1076/// </details>
1077#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1078#[serde(deny_unknown_fields)]
1079pub struct EventMarkings {
1080    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1081    pub accent: ::std::option::Option<EventMarkingsAccent>,
1082    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1083    pub breath: ::std::option::Option<EventMarkingsBreath>,
1084    #[serde(
1085        rename = "softAccent",
1086        default,
1087        skip_serializing_if = "::std::option::Option::is_none"
1088    )]
1089    pub soft_accent: ::std::option::Option<EventMarkingsSoftAccent>,
1090    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1091    pub spiccato: ::std::option::Option<EventMarkingsSpiccato>,
1092    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1093    pub staccatissimo: ::std::option::Option<EventMarkingsStaccatissimo>,
1094    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1095    pub staccato: ::std::option::Option<EventMarkingsStaccato>,
1096    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1097    pub stress: ::std::option::Option<EventMarkingsStress>,
1098    #[serde(
1099        rename = "strongAccent",
1100        default,
1101        skip_serializing_if = "::std::option::Option::is_none"
1102    )]
1103    pub strong_accent: ::std::option::Option<EventMarkingsStrongAccent>,
1104    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1105    pub tenuto: ::std::option::Option<EventMarkingsTenuto>,
1106    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1107    pub tremolo: ::std::option::Option<EventMarkingsTremolo>,
1108    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1109    pub unstress: ::std::option::Option<EventMarkingsUnstress>,
1110}
1111impl ::std::convert::From<&EventMarkings> for EventMarkings {
1112    fn from(value: &EventMarkings) -> Self {
1113        value.clone()
1114    }
1115}
1116impl ::std::default::Default for EventMarkings {
1117    fn default() -> Self {
1118        Self {
1119            accent: Default::default(),
1120            breath: Default::default(),
1121            soft_accent: Default::default(),
1122            spiccato: Default::default(),
1123            staccatissimo: Default::default(),
1124            staccato: Default::default(),
1125            stress: Default::default(),
1126            strong_accent: Default::default(),
1127            tenuto: Default::default(),
1128            tremolo: Default::default(),
1129            unstress: Default::default(),
1130        }
1131    }
1132}
1133impl EventMarkings {
1134    pub fn builder() -> builder::EventMarkings {
1135        Default::default()
1136    }
1137}
1138///EventMarkingsAccent
1139///
1140/// <details><summary>JSON schema</summary>
1141///
1142/// ```json
1143///{
1144///  "type": "object",
1145///  "properties": {
1146///    "pointing": {
1147///      "$ref": "#/$defs/up-or-down"
1148///    }
1149///  },
1150///  "additionalProperties": false
1151///}
1152/// ```
1153/// </details>
1154#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1155#[serde(deny_unknown_fields)]
1156pub struct EventMarkingsAccent {
1157    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1158    pub pointing: ::std::option::Option<UpOrDown>,
1159}
1160impl ::std::convert::From<&EventMarkingsAccent> for EventMarkingsAccent {
1161    fn from(value: &EventMarkingsAccent) -> Self {
1162        value.clone()
1163    }
1164}
1165impl ::std::default::Default for EventMarkingsAccent {
1166    fn default() -> Self {
1167        Self {
1168            pointing: Default::default(),
1169        }
1170    }
1171}
1172impl EventMarkingsAccent {
1173    pub fn builder() -> builder::EventMarkingsAccent {
1174        Default::default()
1175    }
1176}
1177///EventMarkingsBreath
1178///
1179/// <details><summary>JSON schema</summary>
1180///
1181/// ```json
1182///{
1183///  "type": "object",
1184///  "properties": {
1185///    "symbol": {
1186///      "type": "string"
1187///    }
1188///  },
1189///  "additionalProperties": false
1190///}
1191/// ```
1192/// </details>
1193#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1194#[serde(deny_unknown_fields)]
1195pub struct EventMarkingsBreath {
1196    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1197    pub symbol: ::std::option::Option<::std::string::String>,
1198}
1199impl ::std::convert::From<&EventMarkingsBreath> for EventMarkingsBreath {
1200    fn from(value: &EventMarkingsBreath) -> Self {
1201        value.clone()
1202    }
1203}
1204impl ::std::default::Default for EventMarkingsBreath {
1205    fn default() -> Self {
1206        Self { symbol: Default::default() }
1207    }
1208}
1209impl EventMarkingsBreath {
1210    pub fn builder() -> builder::EventMarkingsBreath {
1211        Default::default()
1212    }
1213}
1214///EventMarkingsSoftAccent
1215///
1216/// <details><summary>JSON schema</summary>
1217///
1218/// ```json
1219///{
1220///  "type": "object",
1221///  "additionalProperties": false
1222///}
1223/// ```
1224/// </details>
1225#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1226#[serde(deny_unknown_fields)]
1227pub struct EventMarkingsSoftAccent {}
1228impl ::std::convert::From<&EventMarkingsSoftAccent> for EventMarkingsSoftAccent {
1229    fn from(value: &EventMarkingsSoftAccent) -> Self {
1230        value.clone()
1231    }
1232}
1233impl ::std::default::Default for EventMarkingsSoftAccent {
1234    fn default() -> Self {
1235        Self {}
1236    }
1237}
1238impl EventMarkingsSoftAccent {
1239    pub fn builder() -> builder::EventMarkingsSoftAccent {
1240        Default::default()
1241    }
1242}
1243///EventMarkingsSpiccato
1244///
1245/// <details><summary>JSON schema</summary>
1246///
1247/// ```json
1248///{
1249///  "type": "object",
1250///  "additionalProperties": false
1251///}
1252/// ```
1253/// </details>
1254#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1255#[serde(deny_unknown_fields)]
1256pub struct EventMarkingsSpiccato {}
1257impl ::std::convert::From<&EventMarkingsSpiccato> for EventMarkingsSpiccato {
1258    fn from(value: &EventMarkingsSpiccato) -> Self {
1259        value.clone()
1260    }
1261}
1262impl ::std::default::Default for EventMarkingsSpiccato {
1263    fn default() -> Self {
1264        Self {}
1265    }
1266}
1267impl EventMarkingsSpiccato {
1268    pub fn builder() -> builder::EventMarkingsSpiccato {
1269        Default::default()
1270    }
1271}
1272///EventMarkingsStaccatissimo
1273///
1274/// <details><summary>JSON schema</summary>
1275///
1276/// ```json
1277///{
1278///  "type": "object",
1279///  "additionalProperties": false
1280///}
1281/// ```
1282/// </details>
1283#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1284#[serde(deny_unknown_fields)]
1285pub struct EventMarkingsStaccatissimo {}
1286impl ::std::convert::From<&EventMarkingsStaccatissimo> for EventMarkingsStaccatissimo {
1287    fn from(value: &EventMarkingsStaccatissimo) -> Self {
1288        value.clone()
1289    }
1290}
1291impl ::std::default::Default for EventMarkingsStaccatissimo {
1292    fn default() -> Self {
1293        Self {}
1294    }
1295}
1296impl EventMarkingsStaccatissimo {
1297    pub fn builder() -> builder::EventMarkingsStaccatissimo {
1298        Default::default()
1299    }
1300}
1301///EventMarkingsStaccato
1302///
1303/// <details><summary>JSON schema</summary>
1304///
1305/// ```json
1306///{
1307///  "type": "object",
1308///  "additionalProperties": false
1309///}
1310/// ```
1311/// </details>
1312#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1313#[serde(deny_unknown_fields)]
1314pub struct EventMarkingsStaccato {}
1315impl ::std::convert::From<&EventMarkingsStaccato> for EventMarkingsStaccato {
1316    fn from(value: &EventMarkingsStaccato) -> Self {
1317        value.clone()
1318    }
1319}
1320impl ::std::default::Default for EventMarkingsStaccato {
1321    fn default() -> Self {
1322        Self {}
1323    }
1324}
1325impl EventMarkingsStaccato {
1326    pub fn builder() -> builder::EventMarkingsStaccato {
1327        Default::default()
1328    }
1329}
1330///EventMarkingsStress
1331///
1332/// <details><summary>JSON schema</summary>
1333///
1334/// ```json
1335///{
1336///  "type": "object",
1337///  "additionalProperties": false
1338///}
1339/// ```
1340/// </details>
1341#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1342#[serde(deny_unknown_fields)]
1343pub struct EventMarkingsStress {}
1344impl ::std::convert::From<&EventMarkingsStress> for EventMarkingsStress {
1345    fn from(value: &EventMarkingsStress) -> Self {
1346        value.clone()
1347    }
1348}
1349impl ::std::default::Default for EventMarkingsStress {
1350    fn default() -> Self {
1351        Self {}
1352    }
1353}
1354impl EventMarkingsStress {
1355    pub fn builder() -> builder::EventMarkingsStress {
1356        Default::default()
1357    }
1358}
1359///EventMarkingsStrongAccent
1360///
1361/// <details><summary>JSON schema</summary>
1362///
1363/// ```json
1364///{
1365///  "type": "object",
1366///  "properties": {
1367///    "pointing": {
1368///      "$ref": "#/$defs/up-or-down"
1369///    }
1370///  },
1371///  "additionalProperties": false
1372///}
1373/// ```
1374/// </details>
1375#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1376#[serde(deny_unknown_fields)]
1377pub struct EventMarkingsStrongAccent {
1378    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1379    pub pointing: ::std::option::Option<UpOrDown>,
1380}
1381impl ::std::convert::From<&EventMarkingsStrongAccent> for EventMarkingsStrongAccent {
1382    fn from(value: &EventMarkingsStrongAccent) -> Self {
1383        value.clone()
1384    }
1385}
1386impl ::std::default::Default for EventMarkingsStrongAccent {
1387    fn default() -> Self {
1388        Self {
1389            pointing: Default::default(),
1390        }
1391    }
1392}
1393impl EventMarkingsStrongAccent {
1394    pub fn builder() -> builder::EventMarkingsStrongAccent {
1395        Default::default()
1396    }
1397}
1398///EventMarkingsTenuto
1399///
1400/// <details><summary>JSON schema</summary>
1401///
1402/// ```json
1403///{
1404///  "type": "object",
1405///  "additionalProperties": false
1406///}
1407/// ```
1408/// </details>
1409#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1410#[serde(deny_unknown_fields)]
1411pub struct EventMarkingsTenuto {}
1412impl ::std::convert::From<&EventMarkingsTenuto> for EventMarkingsTenuto {
1413    fn from(value: &EventMarkingsTenuto) -> Self {
1414        value.clone()
1415    }
1416}
1417impl ::std::default::Default for EventMarkingsTenuto {
1418    fn default() -> Self {
1419        Self {}
1420    }
1421}
1422impl EventMarkingsTenuto {
1423    pub fn builder() -> builder::EventMarkingsTenuto {
1424        Default::default()
1425    }
1426}
1427///EventMarkingsTremolo
1428///
1429/// <details><summary>JSON schema</summary>
1430///
1431/// ```json
1432///{
1433///  "type": "object",
1434///  "required": [
1435///    "marks"
1436///  ],
1437///  "properties": {
1438///    "marks": {
1439///      "$ref": "#/$defs/positive-integer"
1440///    }
1441///  },
1442///  "additionalProperties": false
1443///}
1444/// ```
1445/// </details>
1446#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1447#[serde(deny_unknown_fields)]
1448pub struct EventMarkingsTremolo {
1449    pub marks: PositiveInteger,
1450}
1451impl ::std::convert::From<&EventMarkingsTremolo> for EventMarkingsTremolo {
1452    fn from(value: &EventMarkingsTremolo) -> Self {
1453        value.clone()
1454    }
1455}
1456impl EventMarkingsTremolo {
1457    pub fn builder() -> builder::EventMarkingsTremolo {
1458        Default::default()
1459    }
1460}
1461///EventMarkingsUnstress
1462///
1463/// <details><summary>JSON schema</summary>
1464///
1465/// ```json
1466///{
1467///  "type": "object",
1468///  "additionalProperties": false
1469///}
1470/// ```
1471/// </details>
1472#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1473#[serde(deny_unknown_fields)]
1474pub struct EventMarkingsUnstress {}
1475impl ::std::convert::From<&EventMarkingsUnstress> for EventMarkingsUnstress {
1476    fn from(value: &EventMarkingsUnstress) -> Self {
1477        value.clone()
1478    }
1479}
1480impl ::std::default::Default for EventMarkingsUnstress {
1481    fn default() -> Self {
1482        Self {}
1483    }
1484}
1485impl EventMarkingsUnstress {
1486    pub fn builder() -> builder::EventMarkingsUnstress {
1487        Default::default()
1488    }
1489}
1490///EventNotesItem
1491///
1492/// <details><summary>JSON schema</summary>
1493///
1494/// ```json
1495///{
1496///  "type": "object",
1497///  "required": [
1498///    "pitch"
1499///  ],
1500///  "properties": {
1501///    "accidentalDisplay": {
1502///      "type": "object",
1503///      "required": [
1504///        "show"
1505///      ],
1506///      "properties": {
1507///        "enclosure": {
1508///          "type": "object",
1509///          "required": [
1510///            "symbol"
1511///          ],
1512///          "properties": {
1513///            "symbol": {
1514///              "type": "string",
1515///              "enum": [
1516///                "parentheses",
1517///                "brackets"
1518///              ]
1519///            }
1520///          },
1521///          "additionalProperties": false
1522///        },
1523///        "force": {
1524///          "type": "boolean"
1525///        },
1526///        "show": {
1527///          "type": "boolean"
1528///        }
1529///      },
1530///      "additionalProperties": false
1531///    },
1532///    "class": {
1533///      "$ref": "#/$defs/style-class"
1534///    },
1535///    "id": {
1536///      "$ref": "#/$defs/id"
1537///    },
1538///    "perform": {
1539///      "type": "object",
1540///      "additionalProperties": false
1541///    },
1542///    "pitch": {
1543///      "type": "object",
1544///      "required": [
1545///        "octave",
1546///        "step"
1547///      ],
1548///      "properties": {
1549///        "alter": {
1550///          "type": "integer"
1551///        },
1552///        "octave": {
1553///          "type": "integer"
1554///        },
1555///        "step": {
1556///          "type": "string",
1557///          "enum": [
1558///            "A",
1559///            "B",
1560///            "C",
1561///            "D",
1562///            "E",
1563///            "F",
1564///            "G"
1565///          ]
1566///        }
1567///      },
1568///      "additionalProperties": false
1569///    },
1570///    "smuflFont": {
1571///      "$ref": "#/$defs/smufl-font"
1572///    },
1573///    "staff": {
1574///      "$ref": "#/$defs/staff-number"
1575///    },
1576///    "ties": {
1577///      "type": "array",
1578///      "items": {
1579///        "type": "object",
1580///        "properties": {
1581///          "lv": {
1582///            "type": "boolean"
1583///          },
1584///          "side": {
1585///            "$ref": "#/$defs/slur-side"
1586///          },
1587///          "target": {
1588///            "$ref": "#/$defs/id"
1589///          }
1590///        },
1591///        "additionalProperties": false
1592///      }
1593///    }
1594///  },
1595///  "additionalProperties": false
1596///}
1597/// ```
1598/// </details>
1599#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1600#[serde(deny_unknown_fields)]
1601pub struct EventNotesItem {
1602    #[serde(
1603        rename = "accidentalDisplay",
1604        default,
1605        skip_serializing_if = "::std::option::Option::is_none"
1606    )]
1607    pub accidental_display: ::std::option::Option<EventNotesItemAccidentalDisplay>,
1608    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1609    pub class: ::std::option::Option<StyleClass>,
1610    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1611    pub id: ::std::option::Option<Id>,
1612    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1613    pub perform: ::std::option::Option<EventNotesItemPerform>,
1614    pub pitch: EventNotesItemPitch,
1615    #[serde(
1616        rename = "smuflFont",
1617        default,
1618        skip_serializing_if = "::std::option::Option::is_none"
1619    )]
1620    pub smufl_font: ::std::option::Option<SmuflFont>,
1621    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1622    pub staff: ::std::option::Option<StaffNumber>,
1623    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1624    pub ties: ::std::vec::Vec<EventNotesItemTiesItem>,
1625}
1626impl ::std::convert::From<&EventNotesItem> for EventNotesItem {
1627    fn from(value: &EventNotesItem) -> Self {
1628        value.clone()
1629    }
1630}
1631impl EventNotesItem {
1632    pub fn builder() -> builder::EventNotesItem {
1633        Default::default()
1634    }
1635}
1636///EventNotesItemAccidentalDisplay
1637///
1638/// <details><summary>JSON schema</summary>
1639///
1640/// ```json
1641///{
1642///  "type": "object",
1643///  "required": [
1644///    "show"
1645///  ],
1646///  "properties": {
1647///    "enclosure": {
1648///      "type": "object",
1649///      "required": [
1650///        "symbol"
1651///      ],
1652///      "properties": {
1653///        "symbol": {
1654///          "type": "string",
1655///          "enum": [
1656///            "parentheses",
1657///            "brackets"
1658///          ]
1659///        }
1660///      },
1661///      "additionalProperties": false
1662///    },
1663///    "force": {
1664///      "type": "boolean"
1665///    },
1666///    "show": {
1667///      "type": "boolean"
1668///    }
1669///  },
1670///  "additionalProperties": false
1671///}
1672/// ```
1673/// </details>
1674#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1675#[serde(deny_unknown_fields)]
1676pub struct EventNotesItemAccidentalDisplay {
1677    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1678    pub enclosure: ::std::option::Option<EventNotesItemAccidentalDisplayEnclosure>,
1679    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1680    pub force: ::std::option::Option<bool>,
1681    pub show: bool,
1682}
1683impl ::std::convert::From<&EventNotesItemAccidentalDisplay>
1684for EventNotesItemAccidentalDisplay {
1685    fn from(value: &EventNotesItemAccidentalDisplay) -> Self {
1686        value.clone()
1687    }
1688}
1689impl EventNotesItemAccidentalDisplay {
1690    pub fn builder() -> builder::EventNotesItemAccidentalDisplay {
1691        Default::default()
1692    }
1693}
1694///EventNotesItemAccidentalDisplayEnclosure
1695///
1696/// <details><summary>JSON schema</summary>
1697///
1698/// ```json
1699///{
1700///  "type": "object",
1701///  "required": [
1702///    "symbol"
1703///  ],
1704///  "properties": {
1705///    "symbol": {
1706///      "type": "string",
1707///      "enum": [
1708///        "parentheses",
1709///        "brackets"
1710///      ]
1711///    }
1712///  },
1713///  "additionalProperties": false
1714///}
1715/// ```
1716/// </details>
1717#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1718#[serde(deny_unknown_fields)]
1719pub struct EventNotesItemAccidentalDisplayEnclosure {
1720    pub symbol: EventNotesItemAccidentalDisplayEnclosureSymbol,
1721}
1722impl ::std::convert::From<&EventNotesItemAccidentalDisplayEnclosure>
1723for EventNotesItemAccidentalDisplayEnclosure {
1724    fn from(value: &EventNotesItemAccidentalDisplayEnclosure) -> Self {
1725        value.clone()
1726    }
1727}
1728impl EventNotesItemAccidentalDisplayEnclosure {
1729    pub fn builder() -> builder::EventNotesItemAccidentalDisplayEnclosure {
1730        Default::default()
1731    }
1732}
1733///EventNotesItemAccidentalDisplayEnclosureSymbol
1734///
1735/// <details><summary>JSON schema</summary>
1736///
1737/// ```json
1738///{
1739///  "type": "string",
1740///  "enum": [
1741///    "parentheses",
1742///    "brackets"
1743///  ]
1744///}
1745/// ```
1746/// </details>
1747#[derive(
1748    ::serde::Deserialize,
1749    ::serde::Serialize,
1750    Clone,
1751    Copy,
1752    Debug,
1753    Eq,
1754    Hash,
1755    Ord,
1756    PartialEq,
1757    PartialOrd
1758)]
1759pub enum EventNotesItemAccidentalDisplayEnclosureSymbol {
1760    #[serde(rename = "parentheses")]
1761    Parentheses,
1762    #[serde(rename = "brackets")]
1763    Brackets,
1764}
1765impl ::std::convert::From<&Self> for EventNotesItemAccidentalDisplayEnclosureSymbol {
1766    fn from(value: &EventNotesItemAccidentalDisplayEnclosureSymbol) -> Self {
1767        value.clone()
1768    }
1769}
1770impl ::std::fmt::Display for EventNotesItemAccidentalDisplayEnclosureSymbol {
1771    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1772        match *self {
1773            Self::Parentheses => write!(f, "parentheses"),
1774            Self::Brackets => write!(f, "brackets"),
1775        }
1776    }
1777}
1778impl ::std::str::FromStr for EventNotesItemAccidentalDisplayEnclosureSymbol {
1779    type Err = self::error::ConversionError;
1780    fn from_str(
1781        value: &str,
1782    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1783        match value {
1784            "parentheses" => Ok(Self::Parentheses),
1785            "brackets" => Ok(Self::Brackets),
1786            _ => Err("invalid value".into()),
1787        }
1788    }
1789}
1790impl ::std::convert::TryFrom<&str> for EventNotesItemAccidentalDisplayEnclosureSymbol {
1791    type Error = self::error::ConversionError;
1792    fn try_from(
1793        value: &str,
1794    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1795        value.parse()
1796    }
1797}
1798impl ::std::convert::TryFrom<&::std::string::String>
1799for EventNotesItemAccidentalDisplayEnclosureSymbol {
1800    type Error = self::error::ConversionError;
1801    fn try_from(
1802        value: &::std::string::String,
1803    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1804        value.parse()
1805    }
1806}
1807impl ::std::convert::TryFrom<::std::string::String>
1808for EventNotesItemAccidentalDisplayEnclosureSymbol {
1809    type Error = self::error::ConversionError;
1810    fn try_from(
1811        value: ::std::string::String,
1812    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1813        value.parse()
1814    }
1815}
1816///EventNotesItemPerform
1817///
1818/// <details><summary>JSON schema</summary>
1819///
1820/// ```json
1821///{
1822///  "type": "object",
1823///  "additionalProperties": false
1824///}
1825/// ```
1826/// </details>
1827#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1828#[serde(deny_unknown_fields)]
1829pub struct EventNotesItemPerform {}
1830impl ::std::convert::From<&EventNotesItemPerform> for EventNotesItemPerform {
1831    fn from(value: &EventNotesItemPerform) -> Self {
1832        value.clone()
1833    }
1834}
1835impl ::std::default::Default for EventNotesItemPerform {
1836    fn default() -> Self {
1837        Self {}
1838    }
1839}
1840impl EventNotesItemPerform {
1841    pub fn builder() -> builder::EventNotesItemPerform {
1842        Default::default()
1843    }
1844}
1845///EventNotesItemPitch
1846///
1847/// <details><summary>JSON schema</summary>
1848///
1849/// ```json
1850///{
1851///  "type": "object",
1852///  "required": [
1853///    "octave",
1854///    "step"
1855///  ],
1856///  "properties": {
1857///    "alter": {
1858///      "type": "integer"
1859///    },
1860///    "octave": {
1861///      "type": "integer"
1862///    },
1863///    "step": {
1864///      "type": "string",
1865///      "enum": [
1866///        "A",
1867///        "B",
1868///        "C",
1869///        "D",
1870///        "E",
1871///        "F",
1872///        "G"
1873///      ]
1874///    }
1875///  },
1876///  "additionalProperties": false
1877///}
1878/// ```
1879/// </details>
1880#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1881#[serde(deny_unknown_fields)]
1882pub struct EventNotesItemPitch {
1883    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1884    pub alter: ::std::option::Option<i64>,
1885    pub octave: i64,
1886    pub step: EventNotesItemPitchStep,
1887}
1888impl ::std::convert::From<&EventNotesItemPitch> for EventNotesItemPitch {
1889    fn from(value: &EventNotesItemPitch) -> Self {
1890        value.clone()
1891    }
1892}
1893impl EventNotesItemPitch {
1894    pub fn builder() -> builder::EventNotesItemPitch {
1895        Default::default()
1896    }
1897}
1898///EventNotesItemPitchStep
1899///
1900/// <details><summary>JSON schema</summary>
1901///
1902/// ```json
1903///{
1904///  "type": "string",
1905///  "enum": [
1906///    "A",
1907///    "B",
1908///    "C",
1909///    "D",
1910///    "E",
1911///    "F",
1912///    "G"
1913///  ]
1914///}
1915/// ```
1916/// </details>
1917#[derive(
1918    ::serde::Deserialize,
1919    ::serde::Serialize,
1920    Clone,
1921    Copy,
1922    Debug,
1923    Eq,
1924    Hash,
1925    Ord,
1926    PartialEq,
1927    PartialOrd
1928)]
1929pub enum EventNotesItemPitchStep {
1930    A,
1931    B,
1932    C,
1933    D,
1934    E,
1935    F,
1936    G,
1937}
1938impl ::std::convert::From<&Self> for EventNotesItemPitchStep {
1939    fn from(value: &EventNotesItemPitchStep) -> Self {
1940        value.clone()
1941    }
1942}
1943impl ::std::fmt::Display for EventNotesItemPitchStep {
1944    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1945        match *self {
1946            Self::A => write!(f, "A"),
1947            Self::B => write!(f, "B"),
1948            Self::C => write!(f, "C"),
1949            Self::D => write!(f, "D"),
1950            Self::E => write!(f, "E"),
1951            Self::F => write!(f, "F"),
1952            Self::G => write!(f, "G"),
1953        }
1954    }
1955}
1956impl ::std::str::FromStr for EventNotesItemPitchStep {
1957    type Err = self::error::ConversionError;
1958    fn from_str(
1959        value: &str,
1960    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1961        match value {
1962            "A" => Ok(Self::A),
1963            "B" => Ok(Self::B),
1964            "C" => Ok(Self::C),
1965            "D" => Ok(Self::D),
1966            "E" => Ok(Self::E),
1967            "F" => Ok(Self::F),
1968            "G" => Ok(Self::G),
1969            _ => Err("invalid value".into()),
1970        }
1971    }
1972}
1973impl ::std::convert::TryFrom<&str> for EventNotesItemPitchStep {
1974    type Error = self::error::ConversionError;
1975    fn try_from(
1976        value: &str,
1977    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1978        value.parse()
1979    }
1980}
1981impl ::std::convert::TryFrom<&::std::string::String> for EventNotesItemPitchStep {
1982    type Error = self::error::ConversionError;
1983    fn try_from(
1984        value: &::std::string::String,
1985    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1986        value.parse()
1987    }
1988}
1989impl ::std::convert::TryFrom<::std::string::String> for EventNotesItemPitchStep {
1990    type Error = self::error::ConversionError;
1991    fn try_from(
1992        value: ::std::string::String,
1993    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1994        value.parse()
1995    }
1996}
1997///EventNotesItemTiesItem
1998///
1999/// <details><summary>JSON schema</summary>
2000///
2001/// ```json
2002///{
2003///  "type": "object",
2004///  "properties": {
2005///    "lv": {
2006///      "type": "boolean"
2007///    },
2008///    "side": {
2009///      "$ref": "#/$defs/slur-side"
2010///    },
2011///    "target": {
2012///      "$ref": "#/$defs/id"
2013///    }
2014///  },
2015///  "additionalProperties": false
2016///}
2017/// ```
2018/// </details>
2019#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2020#[serde(deny_unknown_fields)]
2021pub struct EventNotesItemTiesItem {
2022    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2023    pub lv: ::std::option::Option<bool>,
2024    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2025    pub side: ::std::option::Option<SlurSide>,
2026    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2027    pub target: ::std::option::Option<Id>,
2028}
2029impl ::std::convert::From<&EventNotesItemTiesItem> for EventNotesItemTiesItem {
2030    fn from(value: &EventNotesItemTiesItem) -> Self {
2031        value.clone()
2032    }
2033}
2034impl ::std::default::Default for EventNotesItemTiesItem {
2035    fn default() -> Self {
2036        Self {
2037            lv: Default::default(),
2038            side: Default::default(),
2039            target: Default::default(),
2040        }
2041    }
2042}
2043impl EventNotesItemTiesItem {
2044    pub fn builder() -> builder::EventNotesItemTiesItem {
2045        Default::default()
2046    }
2047}
2048///EventRest
2049///
2050/// <details><summary>JSON schema</summary>
2051///
2052/// ```json
2053///{
2054///  "type": "object",
2055///  "properties": {
2056///    "staffPosition": {
2057///      "$ref": "#/$defs/staff-position"
2058///    }
2059///  },
2060///  "additionalProperties": false
2061///}
2062/// ```
2063/// </details>
2064#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2065#[serde(deny_unknown_fields)]
2066pub struct EventRest {
2067    #[serde(
2068        rename = "staffPosition",
2069        default,
2070        skip_serializing_if = "::std::option::Option::is_none"
2071    )]
2072    pub staff_position: ::std::option::Option<StaffPosition>,
2073}
2074impl ::std::convert::From<&EventRest> for EventRest {
2075    fn from(value: &EventRest) -> Self {
2076        value.clone()
2077    }
2078}
2079impl ::std::default::Default for EventRest {
2080    fn default() -> Self {
2081        Self {
2082            staff_position: Default::default(),
2083        }
2084    }
2085}
2086impl EventRest {
2087    pub fn builder() -> builder::EventRest {
2088        Default::default()
2089    }
2090}
2091///EventSlursItem
2092///
2093/// <details><summary>JSON schema</summary>
2094///
2095/// ```json
2096///{
2097///  "type": "object",
2098///  "required": [
2099///    "target"
2100///  ],
2101///  "properties": {
2102///    "endNote": {
2103///      "$ref": "#/$defs/id"
2104///    },
2105///    "lineType": {
2106///      "type": "string",
2107///      "enum": [
2108///        "dashed",
2109///        "dotted",
2110///        "solid",
2111///        "wavy"
2112///      ]
2113///    },
2114///    "side": {
2115///      "$ref": "#/$defs/slur-side"
2116///    },
2117///    "sideEnd": {
2118///      "$ref": "#/$defs/slur-side"
2119///    },
2120///    "startNote": {
2121///      "$ref": "#/$defs/id"
2122///    },
2123///    "target": {
2124///      "$ref": "#/$defs/id"
2125///    }
2126///  },
2127///  "additionalProperties": false
2128///}
2129/// ```
2130/// </details>
2131#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2132#[serde(deny_unknown_fields)]
2133pub struct EventSlursItem {
2134    #[serde(
2135        rename = "endNote",
2136        default,
2137        skip_serializing_if = "::std::option::Option::is_none"
2138    )]
2139    pub end_note: ::std::option::Option<Id>,
2140    #[serde(
2141        rename = "lineType",
2142        default,
2143        skip_serializing_if = "::std::option::Option::is_none"
2144    )]
2145    pub line_type: ::std::option::Option<EventSlursItemLineType>,
2146    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2147    pub side: ::std::option::Option<SlurSide>,
2148    #[serde(
2149        rename = "sideEnd",
2150        default,
2151        skip_serializing_if = "::std::option::Option::is_none"
2152    )]
2153    pub side_end: ::std::option::Option<SlurSide>,
2154    #[serde(
2155        rename = "startNote",
2156        default,
2157        skip_serializing_if = "::std::option::Option::is_none"
2158    )]
2159    pub start_note: ::std::option::Option<Id>,
2160    pub target: Id,
2161}
2162impl ::std::convert::From<&EventSlursItem> for EventSlursItem {
2163    fn from(value: &EventSlursItem) -> Self {
2164        value.clone()
2165    }
2166}
2167impl EventSlursItem {
2168    pub fn builder() -> builder::EventSlursItem {
2169        Default::default()
2170    }
2171}
2172///EventSlursItemLineType
2173///
2174/// <details><summary>JSON schema</summary>
2175///
2176/// ```json
2177///{
2178///  "type": "string",
2179///  "enum": [
2180///    "dashed",
2181///    "dotted",
2182///    "solid",
2183///    "wavy"
2184///  ]
2185///}
2186/// ```
2187/// </details>
2188#[derive(
2189    ::serde::Deserialize,
2190    ::serde::Serialize,
2191    Clone,
2192    Copy,
2193    Debug,
2194    Eq,
2195    Hash,
2196    Ord,
2197    PartialEq,
2198    PartialOrd
2199)]
2200pub enum EventSlursItemLineType {
2201    #[serde(rename = "dashed")]
2202    Dashed,
2203    #[serde(rename = "dotted")]
2204    Dotted,
2205    #[serde(rename = "solid")]
2206    Solid,
2207    #[serde(rename = "wavy")]
2208    Wavy,
2209}
2210impl ::std::convert::From<&Self> for EventSlursItemLineType {
2211    fn from(value: &EventSlursItemLineType) -> Self {
2212        value.clone()
2213    }
2214}
2215impl ::std::fmt::Display for EventSlursItemLineType {
2216    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2217        match *self {
2218            Self::Dashed => write!(f, "dashed"),
2219            Self::Dotted => write!(f, "dotted"),
2220            Self::Solid => write!(f, "solid"),
2221            Self::Wavy => write!(f, "wavy"),
2222        }
2223    }
2224}
2225impl ::std::str::FromStr for EventSlursItemLineType {
2226    type Err = self::error::ConversionError;
2227    fn from_str(
2228        value: &str,
2229    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2230        match value {
2231            "dashed" => Ok(Self::Dashed),
2232            "dotted" => Ok(Self::Dotted),
2233            "solid" => Ok(Self::Solid),
2234            "wavy" => Ok(Self::Wavy),
2235            _ => Err("invalid value".into()),
2236        }
2237    }
2238}
2239impl ::std::convert::TryFrom<&str> for EventSlursItemLineType {
2240    type Error = self::error::ConversionError;
2241    fn try_from(
2242        value: &str,
2243    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2244        value.parse()
2245    }
2246}
2247impl ::std::convert::TryFrom<&::std::string::String> for EventSlursItemLineType {
2248    type Error = self::error::ConversionError;
2249    fn try_from(
2250        value: &::std::string::String,
2251    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2252        value.parse()
2253    }
2254}
2255impl ::std::convert::TryFrom<::std::string::String> for EventSlursItemLineType {
2256    type Error = self::error::ConversionError;
2257    fn try_from(
2258        value: ::std::string::String,
2259    ) -> ::std::result::Result<Self, self::error::ConversionError> {
2260        value.parse()
2261    }
2262}
2263///Fraction
2264///
2265/// <details><summary>JSON schema</summary>
2266///
2267/// ```json
2268///{
2269///  "type": "array",
2270///  "items": {
2271///    "$ref": "#/$defs/integer-unsigned"
2272///  }
2273///}
2274/// ```
2275/// </details>
2276#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2277#[serde(transparent)]
2278pub struct Fraction(pub ::std::vec::Vec<IntegerUnsigned>);
2279impl ::std::ops::Deref for Fraction {
2280    type Target = ::std::vec::Vec<IntegerUnsigned>;
2281    fn deref(&self) -> &::std::vec::Vec<IntegerUnsigned> {
2282        &self.0
2283    }
2284}
2285impl ::std::convert::From<Fraction> for ::std::vec::Vec<IntegerUnsigned> {
2286    fn from(value: Fraction) -> Self {
2287        value.0
2288    }
2289}
2290impl ::std::convert::From<&Fraction> for Fraction {
2291    fn from(value: &Fraction) -> Self {
2292        value.clone()
2293    }
2294}
2295impl ::std::convert::From<::std::vec::Vec<IntegerUnsigned>> for Fraction {
2296    fn from(value: ::std::vec::Vec<IntegerUnsigned>) -> Self {
2297        Self(value)
2298    }
2299}
2300///Id
2301///
2302/// <details><summary>JSON schema</summary>
2303///
2304/// ```json
2305///{
2306///  "type": "string"
2307///}
2308/// ```
2309/// </details>
2310#[derive(
2311    ::serde::Deserialize,
2312    ::serde::Serialize,
2313    Clone,
2314    Debug,
2315    Eq,
2316    Hash,
2317    Ord,
2318    PartialEq,
2319    PartialOrd
2320)]
2321#[serde(transparent)]
2322pub struct Id(pub ::std::string::String);
2323impl ::std::ops::Deref for Id {
2324    type Target = ::std::string::String;
2325    fn deref(&self) -> &::std::string::String {
2326        &self.0
2327    }
2328}
2329impl ::std::convert::From<Id> for ::std::string::String {
2330    fn from(value: Id) -> Self {
2331        value.0
2332    }
2333}
2334impl ::std::convert::From<&Id> for Id {
2335    fn from(value: &Id) -> Self {
2336        value.clone()
2337    }
2338}
2339impl ::std::convert::From<::std::string::String> for Id {
2340    fn from(value: ::std::string::String) -> Self {
2341        Self(value)
2342    }
2343}
2344impl ::std::str::FromStr for Id {
2345    type Err = ::std::convert::Infallible;
2346    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
2347        Ok(Self(value.to_string()))
2348    }
2349}
2350impl ::std::fmt::Display for Id {
2351    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2352        self.0.fmt(f)
2353    }
2354}
2355///IntegerUnsigned
2356///
2357/// <details><summary>JSON schema</summary>
2358///
2359/// ```json
2360///{
2361///  "type": "integer"
2362///}
2363/// ```
2364/// </details>
2365#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2366#[serde(transparent)]
2367pub struct IntegerUnsigned(pub i64);
2368impl ::std::ops::Deref for IntegerUnsigned {
2369    type Target = i64;
2370    fn deref(&self) -> &i64 {
2371        &self.0
2372    }
2373}
2374impl ::std::convert::From<IntegerUnsigned> for i64 {
2375    fn from(value: IntegerUnsigned) -> Self {
2376        value.0
2377    }
2378}
2379impl ::std::convert::From<&IntegerUnsigned> for IntegerUnsigned {
2380    fn from(value: &IntegerUnsigned) -> Self {
2381        value.clone()
2382    }
2383}
2384impl ::std::convert::From<i64> for IntegerUnsigned {
2385    fn from(value: i64) -> Self {
2386        Self(value)
2387    }
2388}
2389impl ::std::str::FromStr for IntegerUnsigned {
2390    type Err = <i64 as ::std::str::FromStr>::Err;
2391    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
2392        Ok(Self(value.parse()?))
2393    }
2394}
2395impl ::std::convert::TryFrom<&str> for IntegerUnsigned {
2396    type Error = <i64 as ::std::str::FromStr>::Err;
2397    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
2398        value.parse()
2399    }
2400}
2401impl ::std::convert::TryFrom<&String> for IntegerUnsigned {
2402    type Error = <i64 as ::std::str::FromStr>::Err;
2403    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
2404        value.parse()
2405    }
2406}
2407impl ::std::convert::TryFrom<String> for IntegerUnsigned {
2408    type Error = <i64 as ::std::str::FromStr>::Err;
2409    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
2410        value.parse()
2411    }
2412}
2413impl ::std::fmt::Display for IntegerUnsigned {
2414    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2415        self.0.fmt(f)
2416    }
2417}
2418///MeasureNumber
2419///
2420/// <details><summary>JSON schema</summary>
2421///
2422/// ```json
2423///{
2424///  "type": "integer"
2425///}
2426/// ```
2427/// </details>
2428#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2429#[serde(transparent)]
2430pub struct MeasureNumber(pub i64);
2431impl ::std::ops::Deref for MeasureNumber {
2432    type Target = i64;
2433    fn deref(&self) -> &i64 {
2434        &self.0
2435    }
2436}
2437impl ::std::convert::From<MeasureNumber> for i64 {
2438    fn from(value: MeasureNumber) -> Self {
2439        value.0
2440    }
2441}
2442impl ::std::convert::From<&MeasureNumber> for MeasureNumber {
2443    fn from(value: &MeasureNumber) -> Self {
2444        value.clone()
2445    }
2446}
2447impl ::std::convert::From<i64> for MeasureNumber {
2448    fn from(value: i64) -> Self {
2449        Self(value)
2450    }
2451}
2452impl ::std::str::FromStr for MeasureNumber {
2453    type Err = <i64 as ::std::str::FromStr>::Err;
2454    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
2455        Ok(Self(value.parse()?))
2456    }
2457}
2458impl ::std::convert::TryFrom<&str> for MeasureNumber {
2459    type Error = <i64 as ::std::str::FromStr>::Err;
2460    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
2461        value.parse()
2462    }
2463}
2464impl ::std::convert::TryFrom<&String> for MeasureNumber {
2465    type Error = <i64 as ::std::str::FromStr>::Err;
2466    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
2467        value.parse()
2468    }
2469}
2470impl ::std::convert::TryFrom<String> for MeasureNumber {
2471    type Error = <i64 as ::std::str::FromStr>::Err;
2472    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
2473        value.parse()
2474    }
2475}
2476impl ::std::fmt::Display for MeasureNumber {
2477    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2478        self.0.fmt(f)
2479    }
2480}
2481///MeasureRhythmicPosition
2482///
2483/// <details><summary>JSON schema</summary>
2484///
2485/// ```json
2486///{
2487///  "type": "object",
2488///  "required": [
2489///    "measure",
2490///    "position"
2491///  ],
2492///  "properties": {
2493///    "measure": {
2494///      "$ref": "#/$defs/measure-number"
2495///    },
2496///    "position": {
2497///      "$ref": "#/$defs/rhythmic-position"
2498///    }
2499///  },
2500///  "additionalProperties": false
2501///}
2502/// ```
2503/// </details>
2504#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2505#[serde(deny_unknown_fields)]
2506pub struct MeasureRhythmicPosition {
2507    pub measure: MeasureNumber,
2508    pub position: RhythmicPosition,
2509}
2510impl ::std::convert::From<&MeasureRhythmicPosition> for MeasureRhythmicPosition {
2511    fn from(value: &MeasureRhythmicPosition) -> Self {
2512        value.clone()
2513    }
2514}
2515impl MeasureRhythmicPosition {
2516    pub fn builder() -> builder::MeasureRhythmicPosition {
2517        Default::default()
2518    }
2519}
2520///An encoding of Common Western Music Notation.
2521///
2522/// <details><summary>JSON schema</summary>
2523///
2524/// ```json
2525///{
2526///  "$id": "https://w3c.github.io/mnx/docs/mnx-schema.json",
2527///  "title": "MNX document",
2528///  "description": "An encoding of Common Western Music Notation.",
2529///  "type": "object",
2530///  "required": [
2531///    "global",
2532///    "mnx",
2533///    "parts"
2534///  ],
2535///  "properties": {
2536///    "global": {
2537///      "type": "object",
2538///      "required": [
2539///        "measures"
2540///      ],
2541///      "properties": {
2542///        "lyrics": {
2543///          "type": "object",
2544///          "properties": {
2545///            "lineMetadata": {
2546///              "type": "object",
2547///              "patternProperties": {
2548///                "^.*$": {
2549///                  "type": "object",
2550///                  "properties": {
2551///                    "label": {
2552///                      "type": "string"
2553///                    },
2554///                    "lang": {
2555///                      "type": "string"
2556///                    }
2557///                  },
2558///                  "additionalProperties": false
2559///                }
2560///              },
2561///              "additionalProperties": false
2562///            },
2563///            "lineOrder": {
2564///              "type": "array",
2565///              "items": {
2566///                "type": "string"
2567///              }
2568///            }
2569///          },
2570///          "additionalProperties": false
2571///        },
2572///        "measures": {
2573///          "type": "array",
2574///          "items": {
2575///            "type": "object",
2576///            "properties": {
2577///              "barline": {
2578///                "type": "object",
2579///                "required": [
2580///                  "type"
2581///                ],
2582///                "properties": {
2583///                  "type": {
2584///                    "type": "string",
2585///                    "enum": [
2586///                      "regular",
2587///                      "dotted",
2588///                      "dashed",
2589///                      "heavy",
2590///                      "double",
2591///                      "final",
2592///                      "heavyLight",
2593///                      "heavyHeavy",
2594///                      "tick",
2595///                      "short",
2596///                      "noBarline"
2597///                    ]
2598///                  }
2599///                },
2600///                "additionalProperties": false
2601///              },
2602///              "ending": {
2603///                "type": "object",
2604///                "required": [
2605///                  "duration"
2606///                ],
2607///                "properties": {
2608///                  "class": {
2609///                    "$ref": "#/$defs/style-class"
2610///                  },
2611///                  "color": {
2612///                    "$ref": "#/$defs/color"
2613///                  },
2614///                  "duration": {
2615///                    "type": "integer"
2616///                  },
2617///                  "numbers": {
2618///                    "type": "array",
2619///                    "items": {
2620///                      "type": "integer"
2621///                    }
2622///                  },
2623///                  "open": {
2624///                    "type": "boolean"
2625///                  }
2626///                },
2627///                "additionalProperties": false
2628///              },
2629///              "fine": {
2630///                "type": "object",
2631///                "required": [
2632///                  "location"
2633///                ],
2634///                "properties": {
2635///                  "class": {
2636///                    "$ref": "#/$defs/style-class"
2637///                  },
2638///                  "color": {
2639///                    "$ref": "#/$defs/color"
2640///                  },
2641///                  "location": {
2642///                    "$ref": "#/$defs/rhythmic-position"
2643///                  }
2644///                },
2645///                "additionalProperties": false
2646///              },
2647///              "index": {
2648///                "$ref": "#/$defs/measure-number"
2649///              },
2650///              "jump": {
2651///                "type": "object",
2652///                "required": [
2653///                  "location",
2654///                  "type"
2655///                ],
2656///                "properties": {
2657///                  "location": {
2658///                    "$ref": "#/$defs/rhythmic-position"
2659///                  },
2660///                  "type": {
2661///                    "type": "string",
2662///                    "enum": [
2663///                      "dsalfine",
2664///                      "segno"
2665///                    ]
2666///                  }
2667///                },
2668///                "additionalProperties": false
2669///              },
2670///              "key": {
2671///                "type": "object",
2672///                "required": [
2673///                  "fifths"
2674///                ],
2675///                "properties": {
2676///                  "class": {
2677///                    "$ref": "#/$defs/style-class"
2678///                  },
2679///                  "color": {
2680///                    "$ref": "#/$defs/color"
2681///                  },
2682///                  "fifths": {
2683///                    "type": "integer"
2684///                  }
2685///                },
2686///                "additionalProperties": false
2687///              },
2688///              "number": {
2689///                "$ref": "#/$defs/measure-number"
2690///              },
2691///              "repeatEnd": {
2692///                "type": "object",
2693///                "properties": {
2694///                  "times": {
2695///                    "type": "integer"
2696///                  }
2697///                },
2698///                "additionalProperties": false
2699///              },
2700///              "repeatStart": {
2701///                "type": "object",
2702///                "additionalProperties": false
2703///              },
2704///              "segno": {
2705///                "type": "object",
2706///                "required": [
2707///                  "location"
2708///                ],
2709///                "properties": {
2710///                  "class": {
2711///                    "$ref": "#/$defs/style-class"
2712///                  },
2713///                  "color": {
2714///                    "$ref": "#/$defs/color"
2715///                  },
2716///                  "glyph": {
2717///                    "$ref": "#/$defs/smufl-glyph"
2718///                  },
2719///                  "location": {
2720///                    "$ref": "#/$defs/rhythmic-position"
2721///                  }
2722///                },
2723///                "additionalProperties": false
2724///              },
2725///              "tempos": {
2726///                "type": "array",
2727///                "items": {
2728///                  "type": "object",
2729///                  "required": [
2730///                    "bpm",
2731///                    "value"
2732///                  ],
2733///                  "properties": {
2734///                    "bpm": {
2735///                      "type": "integer"
2736///                    },
2737///                    "location": {
2738///                      "$ref": "#/$defs/rhythmic-position"
2739///                    },
2740///                    "value": {
2741///                      "$ref": "#/$defs/note-value"
2742///                    }
2743///                  },
2744///                  "additionalProperties": false
2745///                }
2746///              },
2747///              "time": {
2748///                "type": "object",
2749///                "required": [
2750///                  "count",
2751///                  "unit"
2752///                ],
2753///                "properties": {
2754///                  "count": {
2755///                    "$ref": "#/$defs/positive-integer"
2756///                  },
2757///                  "unit": {
2758///                    "type": "integer",
2759///                    "enum": [
2760///                      1,
2761///                      2,
2762///                      4,
2763///                      8,
2764///                      16,
2765///                      32,
2766///                      64,
2767///                      128
2768///                    ]
2769///                  }
2770///                },
2771///                "additionalProperties": false
2772///              }
2773///            },
2774///            "additionalProperties": false
2775///          }
2776///        },
2777///        "styles": {
2778///          "type": "array",
2779///          "items": {
2780///            "type": "object",
2781///            "required": [
2782///              "selector"
2783///            ],
2784///            "properties": {
2785///              "color": {
2786///                "$ref": "#/$defs/color"
2787///              },
2788///              "selector": {
2789///                "type": "string"
2790///              }
2791///            },
2792///            "additionalProperties": false
2793///          }
2794///        }
2795///      },
2796///      "additionalProperties": false
2797///    },
2798///    "layouts": {
2799///      "type": "array",
2800///      "items": {
2801///        "type": "object",
2802///        "required": [
2803///          "content",
2804///          "id"
2805///        ],
2806///        "properties": {
2807///          "content": {
2808///            "$ref": "#/$defs/system-layout-content"
2809///          },
2810///          "id": {
2811///            "$ref": "#/$defs/id"
2812///          }
2813///        },
2814///        "additionalProperties": false
2815///      }
2816///    },
2817///    "mnx": {
2818///      "type": "object",
2819///      "required": [
2820///        "version"
2821///      ],
2822///      "properties": {
2823///        "support": {
2824///          "type": "object",
2825///          "properties": {
2826///            "useAccidentalDisplay": {
2827///              "type": "boolean"
2828///            }
2829///          },
2830///          "additionalProperties": false
2831///        },
2832///        "version": {
2833///          "type": "integer"
2834///        }
2835///      },
2836///      "additionalProperties": false
2837///    },
2838///    "parts": {
2839///      "type": "array",
2840///      "items": {
2841///        "type": "object",
2842///        "properties": {
2843///          "id": {
2844///            "$ref": "#/$defs/id"
2845///          },
2846///          "measures": {
2847///            "type": "array",
2848///            "items": {
2849///              "type": "object",
2850///              "required": [
2851///                "sequences"
2852///              ],
2853///              "properties": {
2854///                "beams": {
2855///                  "$ref": "#/$defs/beam-list"
2856///                },
2857///                "clefs": {
2858///                  "type": "array",
2859///                  "items": {
2860///                    "type": "object",
2861///                    "required": [
2862///                      "clef"
2863///                    ],
2864///                    "properties": {
2865///                      "clef": {
2866///                        "type": "object",
2867///                        "required": [
2868///                          "sign",
2869///                          "staffPosition"
2870///                        ],
2871///                        "properties": {
2872///                          "class": {
2873///                            "$ref": "#/$defs/style-class"
2874///                          },
2875///                          "color": {
2876///                            "type": "string"
2877///                          },
2878///                          "glyph": {
2879///                            "$ref": "#/$defs/smufl-glyph"
2880///                          },
2881///                          "octave": {
2882///                            "type": "integer"
2883///                          },
2884///                          "sign": {
2885///                            "type": "string",
2886///                            "enum": [
2887///                              "C",
2888///                              "F",
2889///                              "G"
2890///                            ]
2891///                          },
2892///                          "staffPosition": {
2893///                            "$ref": "#/$defs/staff-position"
2894///                          }
2895///                        },
2896///                        "additionalProperties": false
2897///                      },
2898///                      "position": {
2899///                        "$ref": "#/$defs/rhythmic-position"
2900///                      },
2901///                      "staff": {
2902///                        "$ref": "#/$defs/staff-number"
2903///                      }
2904///                    },
2905///                    "additionalProperties": false
2906///                  }
2907///                },
2908///                "dynamics": {
2909///                  "type": "array",
2910///                  "items": {
2911///                    "type": "object",
2912///                    "required": [
2913///                      "position",
2914///                      "value"
2915///                    ],
2916///                    "properties": {
2917///                      "glyph": {
2918///                        "$ref": "#/$defs/smufl-glyph"
2919///                      },
2920///                      "position": {
2921///                        "$ref": "#/$defs/rhythmic-position"
2922///                      },
2923///                      "staff": {
2924///                        "$ref": "#/$defs/staff-number"
2925///                      },
2926///                      "value": {
2927///                        "type": "string"
2928///                      },
2929///                      "voice": {
2930///                        "$ref": "#/$defs/voice-name"
2931///                      }
2932///                    },
2933///                    "additionalProperties": false
2934///                  }
2935///                },
2936///                "ottavas": {
2937///                  "type": "array",
2938///                  "items": {
2939///                    "type": "object",
2940///                    "required": [
2941///                      "end",
2942///                      "position",
2943///                      "value"
2944///                    ],
2945///                    "properties": {
2946///                      "end": {
2947///                        "$ref": "#/$defs/measure-rhythmic-position"
2948///                      },
2949///                      "orient": {
2950///                        "$ref": "#/$defs/orientation"
2951///                      },
2952///                      "position": {
2953///                        "$ref": "#/$defs/rhythmic-position"
2954///                      },
2955///                      "staff": {
2956///                        "$ref": "#/$defs/staff-number"
2957///                      },
2958///                      "value": {
2959///                        "type": "integer",
2960///                        "enum": [
2961///                          1,
2962///                          2,
2963///                          -1,
2964///                          -2,
2965///                          3,
2966///                          -3
2967///                        ]
2968///                      },
2969///                      "voice": {
2970///                        "$ref": "#/$defs/voice-name"
2971///                      }
2972///                    },
2973///                    "additionalProperties": false
2974///                  }
2975///                },
2976///                "sequences": {
2977///                  "type": "array",
2978///                  "items": {
2979///                    "type": "object",
2980///                    "required": [
2981///                      "content"
2982///                    ],
2983///                    "properties": {
2984///                      "content": {
2985///                        "$ref": "#/$defs/sequence-content"
2986///                      },
2987///                      "orient": {
2988///                        "$ref": "#/$defs/orientation"
2989///                      },
2990///                      "staff": {
2991///                        "$ref": "#/$defs/staff-number"
2992///                      },
2993///                      "voice": {
2994///                        "$ref": "#/$defs/voice-name"
2995///                      }
2996///                    },
2997///                    "additionalProperties": false
2998///                  }
2999///                }
3000///              },
3001///              "additionalProperties": false
3002///            }
3003///          },
3004///          "name": {
3005///            "type": "string"
3006///          },
3007///          "shortName": {
3008///            "type": "string"
3009///          },
3010///          "smuflFont": {
3011///            "$ref": "#/$defs/smufl-font"
3012///          },
3013///          "staves": {
3014///            "type": "integer"
3015///          }
3016///        },
3017///        "additionalProperties": false
3018///      }
3019///    },
3020///    "scores": {
3021///      "type": "array",
3022///      "items": {
3023///        "type": "object",
3024///        "required": [
3025///          "name"
3026///        ],
3027///        "properties": {
3028///          "layout": {
3029///            "$ref": "#/$defs/id"
3030///          },
3031///          "multimeasureRests": {
3032///            "type": "array",
3033///            "items": {
3034///              "type": "object",
3035///              "required": [
3036///                "duration",
3037///                "start"
3038///              ],
3039///              "properties": {
3040///                "duration": {
3041///                  "type": "integer"
3042///                },
3043///                "label": {
3044///                  "$ref": "#/$defs/string"
3045///                },
3046///                "start": {
3047///                  "$ref": "#/$defs/measure-number"
3048///                }
3049///              },
3050///              "additionalProperties": false
3051///            }
3052///          },
3053///          "name": {
3054///            "type": "string"
3055///          },
3056///          "pages": {
3057///            "type": "array",
3058///            "items": {
3059///              "type": "object",
3060///              "required": [
3061///                "systems"
3062///              ],
3063///              "properties": {
3064///                "layout": {
3065///                  "$ref": "#/$defs/id"
3066///                },
3067///                "systems": {
3068///                  "type": "array",
3069///                  "items": {
3070///                    "type": "object",
3071///                    "required": [
3072///                      "measure"
3073///                    ],
3074///                    "properties": {
3075///                      "layout": {
3076///                        "$ref": "#/$defs/id"
3077///                      },
3078///                      "layoutChanges": {
3079///                        "type": "array",
3080///                        "items": {
3081///                          "type": "object",
3082///                          "required": [
3083///                            "layout",
3084///                            "location"
3085///                          ],
3086///                          "properties": {
3087///                            "layout": {
3088///                              "$ref": "#/$defs/id"
3089///                            },
3090///                            "location": {
3091///                              "$ref": "#/$defs/measure-rhythmic-position"
3092///                            }
3093///                          },
3094///                          "additionalProperties": false
3095///                        }
3096///                      },
3097///                      "measure": {
3098///                        "$ref": "#/$defs/measure-number"
3099///                      }
3100///                    },
3101///                    "additionalProperties": false
3102///                  }
3103///                }
3104///              },
3105///              "additionalProperties": false
3106///            }
3107///          }
3108///        },
3109///        "additionalProperties": false
3110///      }
3111///    }
3112///  },
3113///  "additionalProperties": false
3114///}
3115/// ```
3116/// </details>
3117#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3118#[serde(deny_unknown_fields)]
3119pub struct MnxDocument {
3120    pub global: MnxDocumentGlobal,
3121    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3122    pub layouts: ::std::vec::Vec<MnxDocumentLayoutsItem>,
3123    pub mnx: MnxDocumentMnx,
3124    pub parts: ::std::vec::Vec<MnxDocumentPartsItem>,
3125    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3126    pub scores: ::std::vec::Vec<MnxDocumentScoresItem>,
3127}
3128impl ::std::convert::From<&MnxDocument> for MnxDocument {
3129    fn from(value: &MnxDocument) -> Self {
3130        value.clone()
3131    }
3132}
3133impl MnxDocument {
3134    pub fn builder() -> builder::MnxDocument {
3135        Default::default()
3136    }
3137}
3138///MnxDocumentGlobal
3139///
3140/// <details><summary>JSON schema</summary>
3141///
3142/// ```json
3143///{
3144///  "type": "object",
3145///  "required": [
3146///    "measures"
3147///  ],
3148///  "properties": {
3149///    "lyrics": {
3150///      "type": "object",
3151///      "properties": {
3152///        "lineMetadata": {
3153///          "type": "object",
3154///          "patternProperties": {
3155///            "^.*$": {
3156///              "type": "object",
3157///              "properties": {
3158///                "label": {
3159///                  "type": "string"
3160///                },
3161///                "lang": {
3162///                  "type": "string"
3163///                }
3164///              },
3165///              "additionalProperties": false
3166///            }
3167///          },
3168///          "additionalProperties": false
3169///        },
3170///        "lineOrder": {
3171///          "type": "array",
3172///          "items": {
3173///            "type": "string"
3174///          }
3175///        }
3176///      },
3177///      "additionalProperties": false
3178///    },
3179///    "measures": {
3180///      "type": "array",
3181///      "items": {
3182///        "type": "object",
3183///        "properties": {
3184///          "barline": {
3185///            "type": "object",
3186///            "required": [
3187///              "type"
3188///            ],
3189///            "properties": {
3190///              "type": {
3191///                "type": "string",
3192///                "enum": [
3193///                  "regular",
3194///                  "dotted",
3195///                  "dashed",
3196///                  "heavy",
3197///                  "double",
3198///                  "final",
3199///                  "heavyLight",
3200///                  "heavyHeavy",
3201///                  "tick",
3202///                  "short",
3203///                  "noBarline"
3204///                ]
3205///              }
3206///            },
3207///            "additionalProperties": false
3208///          },
3209///          "ending": {
3210///            "type": "object",
3211///            "required": [
3212///              "duration"
3213///            ],
3214///            "properties": {
3215///              "class": {
3216///                "$ref": "#/$defs/style-class"
3217///              },
3218///              "color": {
3219///                "$ref": "#/$defs/color"
3220///              },
3221///              "duration": {
3222///                "type": "integer"
3223///              },
3224///              "numbers": {
3225///                "type": "array",
3226///                "items": {
3227///                  "type": "integer"
3228///                }
3229///              },
3230///              "open": {
3231///                "type": "boolean"
3232///              }
3233///            },
3234///            "additionalProperties": false
3235///          },
3236///          "fine": {
3237///            "type": "object",
3238///            "required": [
3239///              "location"
3240///            ],
3241///            "properties": {
3242///              "class": {
3243///                "$ref": "#/$defs/style-class"
3244///              },
3245///              "color": {
3246///                "$ref": "#/$defs/color"
3247///              },
3248///              "location": {
3249///                "$ref": "#/$defs/rhythmic-position"
3250///              }
3251///            },
3252///            "additionalProperties": false
3253///          },
3254///          "index": {
3255///            "$ref": "#/$defs/measure-number"
3256///          },
3257///          "jump": {
3258///            "type": "object",
3259///            "required": [
3260///              "location",
3261///              "type"
3262///            ],
3263///            "properties": {
3264///              "location": {
3265///                "$ref": "#/$defs/rhythmic-position"
3266///              },
3267///              "type": {
3268///                "type": "string",
3269///                "enum": [
3270///                  "dsalfine",
3271///                  "segno"
3272///                ]
3273///              }
3274///            },
3275///            "additionalProperties": false
3276///          },
3277///          "key": {
3278///            "type": "object",
3279///            "required": [
3280///              "fifths"
3281///            ],
3282///            "properties": {
3283///              "class": {
3284///                "$ref": "#/$defs/style-class"
3285///              },
3286///              "color": {
3287///                "$ref": "#/$defs/color"
3288///              },
3289///              "fifths": {
3290///                "type": "integer"
3291///              }
3292///            },
3293///            "additionalProperties": false
3294///          },
3295///          "number": {
3296///            "$ref": "#/$defs/measure-number"
3297///          },
3298///          "repeatEnd": {
3299///            "type": "object",
3300///            "properties": {
3301///              "times": {
3302///                "type": "integer"
3303///              }
3304///            },
3305///            "additionalProperties": false
3306///          },
3307///          "repeatStart": {
3308///            "type": "object",
3309///            "additionalProperties": false
3310///          },
3311///          "segno": {
3312///            "type": "object",
3313///            "required": [
3314///              "location"
3315///            ],
3316///            "properties": {
3317///              "class": {
3318///                "$ref": "#/$defs/style-class"
3319///              },
3320///              "color": {
3321///                "$ref": "#/$defs/color"
3322///              },
3323///              "glyph": {
3324///                "$ref": "#/$defs/smufl-glyph"
3325///              },
3326///              "location": {
3327///                "$ref": "#/$defs/rhythmic-position"
3328///              }
3329///            },
3330///            "additionalProperties": false
3331///          },
3332///          "tempos": {
3333///            "type": "array",
3334///            "items": {
3335///              "type": "object",
3336///              "required": [
3337///                "bpm",
3338///                "value"
3339///              ],
3340///              "properties": {
3341///                "bpm": {
3342///                  "type": "integer"
3343///                },
3344///                "location": {
3345///                  "$ref": "#/$defs/rhythmic-position"
3346///                },
3347///                "value": {
3348///                  "$ref": "#/$defs/note-value"
3349///                }
3350///              },
3351///              "additionalProperties": false
3352///            }
3353///          },
3354///          "time": {
3355///            "type": "object",
3356///            "required": [
3357///              "count",
3358///              "unit"
3359///            ],
3360///            "properties": {
3361///              "count": {
3362///                "$ref": "#/$defs/positive-integer"
3363///              },
3364///              "unit": {
3365///                "type": "integer",
3366///                "enum": [
3367///                  1,
3368///                  2,
3369///                  4,
3370///                  8,
3371///                  16,
3372///                  32,
3373///                  64,
3374///                  128
3375///                ]
3376///              }
3377///            },
3378///            "additionalProperties": false
3379///          }
3380///        },
3381///        "additionalProperties": false
3382///      }
3383///    },
3384///    "styles": {
3385///      "type": "array",
3386///      "items": {
3387///        "type": "object",
3388///        "required": [
3389///          "selector"
3390///        ],
3391///        "properties": {
3392///          "color": {
3393///            "$ref": "#/$defs/color"
3394///          },
3395///          "selector": {
3396///            "type": "string"
3397///          }
3398///        },
3399///        "additionalProperties": false
3400///      }
3401///    }
3402///  },
3403///  "additionalProperties": false
3404///}
3405/// ```
3406/// </details>
3407#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3408#[serde(deny_unknown_fields)]
3409pub struct MnxDocumentGlobal {
3410    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3411    pub lyrics: ::std::option::Option<MnxDocumentGlobalLyrics>,
3412    pub measures: ::std::vec::Vec<MnxDocumentGlobalMeasuresItem>,
3413    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3414    pub styles: ::std::vec::Vec<MnxDocumentGlobalStylesItem>,
3415}
3416impl ::std::convert::From<&MnxDocumentGlobal> for MnxDocumentGlobal {
3417    fn from(value: &MnxDocumentGlobal) -> Self {
3418        value.clone()
3419    }
3420}
3421impl MnxDocumentGlobal {
3422    pub fn builder() -> builder::MnxDocumentGlobal {
3423        Default::default()
3424    }
3425}
3426///MnxDocumentGlobalLyrics
3427///
3428/// <details><summary>JSON schema</summary>
3429///
3430/// ```json
3431///{
3432///  "type": "object",
3433///  "properties": {
3434///    "lineMetadata": {
3435///      "type": "object",
3436///      "patternProperties": {
3437///        "^.*$": {
3438///          "type": "object",
3439///          "properties": {
3440///            "label": {
3441///              "type": "string"
3442///            },
3443///            "lang": {
3444///              "type": "string"
3445///            }
3446///          },
3447///          "additionalProperties": false
3448///        }
3449///      },
3450///      "additionalProperties": false
3451///    },
3452///    "lineOrder": {
3453///      "type": "array",
3454///      "items": {
3455///        "type": "string"
3456///      }
3457///    }
3458///  },
3459///  "additionalProperties": false
3460///}
3461/// ```
3462/// </details>
3463#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3464#[serde(deny_unknown_fields)]
3465pub struct MnxDocumentGlobalLyrics {
3466    #[serde(
3467        rename = "lineMetadata",
3468        default,
3469        skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
3470    )]
3471    pub line_metadata: ::std::collections::HashMap<
3472        MnxDocumentGlobalLyricsLineMetadataKey,
3473        MnxDocumentGlobalLyricsLineMetadataValue,
3474    >,
3475    #[serde(
3476        rename = "lineOrder",
3477        default,
3478        skip_serializing_if = "::std::vec::Vec::is_empty"
3479    )]
3480    pub line_order: ::std::vec::Vec<::std::string::String>,
3481}
3482impl ::std::convert::From<&MnxDocumentGlobalLyrics> for MnxDocumentGlobalLyrics {
3483    fn from(value: &MnxDocumentGlobalLyrics) -> Self {
3484        value.clone()
3485    }
3486}
3487impl ::std::default::Default for MnxDocumentGlobalLyrics {
3488    fn default() -> Self {
3489        Self {
3490            line_metadata: Default::default(),
3491            line_order: Default::default(),
3492        }
3493    }
3494}
3495impl MnxDocumentGlobalLyrics {
3496    pub fn builder() -> builder::MnxDocumentGlobalLyrics {
3497        Default::default()
3498    }
3499}
3500///MnxDocumentGlobalLyricsLineMetadataKey
3501///
3502/// <details><summary>JSON schema</summary>
3503///
3504/// ```json
3505///{
3506///  "type": "string",
3507///  "pattern": "^.*$"
3508///}
3509/// ```
3510/// </details>
3511#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3512#[serde(transparent)]
3513pub struct MnxDocumentGlobalLyricsLineMetadataKey(::std::string::String);
3514impl ::std::ops::Deref for MnxDocumentGlobalLyricsLineMetadataKey {
3515    type Target = ::std::string::String;
3516    fn deref(&self) -> &::std::string::String {
3517        &self.0
3518    }
3519}
3520impl ::std::convert::From<MnxDocumentGlobalLyricsLineMetadataKey>
3521for ::std::string::String {
3522    fn from(value: MnxDocumentGlobalLyricsLineMetadataKey) -> Self {
3523        value.0
3524    }
3525}
3526impl ::std::convert::From<&MnxDocumentGlobalLyricsLineMetadataKey>
3527for MnxDocumentGlobalLyricsLineMetadataKey {
3528    fn from(value: &MnxDocumentGlobalLyricsLineMetadataKey) -> Self {
3529        value.clone()
3530    }
3531}
3532impl ::std::str::FromStr for MnxDocumentGlobalLyricsLineMetadataKey {
3533    type Err = self::error::ConversionError;
3534    fn from_str(
3535        value: &str,
3536    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3537        if regress::Regex::new("^.*$").unwrap().find(value).is_none() {
3538            return Err("doesn't match pattern \"^.*$\"".into());
3539        }
3540        Ok(Self(value.to_string()))
3541    }
3542}
3543impl ::std::convert::TryFrom<&str> for MnxDocumentGlobalLyricsLineMetadataKey {
3544    type Error = self::error::ConversionError;
3545    fn try_from(
3546        value: &str,
3547    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3548        value.parse()
3549    }
3550}
3551impl ::std::convert::TryFrom<&::std::string::String>
3552for MnxDocumentGlobalLyricsLineMetadataKey {
3553    type Error = self::error::ConversionError;
3554    fn try_from(
3555        value: &::std::string::String,
3556    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3557        value.parse()
3558    }
3559}
3560impl ::std::convert::TryFrom<::std::string::String>
3561for MnxDocumentGlobalLyricsLineMetadataKey {
3562    type Error = self::error::ConversionError;
3563    fn try_from(
3564        value: ::std::string::String,
3565    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3566        value.parse()
3567    }
3568}
3569impl<'de> ::serde::Deserialize<'de> for MnxDocumentGlobalLyricsLineMetadataKey {
3570    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
3571    where
3572        D: ::serde::Deserializer<'de>,
3573    {
3574        ::std::string::String::deserialize(deserializer)?
3575            .parse()
3576            .map_err(|e: self::error::ConversionError| {
3577                <D::Error as ::serde::de::Error>::custom(e.to_string())
3578            })
3579    }
3580}
3581///MnxDocumentGlobalLyricsLineMetadataValue
3582///
3583/// <details><summary>JSON schema</summary>
3584///
3585/// ```json
3586///{
3587///  "type": "object",
3588///  "properties": {
3589///    "label": {
3590///      "type": "string"
3591///    },
3592///    "lang": {
3593///      "type": "string"
3594///    }
3595///  },
3596///  "additionalProperties": false
3597///}
3598/// ```
3599/// </details>
3600#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3601#[serde(deny_unknown_fields)]
3602pub struct MnxDocumentGlobalLyricsLineMetadataValue {
3603    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3604    pub label: ::std::option::Option<::std::string::String>,
3605    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3606    pub lang: ::std::option::Option<::std::string::String>,
3607}
3608impl ::std::convert::From<&MnxDocumentGlobalLyricsLineMetadataValue>
3609for MnxDocumentGlobalLyricsLineMetadataValue {
3610    fn from(value: &MnxDocumentGlobalLyricsLineMetadataValue) -> Self {
3611        value.clone()
3612    }
3613}
3614impl ::std::default::Default for MnxDocumentGlobalLyricsLineMetadataValue {
3615    fn default() -> Self {
3616        Self {
3617            label: Default::default(),
3618            lang: Default::default(),
3619        }
3620    }
3621}
3622impl MnxDocumentGlobalLyricsLineMetadataValue {
3623    pub fn builder() -> builder::MnxDocumentGlobalLyricsLineMetadataValue {
3624        Default::default()
3625    }
3626}
3627///MnxDocumentGlobalMeasuresItem
3628///
3629/// <details><summary>JSON schema</summary>
3630///
3631/// ```json
3632///{
3633///  "type": "object",
3634///  "properties": {
3635///    "barline": {
3636///      "type": "object",
3637///      "required": [
3638///        "type"
3639///      ],
3640///      "properties": {
3641///        "type": {
3642///          "type": "string",
3643///          "enum": [
3644///            "regular",
3645///            "dotted",
3646///            "dashed",
3647///            "heavy",
3648///            "double",
3649///            "final",
3650///            "heavyLight",
3651///            "heavyHeavy",
3652///            "tick",
3653///            "short",
3654///            "noBarline"
3655///          ]
3656///        }
3657///      },
3658///      "additionalProperties": false
3659///    },
3660///    "ending": {
3661///      "type": "object",
3662///      "required": [
3663///        "duration"
3664///      ],
3665///      "properties": {
3666///        "class": {
3667///          "$ref": "#/$defs/style-class"
3668///        },
3669///        "color": {
3670///          "$ref": "#/$defs/color"
3671///        },
3672///        "duration": {
3673///          "type": "integer"
3674///        },
3675///        "numbers": {
3676///          "type": "array",
3677///          "items": {
3678///            "type": "integer"
3679///          }
3680///        },
3681///        "open": {
3682///          "type": "boolean"
3683///        }
3684///      },
3685///      "additionalProperties": false
3686///    },
3687///    "fine": {
3688///      "type": "object",
3689///      "required": [
3690///        "location"
3691///      ],
3692///      "properties": {
3693///        "class": {
3694///          "$ref": "#/$defs/style-class"
3695///        },
3696///        "color": {
3697///          "$ref": "#/$defs/color"
3698///        },
3699///        "location": {
3700///          "$ref": "#/$defs/rhythmic-position"
3701///        }
3702///      },
3703///      "additionalProperties": false
3704///    },
3705///    "index": {
3706///      "$ref": "#/$defs/measure-number"
3707///    },
3708///    "jump": {
3709///      "type": "object",
3710///      "required": [
3711///        "location",
3712///        "type"
3713///      ],
3714///      "properties": {
3715///        "location": {
3716///          "$ref": "#/$defs/rhythmic-position"
3717///        },
3718///        "type": {
3719///          "type": "string",
3720///          "enum": [
3721///            "dsalfine",
3722///            "segno"
3723///          ]
3724///        }
3725///      },
3726///      "additionalProperties": false
3727///    },
3728///    "key": {
3729///      "type": "object",
3730///      "required": [
3731///        "fifths"
3732///      ],
3733///      "properties": {
3734///        "class": {
3735///          "$ref": "#/$defs/style-class"
3736///        },
3737///        "color": {
3738///          "$ref": "#/$defs/color"
3739///        },
3740///        "fifths": {
3741///          "type": "integer"
3742///        }
3743///      },
3744///      "additionalProperties": false
3745///    },
3746///    "number": {
3747///      "$ref": "#/$defs/measure-number"
3748///    },
3749///    "repeatEnd": {
3750///      "type": "object",
3751///      "properties": {
3752///        "times": {
3753///          "type": "integer"
3754///        }
3755///      },
3756///      "additionalProperties": false
3757///    },
3758///    "repeatStart": {
3759///      "type": "object",
3760///      "additionalProperties": false
3761///    },
3762///    "segno": {
3763///      "type": "object",
3764///      "required": [
3765///        "location"
3766///      ],
3767///      "properties": {
3768///        "class": {
3769///          "$ref": "#/$defs/style-class"
3770///        },
3771///        "color": {
3772///          "$ref": "#/$defs/color"
3773///        },
3774///        "glyph": {
3775///          "$ref": "#/$defs/smufl-glyph"
3776///        },
3777///        "location": {
3778///          "$ref": "#/$defs/rhythmic-position"
3779///        }
3780///      },
3781///      "additionalProperties": false
3782///    },
3783///    "tempos": {
3784///      "type": "array",
3785///      "items": {
3786///        "type": "object",
3787///        "required": [
3788///          "bpm",
3789///          "value"
3790///        ],
3791///        "properties": {
3792///          "bpm": {
3793///            "type": "integer"
3794///          },
3795///          "location": {
3796///            "$ref": "#/$defs/rhythmic-position"
3797///          },
3798///          "value": {
3799///            "$ref": "#/$defs/note-value"
3800///          }
3801///        },
3802///        "additionalProperties": false
3803///      }
3804///    },
3805///    "time": {
3806///      "type": "object",
3807///      "required": [
3808///        "count",
3809///        "unit"
3810///      ],
3811///      "properties": {
3812///        "count": {
3813///          "$ref": "#/$defs/positive-integer"
3814///        },
3815///        "unit": {
3816///          "type": "integer",
3817///          "enum": [
3818///            1,
3819///            2,
3820///            4,
3821///            8,
3822///            16,
3823///            32,
3824///            64,
3825///            128
3826///          ]
3827///        }
3828///      },
3829///      "additionalProperties": false
3830///    }
3831///  },
3832///  "additionalProperties": false
3833///}
3834/// ```
3835/// </details>
3836#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3837#[serde(deny_unknown_fields)]
3838pub struct MnxDocumentGlobalMeasuresItem {
3839    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3840    pub barline: ::std::option::Option<MnxDocumentGlobalMeasuresItemBarline>,
3841    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3842    pub ending: ::std::option::Option<MnxDocumentGlobalMeasuresItemEnding>,
3843    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3844    pub fine: ::std::option::Option<MnxDocumentGlobalMeasuresItemFine>,
3845    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3846    pub index: ::std::option::Option<MeasureNumber>,
3847    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3848    pub jump: ::std::option::Option<MnxDocumentGlobalMeasuresItemJump>,
3849    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3850    pub key: ::std::option::Option<MnxDocumentGlobalMeasuresItemKey>,
3851    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3852    pub number: ::std::option::Option<MeasureNumber>,
3853    #[serde(
3854        rename = "repeatEnd",
3855        default,
3856        skip_serializing_if = "::std::option::Option::is_none"
3857    )]
3858    pub repeat_end: ::std::option::Option<MnxDocumentGlobalMeasuresItemRepeatEnd>,
3859    #[serde(
3860        rename = "repeatStart",
3861        default,
3862        skip_serializing_if = "::std::option::Option::is_none"
3863    )]
3864    pub repeat_start: ::std::option::Option<MnxDocumentGlobalMeasuresItemRepeatStart>,
3865    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3866    pub segno: ::std::option::Option<MnxDocumentGlobalMeasuresItemSegno>,
3867    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3868    pub tempos: ::std::vec::Vec<MnxDocumentGlobalMeasuresItemTemposItem>,
3869    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3870    pub time: ::std::option::Option<MnxDocumentGlobalMeasuresItemTime>,
3871}
3872impl ::std::convert::From<&MnxDocumentGlobalMeasuresItem>
3873for MnxDocumentGlobalMeasuresItem {
3874    fn from(value: &MnxDocumentGlobalMeasuresItem) -> Self {
3875        value.clone()
3876    }
3877}
3878impl ::std::default::Default for MnxDocumentGlobalMeasuresItem {
3879    fn default() -> Self {
3880        Self {
3881            barline: Default::default(),
3882            ending: Default::default(),
3883            fine: Default::default(),
3884            index: Default::default(),
3885            jump: Default::default(),
3886            key: Default::default(),
3887            number: Default::default(),
3888            repeat_end: Default::default(),
3889            repeat_start: Default::default(),
3890            segno: Default::default(),
3891            tempos: Default::default(),
3892            time: Default::default(),
3893        }
3894    }
3895}
3896impl MnxDocumentGlobalMeasuresItem {
3897    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItem {
3898        Default::default()
3899    }
3900}
3901///MnxDocumentGlobalMeasuresItemBarline
3902///
3903/// <details><summary>JSON schema</summary>
3904///
3905/// ```json
3906///{
3907///  "type": "object",
3908///  "required": [
3909///    "type"
3910///  ],
3911///  "properties": {
3912///    "type": {
3913///      "type": "string",
3914///      "enum": [
3915///        "regular",
3916///        "dotted",
3917///        "dashed",
3918///        "heavy",
3919///        "double",
3920///        "final",
3921///        "heavyLight",
3922///        "heavyHeavy",
3923///        "tick",
3924///        "short",
3925///        "noBarline"
3926///      ]
3927///    }
3928///  },
3929///  "additionalProperties": false
3930///}
3931/// ```
3932/// </details>
3933#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3934#[serde(deny_unknown_fields)]
3935pub struct MnxDocumentGlobalMeasuresItemBarline {
3936    #[serde(rename = "type")]
3937    pub type_: MnxDocumentGlobalMeasuresItemBarlineType,
3938}
3939impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemBarline>
3940for MnxDocumentGlobalMeasuresItemBarline {
3941    fn from(value: &MnxDocumentGlobalMeasuresItemBarline) -> Self {
3942        value.clone()
3943    }
3944}
3945impl MnxDocumentGlobalMeasuresItemBarline {
3946    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemBarline {
3947        Default::default()
3948    }
3949}
3950///MnxDocumentGlobalMeasuresItemBarlineType
3951///
3952/// <details><summary>JSON schema</summary>
3953///
3954/// ```json
3955///{
3956///  "type": "string",
3957///  "enum": [
3958///    "regular",
3959///    "dotted",
3960///    "dashed",
3961///    "heavy",
3962///    "double",
3963///    "final",
3964///    "heavyLight",
3965///    "heavyHeavy",
3966///    "tick",
3967///    "short",
3968///    "noBarline"
3969///  ]
3970///}
3971/// ```
3972/// </details>
3973#[derive(
3974    ::serde::Deserialize,
3975    ::serde::Serialize,
3976    Clone,
3977    Copy,
3978    Debug,
3979    Eq,
3980    Hash,
3981    Ord,
3982    PartialEq,
3983    PartialOrd
3984)]
3985pub enum MnxDocumentGlobalMeasuresItemBarlineType {
3986    #[serde(rename = "regular")]
3987    Regular,
3988    #[serde(rename = "dotted")]
3989    Dotted,
3990    #[serde(rename = "dashed")]
3991    Dashed,
3992    #[serde(rename = "heavy")]
3993    Heavy,
3994    #[serde(rename = "double")]
3995    Double,
3996    #[serde(rename = "final")]
3997    Final,
3998    #[serde(rename = "heavyLight")]
3999    HeavyLight,
4000    #[serde(rename = "heavyHeavy")]
4001    HeavyHeavy,
4002    #[serde(rename = "tick")]
4003    Tick,
4004    #[serde(rename = "short")]
4005    Short,
4006    #[serde(rename = "noBarline")]
4007    NoBarline,
4008}
4009impl ::std::convert::From<&Self> for MnxDocumentGlobalMeasuresItemBarlineType {
4010    fn from(value: &MnxDocumentGlobalMeasuresItemBarlineType) -> Self {
4011        value.clone()
4012    }
4013}
4014impl ::std::fmt::Display for MnxDocumentGlobalMeasuresItemBarlineType {
4015    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4016        match *self {
4017            Self::Regular => write!(f, "regular"),
4018            Self::Dotted => write!(f, "dotted"),
4019            Self::Dashed => write!(f, "dashed"),
4020            Self::Heavy => write!(f, "heavy"),
4021            Self::Double => write!(f, "double"),
4022            Self::Final => write!(f, "final"),
4023            Self::HeavyLight => write!(f, "heavyLight"),
4024            Self::HeavyHeavy => write!(f, "heavyHeavy"),
4025            Self::Tick => write!(f, "tick"),
4026            Self::Short => write!(f, "short"),
4027            Self::NoBarline => write!(f, "noBarline"),
4028        }
4029    }
4030}
4031impl ::std::str::FromStr for MnxDocumentGlobalMeasuresItemBarlineType {
4032    type Err = self::error::ConversionError;
4033    fn from_str(
4034        value: &str,
4035    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4036        match value {
4037            "regular" => Ok(Self::Regular),
4038            "dotted" => Ok(Self::Dotted),
4039            "dashed" => Ok(Self::Dashed),
4040            "heavy" => Ok(Self::Heavy),
4041            "double" => Ok(Self::Double),
4042            "final" => Ok(Self::Final),
4043            "heavyLight" => Ok(Self::HeavyLight),
4044            "heavyHeavy" => Ok(Self::HeavyHeavy),
4045            "tick" => Ok(Self::Tick),
4046            "short" => Ok(Self::Short),
4047            "noBarline" => Ok(Self::NoBarline),
4048            _ => Err("invalid value".into()),
4049        }
4050    }
4051}
4052impl ::std::convert::TryFrom<&str> for MnxDocumentGlobalMeasuresItemBarlineType {
4053    type Error = self::error::ConversionError;
4054    fn try_from(
4055        value: &str,
4056    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4057        value.parse()
4058    }
4059}
4060impl ::std::convert::TryFrom<&::std::string::String>
4061for MnxDocumentGlobalMeasuresItemBarlineType {
4062    type Error = self::error::ConversionError;
4063    fn try_from(
4064        value: &::std::string::String,
4065    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4066        value.parse()
4067    }
4068}
4069impl ::std::convert::TryFrom<::std::string::String>
4070for MnxDocumentGlobalMeasuresItemBarlineType {
4071    type Error = self::error::ConversionError;
4072    fn try_from(
4073        value: ::std::string::String,
4074    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4075        value.parse()
4076    }
4077}
4078///MnxDocumentGlobalMeasuresItemEnding
4079///
4080/// <details><summary>JSON schema</summary>
4081///
4082/// ```json
4083///{
4084///  "type": "object",
4085///  "required": [
4086///    "duration"
4087///  ],
4088///  "properties": {
4089///    "class": {
4090///      "$ref": "#/$defs/style-class"
4091///    },
4092///    "color": {
4093///      "$ref": "#/$defs/color"
4094///    },
4095///    "duration": {
4096///      "type": "integer"
4097///    },
4098///    "numbers": {
4099///      "type": "array",
4100///      "items": {
4101///        "type": "integer"
4102///      }
4103///    },
4104///    "open": {
4105///      "type": "boolean"
4106///    }
4107///  },
4108///  "additionalProperties": false
4109///}
4110/// ```
4111/// </details>
4112#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4113#[serde(deny_unknown_fields)]
4114pub struct MnxDocumentGlobalMeasuresItemEnding {
4115    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4116    pub class: ::std::option::Option<StyleClass>,
4117    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4118    pub color: ::std::option::Option<Color>,
4119    pub duration: i64,
4120    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4121    pub numbers: ::std::vec::Vec<i64>,
4122    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4123    pub open: ::std::option::Option<bool>,
4124}
4125impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemEnding>
4126for MnxDocumentGlobalMeasuresItemEnding {
4127    fn from(value: &MnxDocumentGlobalMeasuresItemEnding) -> Self {
4128        value.clone()
4129    }
4130}
4131impl MnxDocumentGlobalMeasuresItemEnding {
4132    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemEnding {
4133        Default::default()
4134    }
4135}
4136///MnxDocumentGlobalMeasuresItemFine
4137///
4138/// <details><summary>JSON schema</summary>
4139///
4140/// ```json
4141///{
4142///  "type": "object",
4143///  "required": [
4144///    "location"
4145///  ],
4146///  "properties": {
4147///    "class": {
4148///      "$ref": "#/$defs/style-class"
4149///    },
4150///    "color": {
4151///      "$ref": "#/$defs/color"
4152///    },
4153///    "location": {
4154///      "$ref": "#/$defs/rhythmic-position"
4155///    }
4156///  },
4157///  "additionalProperties": false
4158///}
4159/// ```
4160/// </details>
4161#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4162#[serde(deny_unknown_fields)]
4163pub struct MnxDocumentGlobalMeasuresItemFine {
4164    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4165    pub class: ::std::option::Option<StyleClass>,
4166    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4167    pub color: ::std::option::Option<Color>,
4168    pub location: RhythmicPosition,
4169}
4170impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemFine>
4171for MnxDocumentGlobalMeasuresItemFine {
4172    fn from(value: &MnxDocumentGlobalMeasuresItemFine) -> Self {
4173        value.clone()
4174    }
4175}
4176impl MnxDocumentGlobalMeasuresItemFine {
4177    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemFine {
4178        Default::default()
4179    }
4180}
4181///MnxDocumentGlobalMeasuresItemJump
4182///
4183/// <details><summary>JSON schema</summary>
4184///
4185/// ```json
4186///{
4187///  "type": "object",
4188///  "required": [
4189///    "location",
4190///    "type"
4191///  ],
4192///  "properties": {
4193///    "location": {
4194///      "$ref": "#/$defs/rhythmic-position"
4195///    },
4196///    "type": {
4197///      "type": "string",
4198///      "enum": [
4199///        "dsalfine",
4200///        "segno"
4201///      ]
4202///    }
4203///  },
4204///  "additionalProperties": false
4205///}
4206/// ```
4207/// </details>
4208#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4209#[serde(deny_unknown_fields)]
4210pub struct MnxDocumentGlobalMeasuresItemJump {
4211    pub location: RhythmicPosition,
4212    #[serde(rename = "type")]
4213    pub type_: MnxDocumentGlobalMeasuresItemJumpType,
4214}
4215impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemJump>
4216for MnxDocumentGlobalMeasuresItemJump {
4217    fn from(value: &MnxDocumentGlobalMeasuresItemJump) -> Self {
4218        value.clone()
4219    }
4220}
4221impl MnxDocumentGlobalMeasuresItemJump {
4222    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemJump {
4223        Default::default()
4224    }
4225}
4226///MnxDocumentGlobalMeasuresItemJumpType
4227///
4228/// <details><summary>JSON schema</summary>
4229///
4230/// ```json
4231///{
4232///  "type": "string",
4233///  "enum": [
4234///    "dsalfine",
4235///    "segno"
4236///  ]
4237///}
4238/// ```
4239/// </details>
4240#[derive(
4241    ::serde::Deserialize,
4242    ::serde::Serialize,
4243    Clone,
4244    Copy,
4245    Debug,
4246    Eq,
4247    Hash,
4248    Ord,
4249    PartialEq,
4250    PartialOrd
4251)]
4252pub enum MnxDocumentGlobalMeasuresItemJumpType {
4253    #[serde(rename = "dsalfine")]
4254    Dsalfine,
4255    #[serde(rename = "segno")]
4256    Segno,
4257}
4258impl ::std::convert::From<&Self> for MnxDocumentGlobalMeasuresItemJumpType {
4259    fn from(value: &MnxDocumentGlobalMeasuresItemJumpType) -> Self {
4260        value.clone()
4261    }
4262}
4263impl ::std::fmt::Display for MnxDocumentGlobalMeasuresItemJumpType {
4264    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4265        match *self {
4266            Self::Dsalfine => write!(f, "dsalfine"),
4267            Self::Segno => write!(f, "segno"),
4268        }
4269    }
4270}
4271impl ::std::str::FromStr for MnxDocumentGlobalMeasuresItemJumpType {
4272    type Err = self::error::ConversionError;
4273    fn from_str(
4274        value: &str,
4275    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4276        match value {
4277            "dsalfine" => Ok(Self::Dsalfine),
4278            "segno" => Ok(Self::Segno),
4279            _ => Err("invalid value".into()),
4280        }
4281    }
4282}
4283impl ::std::convert::TryFrom<&str> for MnxDocumentGlobalMeasuresItemJumpType {
4284    type Error = self::error::ConversionError;
4285    fn try_from(
4286        value: &str,
4287    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4288        value.parse()
4289    }
4290}
4291impl ::std::convert::TryFrom<&::std::string::String>
4292for MnxDocumentGlobalMeasuresItemJumpType {
4293    type Error = self::error::ConversionError;
4294    fn try_from(
4295        value: &::std::string::String,
4296    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4297        value.parse()
4298    }
4299}
4300impl ::std::convert::TryFrom<::std::string::String>
4301for MnxDocumentGlobalMeasuresItemJumpType {
4302    type Error = self::error::ConversionError;
4303    fn try_from(
4304        value: ::std::string::String,
4305    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4306        value.parse()
4307    }
4308}
4309///MnxDocumentGlobalMeasuresItemKey
4310///
4311/// <details><summary>JSON schema</summary>
4312///
4313/// ```json
4314///{
4315///  "type": "object",
4316///  "required": [
4317///    "fifths"
4318///  ],
4319///  "properties": {
4320///    "class": {
4321///      "$ref": "#/$defs/style-class"
4322///    },
4323///    "color": {
4324///      "$ref": "#/$defs/color"
4325///    },
4326///    "fifths": {
4327///      "type": "integer"
4328///    }
4329///  },
4330///  "additionalProperties": false
4331///}
4332/// ```
4333/// </details>
4334#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4335#[serde(deny_unknown_fields)]
4336pub struct MnxDocumentGlobalMeasuresItemKey {
4337    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4338    pub class: ::std::option::Option<StyleClass>,
4339    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4340    pub color: ::std::option::Option<Color>,
4341    pub fifths: i64,
4342}
4343impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemKey>
4344for MnxDocumentGlobalMeasuresItemKey {
4345    fn from(value: &MnxDocumentGlobalMeasuresItemKey) -> Self {
4346        value.clone()
4347    }
4348}
4349impl MnxDocumentGlobalMeasuresItemKey {
4350    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemKey {
4351        Default::default()
4352    }
4353}
4354///MnxDocumentGlobalMeasuresItemRepeatEnd
4355///
4356/// <details><summary>JSON schema</summary>
4357///
4358/// ```json
4359///{
4360///  "type": "object",
4361///  "properties": {
4362///    "times": {
4363///      "type": "integer"
4364///    }
4365///  },
4366///  "additionalProperties": false
4367///}
4368/// ```
4369/// </details>
4370#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4371#[serde(deny_unknown_fields)]
4372pub struct MnxDocumentGlobalMeasuresItemRepeatEnd {
4373    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4374    pub times: ::std::option::Option<i64>,
4375}
4376impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemRepeatEnd>
4377for MnxDocumentGlobalMeasuresItemRepeatEnd {
4378    fn from(value: &MnxDocumentGlobalMeasuresItemRepeatEnd) -> Self {
4379        value.clone()
4380    }
4381}
4382impl ::std::default::Default for MnxDocumentGlobalMeasuresItemRepeatEnd {
4383    fn default() -> Self {
4384        Self { times: Default::default() }
4385    }
4386}
4387impl MnxDocumentGlobalMeasuresItemRepeatEnd {
4388    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemRepeatEnd {
4389        Default::default()
4390    }
4391}
4392///MnxDocumentGlobalMeasuresItemRepeatStart
4393///
4394/// <details><summary>JSON schema</summary>
4395///
4396/// ```json
4397///{
4398///  "type": "object",
4399///  "additionalProperties": false
4400///}
4401/// ```
4402/// </details>
4403#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4404#[serde(deny_unknown_fields)]
4405pub struct MnxDocumentGlobalMeasuresItemRepeatStart {}
4406impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemRepeatStart>
4407for MnxDocumentGlobalMeasuresItemRepeatStart {
4408    fn from(value: &MnxDocumentGlobalMeasuresItemRepeatStart) -> Self {
4409        value.clone()
4410    }
4411}
4412impl ::std::default::Default for MnxDocumentGlobalMeasuresItemRepeatStart {
4413    fn default() -> Self {
4414        Self {}
4415    }
4416}
4417impl MnxDocumentGlobalMeasuresItemRepeatStart {
4418    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemRepeatStart {
4419        Default::default()
4420    }
4421}
4422///MnxDocumentGlobalMeasuresItemSegno
4423///
4424/// <details><summary>JSON schema</summary>
4425///
4426/// ```json
4427///{
4428///  "type": "object",
4429///  "required": [
4430///    "location"
4431///  ],
4432///  "properties": {
4433///    "class": {
4434///      "$ref": "#/$defs/style-class"
4435///    },
4436///    "color": {
4437///      "$ref": "#/$defs/color"
4438///    },
4439///    "glyph": {
4440///      "$ref": "#/$defs/smufl-glyph"
4441///    },
4442///    "location": {
4443///      "$ref": "#/$defs/rhythmic-position"
4444///    }
4445///  },
4446///  "additionalProperties": false
4447///}
4448/// ```
4449/// </details>
4450#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4451#[serde(deny_unknown_fields)]
4452pub struct MnxDocumentGlobalMeasuresItemSegno {
4453    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4454    pub class: ::std::option::Option<StyleClass>,
4455    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4456    pub color: ::std::option::Option<Color>,
4457    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4458    pub glyph: ::std::option::Option<SmuflGlyph>,
4459    pub location: RhythmicPosition,
4460}
4461impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemSegno>
4462for MnxDocumentGlobalMeasuresItemSegno {
4463    fn from(value: &MnxDocumentGlobalMeasuresItemSegno) -> Self {
4464        value.clone()
4465    }
4466}
4467impl MnxDocumentGlobalMeasuresItemSegno {
4468    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemSegno {
4469        Default::default()
4470    }
4471}
4472///MnxDocumentGlobalMeasuresItemTemposItem
4473///
4474/// <details><summary>JSON schema</summary>
4475///
4476/// ```json
4477///{
4478///  "type": "object",
4479///  "required": [
4480///    "bpm",
4481///    "value"
4482///  ],
4483///  "properties": {
4484///    "bpm": {
4485///      "type": "integer"
4486///    },
4487///    "location": {
4488///      "$ref": "#/$defs/rhythmic-position"
4489///    },
4490///    "value": {
4491///      "$ref": "#/$defs/note-value"
4492///    }
4493///  },
4494///  "additionalProperties": false
4495///}
4496/// ```
4497/// </details>
4498#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4499#[serde(deny_unknown_fields)]
4500pub struct MnxDocumentGlobalMeasuresItemTemposItem {
4501    pub bpm: i64,
4502    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4503    pub location: ::std::option::Option<RhythmicPosition>,
4504    pub value: NoteValue,
4505}
4506impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemTemposItem>
4507for MnxDocumentGlobalMeasuresItemTemposItem {
4508    fn from(value: &MnxDocumentGlobalMeasuresItemTemposItem) -> Self {
4509        value.clone()
4510    }
4511}
4512impl MnxDocumentGlobalMeasuresItemTemposItem {
4513    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemTemposItem {
4514        Default::default()
4515    }
4516}
4517///MnxDocumentGlobalMeasuresItemTime
4518///
4519/// <details><summary>JSON schema</summary>
4520///
4521/// ```json
4522///{
4523///  "type": "object",
4524///  "required": [
4525///    "count",
4526///    "unit"
4527///  ],
4528///  "properties": {
4529///    "count": {
4530///      "$ref": "#/$defs/positive-integer"
4531///    },
4532///    "unit": {
4533///      "type": "integer",
4534///      "enum": [
4535///        1,
4536///        2,
4537///        4,
4538///        8,
4539///        16,
4540///        32,
4541///        64,
4542///        128
4543///      ]
4544///    }
4545///  },
4546///  "additionalProperties": false
4547///}
4548/// ```
4549/// </details>
4550#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4551#[serde(deny_unknown_fields)]
4552pub struct MnxDocumentGlobalMeasuresItemTime {
4553    pub count: PositiveInteger,
4554    pub unit: MnxDocumentGlobalMeasuresItemTimeUnit,
4555}
4556impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemTime>
4557for MnxDocumentGlobalMeasuresItemTime {
4558    fn from(value: &MnxDocumentGlobalMeasuresItemTime) -> Self {
4559        value.clone()
4560    }
4561}
4562impl MnxDocumentGlobalMeasuresItemTime {
4563    pub fn builder() -> builder::MnxDocumentGlobalMeasuresItemTime {
4564        Default::default()
4565    }
4566}
4567///MnxDocumentGlobalMeasuresItemTimeUnit
4568///
4569/// <details><summary>JSON schema</summary>
4570///
4571/// ```json
4572///{
4573///  "type": "integer",
4574///  "enum": [
4575///    1,
4576///    2,
4577///    4,
4578///    8,
4579///    16,
4580///    32,
4581///    64,
4582///    128
4583///  ]
4584///}
4585/// ```
4586/// </details>
4587#[derive(::serde::Serialize, Clone, Debug)]
4588#[serde(transparent)]
4589pub struct MnxDocumentGlobalMeasuresItemTimeUnit(i64);
4590impl ::std::ops::Deref for MnxDocumentGlobalMeasuresItemTimeUnit {
4591    type Target = i64;
4592    fn deref(&self) -> &i64 {
4593        &self.0
4594    }
4595}
4596impl ::std::convert::From<MnxDocumentGlobalMeasuresItemTimeUnit> for i64 {
4597    fn from(value: MnxDocumentGlobalMeasuresItemTimeUnit) -> Self {
4598        value.0
4599    }
4600}
4601impl ::std::convert::From<&MnxDocumentGlobalMeasuresItemTimeUnit>
4602for MnxDocumentGlobalMeasuresItemTimeUnit {
4603    fn from(value: &MnxDocumentGlobalMeasuresItemTimeUnit) -> Self {
4604        value.clone()
4605    }
4606}
4607impl ::std::convert::TryFrom<i64> for MnxDocumentGlobalMeasuresItemTimeUnit {
4608    type Error = self::error::ConversionError;
4609    fn try_from(
4610        value: i64,
4611    ) -> ::std::result::Result<Self, self::error::ConversionError> {
4612        if ![1_i64, 2_i64, 4_i64, 8_i64, 16_i64, 32_i64, 64_i64, 128_i64]
4613            .contains(&value)
4614        {
4615            Err("invalid value".into())
4616        } else {
4617            Ok(Self(value))
4618        }
4619    }
4620}
4621impl<'de> ::serde::Deserialize<'de> for MnxDocumentGlobalMeasuresItemTimeUnit {
4622    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
4623    where
4624        D: ::serde::Deserializer<'de>,
4625    {
4626        Self::try_from(<i64>::deserialize(deserializer)?)
4627            .map_err(|e| { <D::Error as ::serde::de::Error>::custom(e.to_string()) })
4628    }
4629}
4630///MnxDocumentGlobalStylesItem
4631///
4632/// <details><summary>JSON schema</summary>
4633///
4634/// ```json
4635///{
4636///  "type": "object",
4637///  "required": [
4638///    "selector"
4639///  ],
4640///  "properties": {
4641///    "color": {
4642///      "$ref": "#/$defs/color"
4643///    },
4644///    "selector": {
4645///      "type": "string"
4646///    }
4647///  },
4648///  "additionalProperties": false
4649///}
4650/// ```
4651/// </details>
4652#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4653#[serde(deny_unknown_fields)]
4654pub struct MnxDocumentGlobalStylesItem {
4655    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4656    pub color: ::std::option::Option<Color>,
4657    pub selector: ::std::string::String,
4658}
4659impl ::std::convert::From<&MnxDocumentGlobalStylesItem> for MnxDocumentGlobalStylesItem {
4660    fn from(value: &MnxDocumentGlobalStylesItem) -> Self {
4661        value.clone()
4662    }
4663}
4664impl MnxDocumentGlobalStylesItem {
4665    pub fn builder() -> builder::MnxDocumentGlobalStylesItem {
4666        Default::default()
4667    }
4668}
4669///MnxDocumentLayoutsItem
4670///
4671/// <details><summary>JSON schema</summary>
4672///
4673/// ```json
4674///{
4675///  "type": "object",
4676///  "required": [
4677///    "content",
4678///    "id"
4679///  ],
4680///  "properties": {
4681///    "content": {
4682///      "$ref": "#/$defs/system-layout-content"
4683///    },
4684///    "id": {
4685///      "$ref": "#/$defs/id"
4686///    }
4687///  },
4688///  "additionalProperties": false
4689///}
4690/// ```
4691/// </details>
4692#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4693#[serde(deny_unknown_fields)]
4694pub struct MnxDocumentLayoutsItem {
4695    pub content: SystemLayoutContent,
4696    pub id: Id,
4697}
4698impl ::std::convert::From<&MnxDocumentLayoutsItem> for MnxDocumentLayoutsItem {
4699    fn from(value: &MnxDocumentLayoutsItem) -> Self {
4700        value.clone()
4701    }
4702}
4703impl MnxDocumentLayoutsItem {
4704    pub fn builder() -> builder::MnxDocumentLayoutsItem {
4705        Default::default()
4706    }
4707}
4708///MnxDocumentMnx
4709///
4710/// <details><summary>JSON schema</summary>
4711///
4712/// ```json
4713///{
4714///  "type": "object",
4715///  "required": [
4716///    "version"
4717///  ],
4718///  "properties": {
4719///    "support": {
4720///      "type": "object",
4721///      "properties": {
4722///        "useAccidentalDisplay": {
4723///          "type": "boolean"
4724///        }
4725///      },
4726///      "additionalProperties": false
4727///    },
4728///    "version": {
4729///      "type": "integer"
4730///    }
4731///  },
4732///  "additionalProperties": false
4733///}
4734/// ```
4735/// </details>
4736#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4737#[serde(deny_unknown_fields)]
4738pub struct MnxDocumentMnx {
4739    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4740    pub support: ::std::option::Option<MnxDocumentMnxSupport>,
4741    pub version: i64,
4742}
4743impl ::std::convert::From<&MnxDocumentMnx> for MnxDocumentMnx {
4744    fn from(value: &MnxDocumentMnx) -> Self {
4745        value.clone()
4746    }
4747}
4748impl MnxDocumentMnx {
4749    pub fn builder() -> builder::MnxDocumentMnx {
4750        Default::default()
4751    }
4752}
4753///MnxDocumentMnxSupport
4754///
4755/// <details><summary>JSON schema</summary>
4756///
4757/// ```json
4758///{
4759///  "type": "object",
4760///  "properties": {
4761///    "useAccidentalDisplay": {
4762///      "type": "boolean"
4763///    }
4764///  },
4765///  "additionalProperties": false
4766///}
4767/// ```
4768/// </details>
4769#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4770#[serde(deny_unknown_fields)]
4771pub struct MnxDocumentMnxSupport {
4772    #[serde(
4773        rename = "useAccidentalDisplay",
4774        default,
4775        skip_serializing_if = "::std::option::Option::is_none"
4776    )]
4777    pub use_accidental_display: ::std::option::Option<bool>,
4778}
4779impl ::std::convert::From<&MnxDocumentMnxSupport> for MnxDocumentMnxSupport {
4780    fn from(value: &MnxDocumentMnxSupport) -> Self {
4781        value.clone()
4782    }
4783}
4784impl ::std::default::Default for MnxDocumentMnxSupport {
4785    fn default() -> Self {
4786        Self {
4787            use_accidental_display: Default::default(),
4788        }
4789    }
4790}
4791impl MnxDocumentMnxSupport {
4792    pub fn builder() -> builder::MnxDocumentMnxSupport {
4793        Default::default()
4794    }
4795}
4796///MnxDocumentPartsItem
4797///
4798/// <details><summary>JSON schema</summary>
4799///
4800/// ```json
4801///{
4802///  "type": "object",
4803///  "properties": {
4804///    "id": {
4805///      "$ref": "#/$defs/id"
4806///    },
4807///    "measures": {
4808///      "type": "array",
4809///      "items": {
4810///        "type": "object",
4811///        "required": [
4812///          "sequences"
4813///        ],
4814///        "properties": {
4815///          "beams": {
4816///            "$ref": "#/$defs/beam-list"
4817///          },
4818///          "clefs": {
4819///            "type": "array",
4820///            "items": {
4821///              "type": "object",
4822///              "required": [
4823///                "clef"
4824///              ],
4825///              "properties": {
4826///                "clef": {
4827///                  "type": "object",
4828///                  "required": [
4829///                    "sign",
4830///                    "staffPosition"
4831///                  ],
4832///                  "properties": {
4833///                    "class": {
4834///                      "$ref": "#/$defs/style-class"
4835///                    },
4836///                    "color": {
4837///                      "type": "string"
4838///                    },
4839///                    "glyph": {
4840///                      "$ref": "#/$defs/smufl-glyph"
4841///                    },
4842///                    "octave": {
4843///                      "type": "integer"
4844///                    },
4845///                    "sign": {
4846///                      "type": "string",
4847///                      "enum": [
4848///                        "C",
4849///                        "F",
4850///                        "G"
4851///                      ]
4852///                    },
4853///                    "staffPosition": {
4854///                      "$ref": "#/$defs/staff-position"
4855///                    }
4856///                  },
4857///                  "additionalProperties": false
4858///                },
4859///                "position": {
4860///                  "$ref": "#/$defs/rhythmic-position"
4861///                },
4862///                "staff": {
4863///                  "$ref": "#/$defs/staff-number"
4864///                }
4865///              },
4866///              "additionalProperties": false
4867///            }
4868///          },
4869///          "dynamics": {
4870///            "type": "array",
4871///            "items": {
4872///              "type": "object",
4873///              "required": [
4874///                "position",
4875///                "value"
4876///              ],
4877///              "properties": {
4878///                "glyph": {
4879///                  "$ref": "#/$defs/smufl-glyph"
4880///                },
4881///                "position": {
4882///                  "$ref": "#/$defs/rhythmic-position"
4883///                },
4884///                "staff": {
4885///                  "$ref": "#/$defs/staff-number"
4886///                },
4887///                "value": {
4888///                  "type": "string"
4889///                },
4890///                "voice": {
4891///                  "$ref": "#/$defs/voice-name"
4892///                }
4893///              },
4894///              "additionalProperties": false
4895///            }
4896///          },
4897///          "ottavas": {
4898///            "type": "array",
4899///            "items": {
4900///              "type": "object",
4901///              "required": [
4902///                "end",
4903///                "position",
4904///                "value"
4905///              ],
4906///              "properties": {
4907///                "end": {
4908///                  "$ref": "#/$defs/measure-rhythmic-position"
4909///                },
4910///                "orient": {
4911///                  "$ref": "#/$defs/orientation"
4912///                },
4913///                "position": {
4914///                  "$ref": "#/$defs/rhythmic-position"
4915///                },
4916///                "staff": {
4917///                  "$ref": "#/$defs/staff-number"
4918///                },
4919///                "value": {
4920///                  "type": "integer",
4921///                  "enum": [
4922///                    1,
4923///                    2,
4924///                    -1,
4925///                    -2,
4926///                    3,
4927///                    -3
4928///                  ]
4929///                },
4930///                "voice": {
4931///                  "$ref": "#/$defs/voice-name"
4932///                }
4933///              },
4934///              "additionalProperties": false
4935///            }
4936///          },
4937///          "sequences": {
4938///            "type": "array",
4939///            "items": {
4940///              "type": "object",
4941///              "required": [
4942///                "content"
4943///              ],
4944///              "properties": {
4945///                "content": {
4946///                  "$ref": "#/$defs/sequence-content"
4947///                },
4948///                "orient": {
4949///                  "$ref": "#/$defs/orientation"
4950///                },
4951///                "staff": {
4952///                  "$ref": "#/$defs/staff-number"
4953///                },
4954///                "voice": {
4955///                  "$ref": "#/$defs/voice-name"
4956///                }
4957///              },
4958///              "additionalProperties": false
4959///            }
4960///          }
4961///        },
4962///        "additionalProperties": false
4963///      }
4964///    },
4965///    "name": {
4966///      "type": "string"
4967///    },
4968///    "shortName": {
4969///      "type": "string"
4970///    },
4971///    "smuflFont": {
4972///      "$ref": "#/$defs/smufl-font"
4973///    },
4974///    "staves": {
4975///      "type": "integer"
4976///    }
4977///  },
4978///  "additionalProperties": false
4979///}
4980/// ```
4981/// </details>
4982#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4983#[serde(deny_unknown_fields)]
4984pub struct MnxDocumentPartsItem {
4985    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4986    pub id: ::std::option::Option<Id>,
4987    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4988    pub measures: ::std::vec::Vec<MnxDocumentPartsItemMeasuresItem>,
4989    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4990    pub name: ::std::option::Option<::std::string::String>,
4991    #[serde(
4992        rename = "shortName",
4993        default,
4994        skip_serializing_if = "::std::option::Option::is_none"
4995    )]
4996    pub short_name: ::std::option::Option<::std::string::String>,
4997    #[serde(
4998        rename = "smuflFont",
4999        default,
5000        skip_serializing_if = "::std::option::Option::is_none"
5001    )]
5002    pub smufl_font: ::std::option::Option<SmuflFont>,
5003    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5004    pub staves: ::std::option::Option<i64>,
5005}
5006impl ::std::convert::From<&MnxDocumentPartsItem> for MnxDocumentPartsItem {
5007    fn from(value: &MnxDocumentPartsItem) -> Self {
5008        value.clone()
5009    }
5010}
5011impl ::std::default::Default for MnxDocumentPartsItem {
5012    fn default() -> Self {
5013        Self {
5014            id: Default::default(),
5015            measures: Default::default(),
5016            name: Default::default(),
5017            short_name: Default::default(),
5018            smufl_font: Default::default(),
5019            staves: Default::default(),
5020        }
5021    }
5022}
5023impl MnxDocumentPartsItem {
5024    pub fn builder() -> builder::MnxDocumentPartsItem {
5025        Default::default()
5026    }
5027}
5028///MnxDocumentPartsItemMeasuresItem
5029///
5030/// <details><summary>JSON schema</summary>
5031///
5032/// ```json
5033///{
5034///  "type": "object",
5035///  "required": [
5036///    "sequences"
5037///  ],
5038///  "properties": {
5039///    "beams": {
5040///      "$ref": "#/$defs/beam-list"
5041///    },
5042///    "clefs": {
5043///      "type": "array",
5044///      "items": {
5045///        "type": "object",
5046///        "required": [
5047///          "clef"
5048///        ],
5049///        "properties": {
5050///          "clef": {
5051///            "type": "object",
5052///            "required": [
5053///              "sign",
5054///              "staffPosition"
5055///            ],
5056///            "properties": {
5057///              "class": {
5058///                "$ref": "#/$defs/style-class"
5059///              },
5060///              "color": {
5061///                "type": "string"
5062///              },
5063///              "glyph": {
5064///                "$ref": "#/$defs/smufl-glyph"
5065///              },
5066///              "octave": {
5067///                "type": "integer"
5068///              },
5069///              "sign": {
5070///                "type": "string",
5071///                "enum": [
5072///                  "C",
5073///                  "F",
5074///                  "G"
5075///                ]
5076///              },
5077///              "staffPosition": {
5078///                "$ref": "#/$defs/staff-position"
5079///              }
5080///            },
5081///            "additionalProperties": false
5082///          },
5083///          "position": {
5084///            "$ref": "#/$defs/rhythmic-position"
5085///          },
5086///          "staff": {
5087///            "$ref": "#/$defs/staff-number"
5088///          }
5089///        },
5090///        "additionalProperties": false
5091///      }
5092///    },
5093///    "dynamics": {
5094///      "type": "array",
5095///      "items": {
5096///        "type": "object",
5097///        "required": [
5098///          "position",
5099///          "value"
5100///        ],
5101///        "properties": {
5102///          "glyph": {
5103///            "$ref": "#/$defs/smufl-glyph"
5104///          },
5105///          "position": {
5106///            "$ref": "#/$defs/rhythmic-position"
5107///          },
5108///          "staff": {
5109///            "$ref": "#/$defs/staff-number"
5110///          },
5111///          "value": {
5112///            "type": "string"
5113///          },
5114///          "voice": {
5115///            "$ref": "#/$defs/voice-name"
5116///          }
5117///        },
5118///        "additionalProperties": false
5119///      }
5120///    },
5121///    "ottavas": {
5122///      "type": "array",
5123///      "items": {
5124///        "type": "object",
5125///        "required": [
5126///          "end",
5127///          "position",
5128///          "value"
5129///        ],
5130///        "properties": {
5131///          "end": {
5132///            "$ref": "#/$defs/measure-rhythmic-position"
5133///          },
5134///          "orient": {
5135///            "$ref": "#/$defs/orientation"
5136///          },
5137///          "position": {
5138///            "$ref": "#/$defs/rhythmic-position"
5139///          },
5140///          "staff": {
5141///            "$ref": "#/$defs/staff-number"
5142///          },
5143///          "value": {
5144///            "type": "integer",
5145///            "enum": [
5146///              1,
5147///              2,
5148///              -1,
5149///              -2,
5150///              3,
5151///              -3
5152///            ]
5153///          },
5154///          "voice": {
5155///            "$ref": "#/$defs/voice-name"
5156///          }
5157///        },
5158///        "additionalProperties": false
5159///      }
5160///    },
5161///    "sequences": {
5162///      "type": "array",
5163///      "items": {
5164///        "type": "object",
5165///        "required": [
5166///          "content"
5167///        ],
5168///        "properties": {
5169///          "content": {
5170///            "$ref": "#/$defs/sequence-content"
5171///          },
5172///          "orient": {
5173///            "$ref": "#/$defs/orientation"
5174///          },
5175///          "staff": {
5176///            "$ref": "#/$defs/staff-number"
5177///          },
5178///          "voice": {
5179///            "$ref": "#/$defs/voice-name"
5180///          }
5181///        },
5182///        "additionalProperties": false
5183///      }
5184///    }
5185///  },
5186///  "additionalProperties": false
5187///}
5188/// ```
5189/// </details>
5190#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5191#[serde(deny_unknown_fields)]
5192pub struct MnxDocumentPartsItemMeasuresItem {
5193    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5194    pub beams: ::std::option::Option<BeamList>,
5195    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5196    pub clefs: ::std::vec::Vec<MnxDocumentPartsItemMeasuresItemClefsItem>,
5197    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5198    pub dynamics: ::std::vec::Vec<MnxDocumentPartsItemMeasuresItemDynamicsItem>,
5199    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5200    pub ottavas: ::std::vec::Vec<MnxDocumentPartsItemMeasuresItemOttavasItem>,
5201    pub sequences: ::std::vec::Vec<MnxDocumentPartsItemMeasuresItemSequencesItem>,
5202}
5203impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItem>
5204for MnxDocumentPartsItemMeasuresItem {
5205    fn from(value: &MnxDocumentPartsItemMeasuresItem) -> Self {
5206        value.clone()
5207    }
5208}
5209impl MnxDocumentPartsItemMeasuresItem {
5210    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItem {
5211        Default::default()
5212    }
5213}
5214///MnxDocumentPartsItemMeasuresItemClefsItem
5215///
5216/// <details><summary>JSON schema</summary>
5217///
5218/// ```json
5219///{
5220///  "type": "object",
5221///  "required": [
5222///    "clef"
5223///  ],
5224///  "properties": {
5225///    "clef": {
5226///      "type": "object",
5227///      "required": [
5228///        "sign",
5229///        "staffPosition"
5230///      ],
5231///      "properties": {
5232///        "class": {
5233///          "$ref": "#/$defs/style-class"
5234///        },
5235///        "color": {
5236///          "type": "string"
5237///        },
5238///        "glyph": {
5239///          "$ref": "#/$defs/smufl-glyph"
5240///        },
5241///        "octave": {
5242///          "type": "integer"
5243///        },
5244///        "sign": {
5245///          "type": "string",
5246///          "enum": [
5247///            "C",
5248///            "F",
5249///            "G"
5250///          ]
5251///        },
5252///        "staffPosition": {
5253///          "$ref": "#/$defs/staff-position"
5254///        }
5255///      },
5256///      "additionalProperties": false
5257///    },
5258///    "position": {
5259///      "$ref": "#/$defs/rhythmic-position"
5260///    },
5261///    "staff": {
5262///      "$ref": "#/$defs/staff-number"
5263///    }
5264///  },
5265///  "additionalProperties": false
5266///}
5267/// ```
5268/// </details>
5269#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5270#[serde(deny_unknown_fields)]
5271pub struct MnxDocumentPartsItemMeasuresItemClefsItem {
5272    pub clef: MnxDocumentPartsItemMeasuresItemClefsItemClef,
5273    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5274    pub position: ::std::option::Option<RhythmicPosition>,
5275    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5276    pub staff: ::std::option::Option<StaffNumber>,
5277}
5278impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemClefsItem>
5279for MnxDocumentPartsItemMeasuresItemClefsItem {
5280    fn from(value: &MnxDocumentPartsItemMeasuresItemClefsItem) -> Self {
5281        value.clone()
5282    }
5283}
5284impl MnxDocumentPartsItemMeasuresItemClefsItem {
5285    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItemClefsItem {
5286        Default::default()
5287    }
5288}
5289///MnxDocumentPartsItemMeasuresItemClefsItemClef
5290///
5291/// <details><summary>JSON schema</summary>
5292///
5293/// ```json
5294///{
5295///  "type": "object",
5296///  "required": [
5297///    "sign",
5298///    "staffPosition"
5299///  ],
5300///  "properties": {
5301///    "class": {
5302///      "$ref": "#/$defs/style-class"
5303///    },
5304///    "color": {
5305///      "type": "string"
5306///    },
5307///    "glyph": {
5308///      "$ref": "#/$defs/smufl-glyph"
5309///    },
5310///    "octave": {
5311///      "type": "integer"
5312///    },
5313///    "sign": {
5314///      "type": "string",
5315///      "enum": [
5316///        "C",
5317///        "F",
5318///        "G"
5319///      ]
5320///    },
5321///    "staffPosition": {
5322///      "$ref": "#/$defs/staff-position"
5323///    }
5324///  },
5325///  "additionalProperties": false
5326///}
5327/// ```
5328/// </details>
5329#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5330#[serde(deny_unknown_fields)]
5331pub struct MnxDocumentPartsItemMeasuresItemClefsItemClef {
5332    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5333    pub class: ::std::option::Option<StyleClass>,
5334    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5335    pub color: ::std::option::Option<::std::string::String>,
5336    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5337    pub glyph: ::std::option::Option<SmuflGlyph>,
5338    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5339    pub octave: ::std::option::Option<i64>,
5340    pub sign: MnxDocumentPartsItemMeasuresItemClefsItemClefSign,
5341    #[serde(rename = "staffPosition")]
5342    pub staff_position: StaffPosition,
5343}
5344impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemClefsItemClef>
5345for MnxDocumentPartsItemMeasuresItemClefsItemClef {
5346    fn from(value: &MnxDocumentPartsItemMeasuresItemClefsItemClef) -> Self {
5347        value.clone()
5348    }
5349}
5350impl MnxDocumentPartsItemMeasuresItemClefsItemClef {
5351    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItemClefsItemClef {
5352        Default::default()
5353    }
5354}
5355///MnxDocumentPartsItemMeasuresItemClefsItemClefSign
5356///
5357/// <details><summary>JSON schema</summary>
5358///
5359/// ```json
5360///{
5361///  "type": "string",
5362///  "enum": [
5363///    "C",
5364///    "F",
5365///    "G"
5366///  ]
5367///}
5368/// ```
5369/// </details>
5370#[derive(
5371    ::serde::Deserialize,
5372    ::serde::Serialize,
5373    Clone,
5374    Copy,
5375    Debug,
5376    Eq,
5377    Hash,
5378    Ord,
5379    PartialEq,
5380    PartialOrd
5381)]
5382pub enum MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5383    C,
5384    F,
5385    G,
5386}
5387impl ::std::convert::From<&Self> for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5388    fn from(value: &MnxDocumentPartsItemMeasuresItemClefsItemClefSign) -> Self {
5389        value.clone()
5390    }
5391}
5392impl ::std::fmt::Display for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5393    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5394        match *self {
5395            Self::C => write!(f, "C"),
5396            Self::F => write!(f, "F"),
5397            Self::G => write!(f, "G"),
5398        }
5399    }
5400}
5401impl ::std::str::FromStr for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5402    type Err = self::error::ConversionError;
5403    fn from_str(
5404        value: &str,
5405    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5406        match value {
5407            "C" => Ok(Self::C),
5408            "F" => Ok(Self::F),
5409            "G" => Ok(Self::G),
5410            _ => Err("invalid value".into()),
5411        }
5412    }
5413}
5414impl ::std::convert::TryFrom<&str>
5415for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5416    type Error = self::error::ConversionError;
5417    fn try_from(
5418        value: &str,
5419    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5420        value.parse()
5421    }
5422}
5423impl ::std::convert::TryFrom<&::std::string::String>
5424for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5425    type Error = self::error::ConversionError;
5426    fn try_from(
5427        value: &::std::string::String,
5428    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5429        value.parse()
5430    }
5431}
5432impl ::std::convert::TryFrom<::std::string::String>
5433for MnxDocumentPartsItemMeasuresItemClefsItemClefSign {
5434    type Error = self::error::ConversionError;
5435    fn try_from(
5436        value: ::std::string::String,
5437    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5438        value.parse()
5439    }
5440}
5441///MnxDocumentPartsItemMeasuresItemDynamicsItem
5442///
5443/// <details><summary>JSON schema</summary>
5444///
5445/// ```json
5446///{
5447///  "type": "object",
5448///  "required": [
5449///    "position",
5450///    "value"
5451///  ],
5452///  "properties": {
5453///    "glyph": {
5454///      "$ref": "#/$defs/smufl-glyph"
5455///    },
5456///    "position": {
5457///      "$ref": "#/$defs/rhythmic-position"
5458///    },
5459///    "staff": {
5460///      "$ref": "#/$defs/staff-number"
5461///    },
5462///    "value": {
5463///      "type": "string"
5464///    },
5465///    "voice": {
5466///      "$ref": "#/$defs/voice-name"
5467///    }
5468///  },
5469///  "additionalProperties": false
5470///}
5471/// ```
5472/// </details>
5473#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5474#[serde(deny_unknown_fields)]
5475pub struct MnxDocumentPartsItemMeasuresItemDynamicsItem {
5476    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5477    pub glyph: ::std::option::Option<SmuflGlyph>,
5478    pub position: RhythmicPosition,
5479    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5480    pub staff: ::std::option::Option<StaffNumber>,
5481    pub value: ::std::string::String,
5482    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5483    pub voice: ::std::option::Option<VoiceName>,
5484}
5485impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemDynamicsItem>
5486for MnxDocumentPartsItemMeasuresItemDynamicsItem {
5487    fn from(value: &MnxDocumentPartsItemMeasuresItemDynamicsItem) -> Self {
5488        value.clone()
5489    }
5490}
5491impl MnxDocumentPartsItemMeasuresItemDynamicsItem {
5492    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItemDynamicsItem {
5493        Default::default()
5494    }
5495}
5496///MnxDocumentPartsItemMeasuresItemOttavasItem
5497///
5498/// <details><summary>JSON schema</summary>
5499///
5500/// ```json
5501///{
5502///  "type": "object",
5503///  "required": [
5504///    "end",
5505///    "position",
5506///    "value"
5507///  ],
5508///  "properties": {
5509///    "end": {
5510///      "$ref": "#/$defs/measure-rhythmic-position"
5511///    },
5512///    "orient": {
5513///      "$ref": "#/$defs/orientation"
5514///    },
5515///    "position": {
5516///      "$ref": "#/$defs/rhythmic-position"
5517///    },
5518///    "staff": {
5519///      "$ref": "#/$defs/staff-number"
5520///    },
5521///    "value": {
5522///      "type": "integer",
5523///      "enum": [
5524///        1,
5525///        2,
5526///        -1,
5527///        -2,
5528///        3,
5529///        -3
5530///      ]
5531///    },
5532///    "voice": {
5533///      "$ref": "#/$defs/voice-name"
5534///    }
5535///  },
5536///  "additionalProperties": false
5537///}
5538/// ```
5539/// </details>
5540#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5541#[serde(deny_unknown_fields)]
5542pub struct MnxDocumentPartsItemMeasuresItemOttavasItem {
5543    pub end: MeasureRhythmicPosition,
5544    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5545    pub orient: ::std::option::Option<Orientation>,
5546    pub position: RhythmicPosition,
5547    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5548    pub staff: ::std::option::Option<StaffNumber>,
5549    pub value: MnxDocumentPartsItemMeasuresItemOttavasItemValue,
5550    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5551    pub voice: ::std::option::Option<VoiceName>,
5552}
5553impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemOttavasItem>
5554for MnxDocumentPartsItemMeasuresItemOttavasItem {
5555    fn from(value: &MnxDocumentPartsItemMeasuresItemOttavasItem) -> Self {
5556        value.clone()
5557    }
5558}
5559impl MnxDocumentPartsItemMeasuresItemOttavasItem {
5560    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItemOttavasItem {
5561        Default::default()
5562    }
5563}
5564///MnxDocumentPartsItemMeasuresItemOttavasItemValue
5565///
5566/// <details><summary>JSON schema</summary>
5567///
5568/// ```json
5569///{
5570///  "type": "integer",
5571///  "enum": [
5572///    1,
5573///    2,
5574///    -1,
5575///    -2,
5576///    3,
5577///    -3
5578///  ]
5579///}
5580/// ```
5581/// </details>
5582#[derive(::serde::Serialize, Clone, Debug)]
5583#[serde(transparent)]
5584pub struct MnxDocumentPartsItemMeasuresItemOttavasItemValue(i64);
5585impl ::std::ops::Deref for MnxDocumentPartsItemMeasuresItemOttavasItemValue {
5586    type Target = i64;
5587    fn deref(&self) -> &i64 {
5588        &self.0
5589    }
5590}
5591impl ::std::convert::From<MnxDocumentPartsItemMeasuresItemOttavasItemValue> for i64 {
5592    fn from(value: MnxDocumentPartsItemMeasuresItemOttavasItemValue) -> Self {
5593        value.0
5594    }
5595}
5596impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemOttavasItemValue>
5597for MnxDocumentPartsItemMeasuresItemOttavasItemValue {
5598    fn from(value: &MnxDocumentPartsItemMeasuresItemOttavasItemValue) -> Self {
5599        value.clone()
5600    }
5601}
5602impl ::std::convert::TryFrom<i64> for MnxDocumentPartsItemMeasuresItemOttavasItemValue {
5603    type Error = self::error::ConversionError;
5604    fn try_from(
5605        value: i64,
5606    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5607        if ![1_i64, 2_i64, -1_i64, -2_i64, 3_i64, -3_i64].contains(&value) {
5608            Err("invalid value".into())
5609        } else {
5610            Ok(Self(value))
5611        }
5612    }
5613}
5614impl<'de> ::serde::Deserialize<'de>
5615for MnxDocumentPartsItemMeasuresItemOttavasItemValue {
5616    fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5617    where
5618        D: ::serde::Deserializer<'de>,
5619    {
5620        Self::try_from(<i64>::deserialize(deserializer)?)
5621            .map_err(|e| { <D::Error as ::serde::de::Error>::custom(e.to_string()) })
5622    }
5623}
5624///MnxDocumentPartsItemMeasuresItemSequencesItem
5625///
5626/// <details><summary>JSON schema</summary>
5627///
5628/// ```json
5629///{
5630///  "type": "object",
5631///  "required": [
5632///    "content"
5633///  ],
5634///  "properties": {
5635///    "content": {
5636///      "$ref": "#/$defs/sequence-content"
5637///    },
5638///    "orient": {
5639///      "$ref": "#/$defs/orientation"
5640///    },
5641///    "staff": {
5642///      "$ref": "#/$defs/staff-number"
5643///    },
5644///    "voice": {
5645///      "$ref": "#/$defs/voice-name"
5646///    }
5647///  },
5648///  "additionalProperties": false
5649///}
5650/// ```
5651/// </details>
5652#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5653#[serde(deny_unknown_fields)]
5654pub struct MnxDocumentPartsItemMeasuresItemSequencesItem {
5655    pub content: SequenceContent,
5656    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5657    pub orient: ::std::option::Option<Orientation>,
5658    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5659    pub staff: ::std::option::Option<StaffNumber>,
5660    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5661    pub voice: ::std::option::Option<VoiceName>,
5662}
5663impl ::std::convert::From<&MnxDocumentPartsItemMeasuresItemSequencesItem>
5664for MnxDocumentPartsItemMeasuresItemSequencesItem {
5665    fn from(value: &MnxDocumentPartsItemMeasuresItemSequencesItem) -> Self {
5666        value.clone()
5667    }
5668}
5669impl MnxDocumentPartsItemMeasuresItemSequencesItem {
5670    pub fn builder() -> builder::MnxDocumentPartsItemMeasuresItemSequencesItem {
5671        Default::default()
5672    }
5673}
5674///MnxDocumentScoresItem
5675///
5676/// <details><summary>JSON schema</summary>
5677///
5678/// ```json
5679///{
5680///  "type": "object",
5681///  "required": [
5682///    "name"
5683///  ],
5684///  "properties": {
5685///    "layout": {
5686///      "$ref": "#/$defs/id"
5687///    },
5688///    "multimeasureRests": {
5689///      "type": "array",
5690///      "items": {
5691///        "type": "object",
5692///        "required": [
5693///          "duration",
5694///          "start"
5695///        ],
5696///        "properties": {
5697///          "duration": {
5698///            "type": "integer"
5699///          },
5700///          "label": {
5701///            "$ref": "#/$defs/string"
5702///          },
5703///          "start": {
5704///            "$ref": "#/$defs/measure-number"
5705///          }
5706///        },
5707///        "additionalProperties": false
5708///      }
5709///    },
5710///    "name": {
5711///      "type": "string"
5712///    },
5713///    "pages": {
5714///      "type": "array",
5715///      "items": {
5716///        "type": "object",
5717///        "required": [
5718///          "systems"
5719///        ],
5720///        "properties": {
5721///          "layout": {
5722///            "$ref": "#/$defs/id"
5723///          },
5724///          "systems": {
5725///            "type": "array",
5726///            "items": {
5727///              "type": "object",
5728///              "required": [
5729///                "measure"
5730///              ],
5731///              "properties": {
5732///                "layout": {
5733///                  "$ref": "#/$defs/id"
5734///                },
5735///                "layoutChanges": {
5736///                  "type": "array",
5737///                  "items": {
5738///                    "type": "object",
5739///                    "required": [
5740///                      "layout",
5741///                      "location"
5742///                    ],
5743///                    "properties": {
5744///                      "layout": {
5745///                        "$ref": "#/$defs/id"
5746///                      },
5747///                      "location": {
5748///                        "$ref": "#/$defs/measure-rhythmic-position"
5749///                      }
5750///                    },
5751///                    "additionalProperties": false
5752///                  }
5753///                },
5754///                "measure": {
5755///                  "$ref": "#/$defs/measure-number"
5756///                }
5757///              },
5758///              "additionalProperties": false
5759///            }
5760///          }
5761///        },
5762///        "additionalProperties": false
5763///      }
5764///    }
5765///  },
5766///  "additionalProperties": false
5767///}
5768/// ```
5769/// </details>
5770#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5771#[serde(deny_unknown_fields)]
5772pub struct MnxDocumentScoresItem {
5773    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5774    pub layout: ::std::option::Option<Id>,
5775    #[serde(
5776        rename = "multimeasureRests",
5777        default,
5778        skip_serializing_if = "::std::vec::Vec::is_empty"
5779    )]
5780    pub multimeasure_rests: ::std::vec::Vec<MnxDocumentScoresItemMultimeasureRestsItem>,
5781    pub name: ::std::string::String,
5782    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5783    pub pages: ::std::vec::Vec<MnxDocumentScoresItemPagesItem>,
5784}
5785impl ::std::convert::From<&MnxDocumentScoresItem> for MnxDocumentScoresItem {
5786    fn from(value: &MnxDocumentScoresItem) -> Self {
5787        value.clone()
5788    }
5789}
5790impl MnxDocumentScoresItem {
5791    pub fn builder() -> builder::MnxDocumentScoresItem {
5792        Default::default()
5793    }
5794}
5795///MnxDocumentScoresItemMultimeasureRestsItem
5796///
5797/// <details><summary>JSON schema</summary>
5798///
5799/// ```json
5800///{
5801///  "type": "object",
5802///  "required": [
5803///    "duration",
5804///    "start"
5805///  ],
5806///  "properties": {
5807///    "duration": {
5808///      "type": "integer"
5809///    },
5810///    "label": {
5811///      "$ref": "#/$defs/string"
5812///    },
5813///    "start": {
5814///      "$ref": "#/$defs/measure-number"
5815///    }
5816///  },
5817///  "additionalProperties": false
5818///}
5819/// ```
5820/// </details>
5821#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5822#[serde(deny_unknown_fields)]
5823pub struct MnxDocumentScoresItemMultimeasureRestsItem {
5824    pub duration: i64,
5825    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5826    pub label: ::std::option::Option<String>,
5827    pub start: MeasureNumber,
5828}
5829impl ::std::convert::From<&MnxDocumentScoresItemMultimeasureRestsItem>
5830for MnxDocumentScoresItemMultimeasureRestsItem {
5831    fn from(value: &MnxDocumentScoresItemMultimeasureRestsItem) -> Self {
5832        value.clone()
5833    }
5834}
5835impl MnxDocumentScoresItemMultimeasureRestsItem {
5836    pub fn builder() -> builder::MnxDocumentScoresItemMultimeasureRestsItem {
5837        Default::default()
5838    }
5839}
5840///MnxDocumentScoresItemPagesItem
5841///
5842/// <details><summary>JSON schema</summary>
5843///
5844/// ```json
5845///{
5846///  "type": "object",
5847///  "required": [
5848///    "systems"
5849///  ],
5850///  "properties": {
5851///    "layout": {
5852///      "$ref": "#/$defs/id"
5853///    },
5854///    "systems": {
5855///      "type": "array",
5856///      "items": {
5857///        "type": "object",
5858///        "required": [
5859///          "measure"
5860///        ],
5861///        "properties": {
5862///          "layout": {
5863///            "$ref": "#/$defs/id"
5864///          },
5865///          "layoutChanges": {
5866///            "type": "array",
5867///            "items": {
5868///              "type": "object",
5869///              "required": [
5870///                "layout",
5871///                "location"
5872///              ],
5873///              "properties": {
5874///                "layout": {
5875///                  "$ref": "#/$defs/id"
5876///                },
5877///                "location": {
5878///                  "$ref": "#/$defs/measure-rhythmic-position"
5879///                }
5880///              },
5881///              "additionalProperties": false
5882///            }
5883///          },
5884///          "measure": {
5885///            "$ref": "#/$defs/measure-number"
5886///          }
5887///        },
5888///        "additionalProperties": false
5889///      }
5890///    }
5891///  },
5892///  "additionalProperties": false
5893///}
5894/// ```
5895/// </details>
5896#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5897#[serde(deny_unknown_fields)]
5898pub struct MnxDocumentScoresItemPagesItem {
5899    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5900    pub layout: ::std::option::Option<Id>,
5901    pub systems: ::std::vec::Vec<MnxDocumentScoresItemPagesItemSystemsItem>,
5902}
5903impl ::std::convert::From<&MnxDocumentScoresItemPagesItem>
5904for MnxDocumentScoresItemPagesItem {
5905    fn from(value: &MnxDocumentScoresItemPagesItem) -> Self {
5906        value.clone()
5907    }
5908}
5909impl MnxDocumentScoresItemPagesItem {
5910    pub fn builder() -> builder::MnxDocumentScoresItemPagesItem {
5911        Default::default()
5912    }
5913}
5914///MnxDocumentScoresItemPagesItemSystemsItem
5915///
5916/// <details><summary>JSON schema</summary>
5917///
5918/// ```json
5919///{
5920///  "type": "object",
5921///  "required": [
5922///    "measure"
5923///  ],
5924///  "properties": {
5925///    "layout": {
5926///      "$ref": "#/$defs/id"
5927///    },
5928///    "layoutChanges": {
5929///      "type": "array",
5930///      "items": {
5931///        "type": "object",
5932///        "required": [
5933///          "layout",
5934///          "location"
5935///        ],
5936///        "properties": {
5937///          "layout": {
5938///            "$ref": "#/$defs/id"
5939///          },
5940///          "location": {
5941///            "$ref": "#/$defs/measure-rhythmic-position"
5942///          }
5943///        },
5944///        "additionalProperties": false
5945///      }
5946///    },
5947///    "measure": {
5948///      "$ref": "#/$defs/measure-number"
5949///    }
5950///  },
5951///  "additionalProperties": false
5952///}
5953/// ```
5954/// </details>
5955#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5956#[serde(deny_unknown_fields)]
5957pub struct MnxDocumentScoresItemPagesItemSystemsItem {
5958    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5959    pub layout: ::std::option::Option<Id>,
5960    #[serde(
5961        rename = "layoutChanges",
5962        default,
5963        skip_serializing_if = "::std::vec::Vec::is_empty"
5964    )]
5965    pub layout_changes: ::std::vec::Vec<
5966        MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
5967    >,
5968    pub measure: MeasureNumber,
5969}
5970impl ::std::convert::From<&MnxDocumentScoresItemPagesItemSystemsItem>
5971for MnxDocumentScoresItemPagesItemSystemsItem {
5972    fn from(value: &MnxDocumentScoresItemPagesItemSystemsItem) -> Self {
5973        value.clone()
5974    }
5975}
5976impl MnxDocumentScoresItemPagesItemSystemsItem {
5977    pub fn builder() -> builder::MnxDocumentScoresItemPagesItemSystemsItem {
5978        Default::default()
5979    }
5980}
5981///MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem
5982///
5983/// <details><summary>JSON schema</summary>
5984///
5985/// ```json
5986///{
5987///  "type": "object",
5988///  "required": [
5989///    "layout",
5990///    "location"
5991///  ],
5992///  "properties": {
5993///    "layout": {
5994///      "$ref": "#/$defs/id"
5995///    },
5996///    "location": {
5997///      "$ref": "#/$defs/measure-rhythmic-position"
5998///    }
5999///  },
6000///  "additionalProperties": false
6001///}
6002/// ```
6003/// </details>
6004#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6005#[serde(deny_unknown_fields)]
6006pub struct MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
6007    pub layout: Id,
6008    pub location: MeasureRhythmicPosition,
6009}
6010impl ::std::convert::From<&MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem>
6011for MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
6012    fn from(value: &MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem) -> Self {
6013        value.clone()
6014    }
6015}
6016impl MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
6017    pub fn builder() -> builder::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
6018        Default::default()
6019    }
6020}
6021///NoteValue
6022///
6023/// <details><summary>JSON schema</summary>
6024///
6025/// ```json
6026///{
6027///  "type": "object",
6028///  "required": [
6029///    "base"
6030///  ],
6031///  "properties": {
6032///    "base": {
6033///      "type": "string",
6034///      "enum": [
6035///        "duplexMaxima",
6036///        "maxima",
6037///        "longa",
6038///        "breve",
6039///        "whole",
6040///        "half",
6041///        "quarter",
6042///        "eighth",
6043///        "16th",
6044///        "32nd",
6045///        "64th",
6046///        "128th",
6047///        "256th",
6048///        "512th",
6049///        "1024th",
6050///        "2048th",
6051///        "4096th"
6052///      ]
6053///    },
6054///    "dots": {
6055///      "$ref": "#/$defs/positive-integer"
6056///    }
6057///  },
6058///  "additionalProperties": false
6059///}
6060/// ```
6061/// </details>
6062#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6063#[serde(deny_unknown_fields)]
6064pub struct NoteValue {
6065    pub base: NoteValueBase,
6066    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6067    pub dots: ::std::option::Option<PositiveInteger>,
6068}
6069impl ::std::convert::From<&NoteValue> for NoteValue {
6070    fn from(value: &NoteValue) -> Self {
6071        value.clone()
6072    }
6073}
6074impl NoteValue {
6075    pub fn builder() -> builder::NoteValue {
6076        Default::default()
6077    }
6078}
6079///NoteValueBase
6080///
6081/// <details><summary>JSON schema</summary>
6082///
6083/// ```json
6084///{
6085///  "type": "string",
6086///  "enum": [
6087///    "duplexMaxima",
6088///    "maxima",
6089///    "longa",
6090///    "breve",
6091///    "whole",
6092///    "half",
6093///    "quarter",
6094///    "eighth",
6095///    "16th",
6096///    "32nd",
6097///    "64th",
6098///    "128th",
6099///    "256th",
6100///    "512th",
6101///    "1024th",
6102///    "2048th",
6103///    "4096th"
6104///  ]
6105///}
6106/// ```
6107/// </details>
6108#[derive(
6109    ::serde::Deserialize,
6110    ::serde::Serialize,
6111    Clone,
6112    Copy,
6113    Debug,
6114    Eq,
6115    Hash,
6116    Ord,
6117    PartialEq,
6118    PartialOrd
6119)]
6120pub enum NoteValueBase {
6121    #[serde(rename = "duplexMaxima")]
6122    DuplexMaxima,
6123    #[serde(rename = "maxima")]
6124    Maxima,
6125    #[serde(rename = "longa")]
6126    Longa,
6127    #[serde(rename = "breve")]
6128    Breve,
6129    #[serde(rename = "whole")]
6130    Whole,
6131    #[serde(rename = "half")]
6132    Half,
6133    #[serde(rename = "quarter")]
6134    Quarter,
6135    #[serde(rename = "eighth")]
6136    Eighth,
6137    #[serde(rename = "16th")]
6138    _16th,
6139    #[serde(rename = "32nd")]
6140    _32nd,
6141    #[serde(rename = "64th")]
6142    _64th,
6143    #[serde(rename = "128th")]
6144    _128th,
6145    #[serde(rename = "256th")]
6146    _256th,
6147    #[serde(rename = "512th")]
6148    _512th,
6149    #[serde(rename = "1024th")]
6150    _1024th,
6151    #[serde(rename = "2048th")]
6152    _2048th,
6153    #[serde(rename = "4096th")]
6154    _4096th,
6155}
6156impl ::std::convert::From<&Self> for NoteValueBase {
6157    fn from(value: &NoteValueBase) -> Self {
6158        value.clone()
6159    }
6160}
6161impl ::std::fmt::Display for NoteValueBase {
6162    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6163        match *self {
6164            Self::DuplexMaxima => write!(f, "duplexMaxima"),
6165            Self::Maxima => write!(f, "maxima"),
6166            Self::Longa => write!(f, "longa"),
6167            Self::Breve => write!(f, "breve"),
6168            Self::Whole => write!(f, "whole"),
6169            Self::Half => write!(f, "half"),
6170            Self::Quarter => write!(f, "quarter"),
6171            Self::Eighth => write!(f, "eighth"),
6172            Self::_16th => write!(f, "16th"),
6173            Self::_32nd => write!(f, "32nd"),
6174            Self::_64th => write!(f, "64th"),
6175            Self::_128th => write!(f, "128th"),
6176            Self::_256th => write!(f, "256th"),
6177            Self::_512th => write!(f, "512th"),
6178            Self::_1024th => write!(f, "1024th"),
6179            Self::_2048th => write!(f, "2048th"),
6180            Self::_4096th => write!(f, "4096th"),
6181        }
6182    }
6183}
6184impl ::std::str::FromStr for NoteValueBase {
6185    type Err = self::error::ConversionError;
6186    fn from_str(
6187        value: &str,
6188    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6189        match value {
6190            "duplexMaxima" => Ok(Self::DuplexMaxima),
6191            "maxima" => Ok(Self::Maxima),
6192            "longa" => Ok(Self::Longa),
6193            "breve" => Ok(Self::Breve),
6194            "whole" => Ok(Self::Whole),
6195            "half" => Ok(Self::Half),
6196            "quarter" => Ok(Self::Quarter),
6197            "eighth" => Ok(Self::Eighth),
6198            "16th" => Ok(Self::_16th),
6199            "32nd" => Ok(Self::_32nd),
6200            "64th" => Ok(Self::_64th),
6201            "128th" => Ok(Self::_128th),
6202            "256th" => Ok(Self::_256th),
6203            "512th" => Ok(Self::_512th),
6204            "1024th" => Ok(Self::_1024th),
6205            "2048th" => Ok(Self::_2048th),
6206            "4096th" => Ok(Self::_4096th),
6207            _ => Err("invalid value".into()),
6208        }
6209    }
6210}
6211impl ::std::convert::TryFrom<&str> for NoteValueBase {
6212    type Error = self::error::ConversionError;
6213    fn try_from(
6214        value: &str,
6215    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6216        value.parse()
6217    }
6218}
6219impl ::std::convert::TryFrom<&::std::string::String> for NoteValueBase {
6220    type Error = self::error::ConversionError;
6221    fn try_from(
6222        value: &::std::string::String,
6223    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6224        value.parse()
6225    }
6226}
6227impl ::std::convert::TryFrom<::std::string::String> for NoteValueBase {
6228    type Error = self::error::ConversionError;
6229    fn try_from(
6230        value: ::std::string::String,
6231    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6232        value.parse()
6233    }
6234}
6235///NoteValueQuantity
6236///
6237/// <details><summary>JSON schema</summary>
6238///
6239/// ```json
6240///{
6241///  "type": "object",
6242///  "required": [
6243///    "duration",
6244///    "multiple"
6245///  ],
6246///  "properties": {
6247///    "duration": {
6248///      "$ref": "#/$defs/note-value"
6249///    },
6250///    "multiple": {
6251///      "$ref": "#/$defs/positive-integer"
6252///    }
6253///  },
6254///  "additionalProperties": false
6255///}
6256/// ```
6257/// </details>
6258#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6259#[serde(deny_unknown_fields)]
6260pub struct NoteValueQuantity {
6261    pub duration: NoteValue,
6262    pub multiple: PositiveInteger,
6263}
6264impl ::std::convert::From<&NoteValueQuantity> for NoteValueQuantity {
6265    fn from(value: &NoteValueQuantity) -> Self {
6266        value.clone()
6267    }
6268}
6269impl NoteValueQuantity {
6270    pub fn builder() -> builder::NoteValueQuantity {
6271        Default::default()
6272    }
6273}
6274///Orientation
6275///
6276/// <details><summary>JSON schema</summary>
6277///
6278/// ```json
6279///{
6280///  "type": "string"
6281///}
6282/// ```
6283/// </details>
6284#[derive(
6285    ::serde::Deserialize,
6286    ::serde::Serialize,
6287    Clone,
6288    Debug,
6289    Eq,
6290    Hash,
6291    Ord,
6292    PartialEq,
6293    PartialOrd
6294)]
6295#[serde(transparent)]
6296pub struct Orientation(pub ::std::string::String);
6297impl ::std::ops::Deref for Orientation {
6298    type Target = ::std::string::String;
6299    fn deref(&self) -> &::std::string::String {
6300        &self.0
6301    }
6302}
6303impl ::std::convert::From<Orientation> for ::std::string::String {
6304    fn from(value: Orientation) -> Self {
6305        value.0
6306    }
6307}
6308impl ::std::convert::From<&Orientation> for Orientation {
6309    fn from(value: &Orientation) -> Self {
6310        value.clone()
6311    }
6312}
6313impl ::std::convert::From<::std::string::String> for Orientation {
6314    fn from(value: ::std::string::String) -> Self {
6315        Self(value)
6316    }
6317}
6318impl ::std::str::FromStr for Orientation {
6319    type Err = ::std::convert::Infallible;
6320    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6321        Ok(Self(value.to_string()))
6322    }
6323}
6324impl ::std::fmt::Display for Orientation {
6325    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6326        self.0.fmt(f)
6327    }
6328}
6329///PositiveInteger
6330///
6331/// <details><summary>JSON schema</summary>
6332///
6333/// ```json
6334///{
6335///  "type": "integer"
6336///}
6337/// ```
6338/// </details>
6339#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6340#[serde(transparent)]
6341pub struct PositiveInteger(pub i64);
6342impl ::std::ops::Deref for PositiveInteger {
6343    type Target = i64;
6344    fn deref(&self) -> &i64 {
6345        &self.0
6346    }
6347}
6348impl ::std::convert::From<PositiveInteger> for i64 {
6349    fn from(value: PositiveInteger) -> Self {
6350        value.0
6351    }
6352}
6353impl ::std::convert::From<&PositiveInteger> for PositiveInteger {
6354    fn from(value: &PositiveInteger) -> Self {
6355        value.clone()
6356    }
6357}
6358impl ::std::convert::From<i64> for PositiveInteger {
6359    fn from(value: i64) -> Self {
6360        Self(value)
6361    }
6362}
6363impl ::std::str::FromStr for PositiveInteger {
6364    type Err = <i64 as ::std::str::FromStr>::Err;
6365    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6366        Ok(Self(value.parse()?))
6367    }
6368}
6369impl ::std::convert::TryFrom<&str> for PositiveInteger {
6370    type Error = <i64 as ::std::str::FromStr>::Err;
6371    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
6372        value.parse()
6373    }
6374}
6375impl ::std::convert::TryFrom<&String> for PositiveInteger {
6376    type Error = <i64 as ::std::str::FromStr>::Err;
6377    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
6378        value.parse()
6379    }
6380}
6381impl ::std::convert::TryFrom<String> for PositiveInteger {
6382    type Error = <i64 as ::std::str::FromStr>::Err;
6383    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
6384        value.parse()
6385    }
6386}
6387impl ::std::fmt::Display for PositiveInteger {
6388    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6389        self.0.fmt(f)
6390    }
6391}
6392///RhythmicPosition
6393///
6394/// <details><summary>JSON schema</summary>
6395///
6396/// ```json
6397///{
6398///  "type": "object",
6399///  "required": [
6400///    "fraction"
6401///  ],
6402///  "properties": {
6403///    "fraction": {
6404///      "$ref": "#/$defs/fraction"
6405///    },
6406///    "graceIndex": {
6407///      "$ref": "#/$defs/integer-unsigned"
6408///    }
6409///  },
6410///  "additionalProperties": false
6411///}
6412/// ```
6413/// </details>
6414#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6415#[serde(deny_unknown_fields)]
6416pub struct RhythmicPosition {
6417    pub fraction: Fraction,
6418    #[serde(
6419        rename = "graceIndex",
6420        default,
6421        skip_serializing_if = "::std::option::Option::is_none"
6422    )]
6423    pub grace_index: ::std::option::Option<IntegerUnsigned>,
6424}
6425impl ::std::convert::From<&RhythmicPosition> for RhythmicPosition {
6426    fn from(value: &RhythmicPosition) -> Self {
6427        value.clone()
6428    }
6429}
6430impl RhythmicPosition {
6431    pub fn builder() -> builder::RhythmicPosition {
6432        Default::default()
6433    }
6434}
6435///SequenceContent
6436///
6437/// <details><summary>JSON schema</summary>
6438///
6439/// ```json
6440///{
6441///  "type": "array",
6442///  "items": {
6443///    "anyOf": [
6444///      {
6445///        "$ref": "#/$defs/event"
6446///      },
6447///      {
6448///        "type": "object",
6449///        "required": [
6450///          "content",
6451///          "type"
6452///        ],
6453///        "properties": {
6454///          "class": {
6455///            "$ref": "#/$defs/style-class"
6456///          },
6457///          "color": {
6458///            "$ref": "#/$defs/color"
6459///          },
6460///          "content": {
6461///            "type": "array",
6462///            "items": {
6463///              "$ref": "#/$defs/event"
6464///            }
6465///          },
6466///          "graceType": {
6467///            "type": "string",
6468///            "enum": [
6469///              "makeTime",
6470///              "stealFollowing",
6471///              "stealPrevious"
6472///            ]
6473///          },
6474///          "slash": {
6475///            "type": "boolean"
6476///          },
6477///          "type": {
6478///            "type": "string",
6479///            "const": "grace"
6480///          }
6481///        },
6482///        "additionalProperties": false
6483///      },
6484///      {
6485///        "type": "object",
6486///        "required": [
6487///          "content",
6488///          "inner",
6489///          "outer",
6490///          "type"
6491///        ],
6492///        "properties": {
6493///          "bracket": {
6494///            "type": "string",
6495///            "enum": [
6496///              "yes",
6497///              "no",
6498///              "auto"
6499///            ]
6500///          },
6501///          "content": {
6502///            "$ref": "#/$defs/sequence-content"
6503///          },
6504///          "inner": {
6505///            "$ref": "#/$defs/note-value-quantity"
6506///          },
6507///          "orient": {
6508///            "$ref": "#/$defs/orientation"
6509///          },
6510///          "outer": {
6511///            "$ref": "#/$defs/note-value-quantity"
6512///          },
6513///          "showNumber": {
6514///            "$ref": "#/$defs/tuplet-display-setting"
6515///          },
6516///          "showValue": {
6517///            "$ref": "#/$defs/tuplet-display-setting"
6518///          },
6519///          "staff": {
6520///            "$ref": "#/$defs/staff-number"
6521///          },
6522///          "type": {
6523///            "type": "string",
6524///            "const": "tuplet"
6525///          }
6526///        },
6527///        "additionalProperties": false
6528///      },
6529///      {
6530///        "type": "object",
6531///        "required": [
6532///          "duration",
6533///          "type"
6534///        ],
6535///        "properties": {
6536///          "duration": {
6537///            "$ref": "#/$defs/fraction"
6538///          },
6539///          "type": {
6540///            "type": "string",
6541///            "const": "space"
6542///          }
6543///        },
6544///        "additionalProperties": false
6545///      }
6546///    ]
6547///  }
6548///}
6549/// ```
6550/// </details>
6551#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6552#[serde(transparent)]
6553pub struct SequenceContent(pub ::std::vec::Vec<SequenceContentItem>);
6554impl ::std::ops::Deref for SequenceContent {
6555    type Target = ::std::vec::Vec<SequenceContentItem>;
6556    fn deref(&self) -> &::std::vec::Vec<SequenceContentItem> {
6557        &self.0
6558    }
6559}
6560impl ::std::convert::From<SequenceContent> for ::std::vec::Vec<SequenceContentItem> {
6561    fn from(value: SequenceContent) -> Self {
6562        value.0
6563    }
6564}
6565impl ::std::convert::From<&SequenceContent> for SequenceContent {
6566    fn from(value: &SequenceContent) -> Self {
6567        value.clone()
6568    }
6569}
6570impl ::std::convert::From<::std::vec::Vec<SequenceContentItem>> for SequenceContent {
6571    fn from(value: ::std::vec::Vec<SequenceContentItem>) -> Self {
6572        Self(value)
6573    }
6574}
6575///SequenceContentItem
6576///
6577/// <details><summary>JSON schema</summary>
6578///
6579/// ```json
6580///{
6581///  "anyOf": [
6582///    {
6583///      "$ref": "#/$defs/event"
6584///    },
6585///    {
6586///      "type": "object",
6587///      "required": [
6588///        "content",
6589///        "type"
6590///      ],
6591///      "properties": {
6592///        "class": {
6593///          "$ref": "#/$defs/style-class"
6594///        },
6595///        "color": {
6596///          "$ref": "#/$defs/color"
6597///        },
6598///        "content": {
6599///          "type": "array",
6600///          "items": {
6601///            "$ref": "#/$defs/event"
6602///          }
6603///        },
6604///        "graceType": {
6605///          "type": "string",
6606///          "enum": [
6607///            "makeTime",
6608///            "stealFollowing",
6609///            "stealPrevious"
6610///          ]
6611///        },
6612///        "slash": {
6613///          "type": "boolean"
6614///        },
6615///        "type": {
6616///          "type": "string",
6617///          "const": "grace"
6618///        }
6619///      },
6620///      "additionalProperties": false
6621///    },
6622///    {
6623///      "type": "object",
6624///      "required": [
6625///        "content",
6626///        "inner",
6627///        "outer",
6628///        "type"
6629///      ],
6630///      "properties": {
6631///        "bracket": {
6632///          "type": "string",
6633///          "enum": [
6634///            "yes",
6635///            "no",
6636///            "auto"
6637///          ]
6638///        },
6639///        "content": {
6640///          "$ref": "#/$defs/sequence-content"
6641///        },
6642///        "inner": {
6643///          "$ref": "#/$defs/note-value-quantity"
6644///        },
6645///        "orient": {
6646///          "$ref": "#/$defs/orientation"
6647///        },
6648///        "outer": {
6649///          "$ref": "#/$defs/note-value-quantity"
6650///        },
6651///        "showNumber": {
6652///          "$ref": "#/$defs/tuplet-display-setting"
6653///        },
6654///        "showValue": {
6655///          "$ref": "#/$defs/tuplet-display-setting"
6656///        },
6657///        "staff": {
6658///          "$ref": "#/$defs/staff-number"
6659///        },
6660///        "type": {
6661///          "type": "string",
6662///          "const": "tuplet"
6663///        }
6664///      },
6665///      "additionalProperties": false
6666///    },
6667///    {
6668///      "type": "object",
6669///      "required": [
6670///        "duration",
6671///        "type"
6672///      ],
6673///      "properties": {
6674///        "duration": {
6675///          "$ref": "#/$defs/fraction"
6676///        },
6677///        "type": {
6678///          "type": "string",
6679///          "const": "space"
6680///        }
6681///      },
6682///      "additionalProperties": false
6683///    }
6684///  ]
6685///}
6686/// ```
6687/// </details>
6688#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6689pub struct SequenceContentItem {
6690    #[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
6691    pub subtype_0: ::std::option::Option<Event>,
6692    #[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
6693    pub subtype_1: ::std::option::Option<SequenceContentItemSubtype1>,
6694    #[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
6695    pub subtype_2: ::std::option::Option<SequenceContentItemSubtype2>,
6696    #[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
6697    pub subtype_3: ::std::option::Option<SequenceContentItemSubtype3>,
6698}
6699impl ::std::convert::From<&SequenceContentItem> for SequenceContentItem {
6700    fn from(value: &SequenceContentItem) -> Self {
6701        value.clone()
6702    }
6703}
6704impl ::std::default::Default for SequenceContentItem {
6705    fn default() -> Self {
6706        Self {
6707            subtype_0: Default::default(),
6708            subtype_1: Default::default(),
6709            subtype_2: Default::default(),
6710            subtype_3: Default::default(),
6711        }
6712    }
6713}
6714impl SequenceContentItem {
6715    pub fn builder() -> builder::SequenceContentItem {
6716        Default::default()
6717    }
6718}
6719///SequenceContentItemSubtype1
6720///
6721/// <details><summary>JSON schema</summary>
6722///
6723/// ```json
6724///{
6725///  "type": "object",
6726///  "required": [
6727///    "content",
6728///    "type"
6729///  ],
6730///  "properties": {
6731///    "class": {
6732///      "$ref": "#/$defs/style-class"
6733///    },
6734///    "color": {
6735///      "$ref": "#/$defs/color"
6736///    },
6737///    "content": {
6738///      "type": "array",
6739///      "items": {
6740///        "$ref": "#/$defs/event"
6741///      }
6742///    },
6743///    "graceType": {
6744///      "type": "string",
6745///      "enum": [
6746///        "makeTime",
6747///        "stealFollowing",
6748///        "stealPrevious"
6749///      ]
6750///    },
6751///    "slash": {
6752///      "type": "boolean"
6753///    },
6754///    "type": {
6755///      "type": "string",
6756///      "const": "grace"
6757///    }
6758///  },
6759///  "additionalProperties": false
6760///}
6761/// ```
6762/// </details>
6763#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6764#[serde(deny_unknown_fields)]
6765pub struct SequenceContentItemSubtype1 {
6766    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6767    pub class: ::std::option::Option<StyleClass>,
6768    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6769    pub color: ::std::option::Option<Color>,
6770    pub content: ::std::vec::Vec<Event>,
6771    #[serde(
6772        rename = "graceType",
6773        default,
6774        skip_serializing_if = "::std::option::Option::is_none"
6775    )]
6776    pub grace_type: ::std::option::Option<SequenceContentItemSubtype1GraceType>,
6777    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6778    pub slash: ::std::option::Option<bool>,
6779    #[serde(rename = "type")]
6780    pub type_: ::std::string::String,
6781}
6782impl ::std::convert::From<&SequenceContentItemSubtype1> for SequenceContentItemSubtype1 {
6783    fn from(value: &SequenceContentItemSubtype1) -> Self {
6784        value.clone()
6785    }
6786}
6787impl SequenceContentItemSubtype1 {
6788    pub fn builder() -> builder::SequenceContentItemSubtype1 {
6789        Default::default()
6790    }
6791}
6792///SequenceContentItemSubtype1GraceType
6793///
6794/// <details><summary>JSON schema</summary>
6795///
6796/// ```json
6797///{
6798///  "type": "string",
6799///  "enum": [
6800///    "makeTime",
6801///    "stealFollowing",
6802///    "stealPrevious"
6803///  ]
6804///}
6805/// ```
6806/// </details>
6807#[derive(
6808    ::serde::Deserialize,
6809    ::serde::Serialize,
6810    Clone,
6811    Copy,
6812    Debug,
6813    Eq,
6814    Hash,
6815    Ord,
6816    PartialEq,
6817    PartialOrd
6818)]
6819pub enum SequenceContentItemSubtype1GraceType {
6820    #[serde(rename = "makeTime")]
6821    MakeTime,
6822    #[serde(rename = "stealFollowing")]
6823    StealFollowing,
6824    #[serde(rename = "stealPrevious")]
6825    StealPrevious,
6826}
6827impl ::std::convert::From<&Self> for SequenceContentItemSubtype1GraceType {
6828    fn from(value: &SequenceContentItemSubtype1GraceType) -> Self {
6829        value.clone()
6830    }
6831}
6832impl ::std::fmt::Display for SequenceContentItemSubtype1GraceType {
6833    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6834        match *self {
6835            Self::MakeTime => write!(f, "makeTime"),
6836            Self::StealFollowing => write!(f, "stealFollowing"),
6837            Self::StealPrevious => write!(f, "stealPrevious"),
6838        }
6839    }
6840}
6841impl ::std::str::FromStr for SequenceContentItemSubtype1GraceType {
6842    type Err = self::error::ConversionError;
6843    fn from_str(
6844        value: &str,
6845    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6846        match value {
6847            "makeTime" => Ok(Self::MakeTime),
6848            "stealFollowing" => Ok(Self::StealFollowing),
6849            "stealPrevious" => Ok(Self::StealPrevious),
6850            _ => Err("invalid value".into()),
6851        }
6852    }
6853}
6854impl ::std::convert::TryFrom<&str> for SequenceContentItemSubtype1GraceType {
6855    type Error = self::error::ConversionError;
6856    fn try_from(
6857        value: &str,
6858    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6859        value.parse()
6860    }
6861}
6862impl ::std::convert::TryFrom<&::std::string::String>
6863for SequenceContentItemSubtype1GraceType {
6864    type Error = self::error::ConversionError;
6865    fn try_from(
6866        value: &::std::string::String,
6867    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6868        value.parse()
6869    }
6870}
6871impl ::std::convert::TryFrom<::std::string::String>
6872for SequenceContentItemSubtype1GraceType {
6873    type Error = self::error::ConversionError;
6874    fn try_from(
6875        value: ::std::string::String,
6876    ) -> ::std::result::Result<Self, self::error::ConversionError> {
6877        value.parse()
6878    }
6879}
6880///SequenceContentItemSubtype2
6881///
6882/// <details><summary>JSON schema</summary>
6883///
6884/// ```json
6885///{
6886///  "type": "object",
6887///  "required": [
6888///    "content",
6889///    "inner",
6890///    "outer",
6891///    "type"
6892///  ],
6893///  "properties": {
6894///    "bracket": {
6895///      "type": "string",
6896///      "enum": [
6897///        "yes",
6898///        "no",
6899///        "auto"
6900///      ]
6901///    },
6902///    "content": {
6903///      "$ref": "#/$defs/sequence-content"
6904///    },
6905///    "inner": {
6906///      "$ref": "#/$defs/note-value-quantity"
6907///    },
6908///    "orient": {
6909///      "$ref": "#/$defs/orientation"
6910///    },
6911///    "outer": {
6912///      "$ref": "#/$defs/note-value-quantity"
6913///    },
6914///    "showNumber": {
6915///      "$ref": "#/$defs/tuplet-display-setting"
6916///    },
6917///    "showValue": {
6918///      "$ref": "#/$defs/tuplet-display-setting"
6919///    },
6920///    "staff": {
6921///      "$ref": "#/$defs/staff-number"
6922///    },
6923///    "type": {
6924///      "type": "string",
6925///      "const": "tuplet"
6926///    }
6927///  },
6928///  "additionalProperties": false
6929///}
6930/// ```
6931/// </details>
6932#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6933#[serde(deny_unknown_fields)]
6934pub struct SequenceContentItemSubtype2 {
6935    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6936    pub bracket: ::std::option::Option<SequenceContentItemSubtype2Bracket>,
6937    pub content: SequenceContent,
6938    pub inner: NoteValueQuantity,
6939    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6940    pub orient: ::std::option::Option<Orientation>,
6941    pub outer: NoteValueQuantity,
6942    #[serde(
6943        rename = "showNumber",
6944        default,
6945        skip_serializing_if = "::std::option::Option::is_none"
6946    )]
6947    pub show_number: ::std::option::Option<TupletDisplaySetting>,
6948    #[serde(
6949        rename = "showValue",
6950        default,
6951        skip_serializing_if = "::std::option::Option::is_none"
6952    )]
6953    pub show_value: ::std::option::Option<TupletDisplaySetting>,
6954    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6955    pub staff: ::std::option::Option<StaffNumber>,
6956    #[serde(rename = "type")]
6957    pub type_: ::std::string::String,
6958}
6959impl ::std::convert::From<&SequenceContentItemSubtype2> for SequenceContentItemSubtype2 {
6960    fn from(value: &SequenceContentItemSubtype2) -> Self {
6961        value.clone()
6962    }
6963}
6964impl SequenceContentItemSubtype2 {
6965    pub fn builder() -> builder::SequenceContentItemSubtype2 {
6966        Default::default()
6967    }
6968}
6969///SequenceContentItemSubtype2Bracket
6970///
6971/// <details><summary>JSON schema</summary>
6972///
6973/// ```json
6974///{
6975///  "type": "string",
6976///  "enum": [
6977///    "yes",
6978///    "no",
6979///    "auto"
6980///  ]
6981///}
6982/// ```
6983/// </details>
6984#[derive(
6985    ::serde::Deserialize,
6986    ::serde::Serialize,
6987    Clone,
6988    Copy,
6989    Debug,
6990    Eq,
6991    Hash,
6992    Ord,
6993    PartialEq,
6994    PartialOrd
6995)]
6996pub enum SequenceContentItemSubtype2Bracket {
6997    #[serde(rename = "yes")]
6998    Yes,
6999    #[serde(rename = "no")]
7000    No,
7001    #[serde(rename = "auto")]
7002    Auto,
7003}
7004impl ::std::convert::From<&Self> for SequenceContentItemSubtype2Bracket {
7005    fn from(value: &SequenceContentItemSubtype2Bracket) -> Self {
7006        value.clone()
7007    }
7008}
7009impl ::std::fmt::Display for SequenceContentItemSubtype2Bracket {
7010    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7011        match *self {
7012            Self::Yes => write!(f, "yes"),
7013            Self::No => write!(f, "no"),
7014            Self::Auto => write!(f, "auto"),
7015        }
7016    }
7017}
7018impl ::std::str::FromStr for SequenceContentItemSubtype2Bracket {
7019    type Err = self::error::ConversionError;
7020    fn from_str(
7021        value: &str,
7022    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7023        match value {
7024            "yes" => Ok(Self::Yes),
7025            "no" => Ok(Self::No),
7026            "auto" => Ok(Self::Auto),
7027            _ => Err("invalid value".into()),
7028        }
7029    }
7030}
7031impl ::std::convert::TryFrom<&str> for SequenceContentItemSubtype2Bracket {
7032    type Error = self::error::ConversionError;
7033    fn try_from(
7034        value: &str,
7035    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7036        value.parse()
7037    }
7038}
7039impl ::std::convert::TryFrom<&::std::string::String>
7040for SequenceContentItemSubtype2Bracket {
7041    type Error = self::error::ConversionError;
7042    fn try_from(
7043        value: &::std::string::String,
7044    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7045        value.parse()
7046    }
7047}
7048impl ::std::convert::TryFrom<::std::string::String>
7049for SequenceContentItemSubtype2Bracket {
7050    type Error = self::error::ConversionError;
7051    fn try_from(
7052        value: ::std::string::String,
7053    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7054        value.parse()
7055    }
7056}
7057///SequenceContentItemSubtype3
7058///
7059/// <details><summary>JSON schema</summary>
7060///
7061/// ```json
7062///{
7063///  "type": "object",
7064///  "required": [
7065///    "duration",
7066///    "type"
7067///  ],
7068///  "properties": {
7069///    "duration": {
7070///      "$ref": "#/$defs/fraction"
7071///    },
7072///    "type": {
7073///      "type": "string",
7074///      "const": "space"
7075///    }
7076///  },
7077///  "additionalProperties": false
7078///}
7079/// ```
7080/// </details>
7081#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7082#[serde(deny_unknown_fields)]
7083pub struct SequenceContentItemSubtype3 {
7084    pub duration: Fraction,
7085    #[serde(rename = "type")]
7086    pub type_: ::std::string::String,
7087}
7088impl ::std::convert::From<&SequenceContentItemSubtype3> for SequenceContentItemSubtype3 {
7089    fn from(value: &SequenceContentItemSubtype3) -> Self {
7090        value.clone()
7091    }
7092}
7093impl SequenceContentItemSubtype3 {
7094    pub fn builder() -> builder::SequenceContentItemSubtype3 {
7095        Default::default()
7096    }
7097}
7098///SlurSide
7099///
7100/// <details><summary>JSON schema</summary>
7101///
7102/// ```json
7103///{
7104///  "type": "string",
7105///  "enum": [
7106///    "up",
7107///    "down"
7108///  ]
7109///}
7110/// ```
7111/// </details>
7112#[derive(
7113    ::serde::Deserialize,
7114    ::serde::Serialize,
7115    Clone,
7116    Copy,
7117    Debug,
7118    Eq,
7119    Hash,
7120    Ord,
7121    PartialEq,
7122    PartialOrd
7123)]
7124pub enum SlurSide {
7125    #[serde(rename = "up")]
7126    Up,
7127    #[serde(rename = "down")]
7128    Down,
7129}
7130impl ::std::convert::From<&Self> for SlurSide {
7131    fn from(value: &SlurSide) -> Self {
7132        value.clone()
7133    }
7134}
7135impl ::std::fmt::Display for SlurSide {
7136    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7137        match *self {
7138            Self::Up => write!(f, "up"),
7139            Self::Down => write!(f, "down"),
7140        }
7141    }
7142}
7143impl ::std::str::FromStr for SlurSide {
7144    type Err = self::error::ConversionError;
7145    fn from_str(
7146        value: &str,
7147    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7148        match value {
7149            "up" => Ok(Self::Up),
7150            "down" => Ok(Self::Down),
7151            _ => Err("invalid value".into()),
7152        }
7153    }
7154}
7155impl ::std::convert::TryFrom<&str> for SlurSide {
7156    type Error = self::error::ConversionError;
7157    fn try_from(
7158        value: &str,
7159    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7160        value.parse()
7161    }
7162}
7163impl ::std::convert::TryFrom<&::std::string::String> for SlurSide {
7164    type Error = self::error::ConversionError;
7165    fn try_from(
7166        value: &::std::string::String,
7167    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7168        value.parse()
7169    }
7170}
7171impl ::std::convert::TryFrom<::std::string::String> for SlurSide {
7172    type Error = self::error::ConversionError;
7173    fn try_from(
7174        value: ::std::string::String,
7175    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7176        value.parse()
7177    }
7178}
7179///SmuflFont
7180///
7181/// <details><summary>JSON schema</summary>
7182///
7183/// ```json
7184///{
7185///  "type": "string"
7186///}
7187/// ```
7188/// </details>
7189#[derive(
7190    ::serde::Deserialize,
7191    ::serde::Serialize,
7192    Clone,
7193    Debug,
7194    Eq,
7195    Hash,
7196    Ord,
7197    PartialEq,
7198    PartialOrd
7199)]
7200#[serde(transparent)]
7201pub struct SmuflFont(pub ::std::string::String);
7202impl ::std::ops::Deref for SmuflFont {
7203    type Target = ::std::string::String;
7204    fn deref(&self) -> &::std::string::String {
7205        &self.0
7206    }
7207}
7208impl ::std::convert::From<SmuflFont> for ::std::string::String {
7209    fn from(value: SmuflFont) -> Self {
7210        value.0
7211    }
7212}
7213impl ::std::convert::From<&SmuflFont> for SmuflFont {
7214    fn from(value: &SmuflFont) -> Self {
7215        value.clone()
7216    }
7217}
7218impl ::std::convert::From<::std::string::String> for SmuflFont {
7219    fn from(value: ::std::string::String) -> Self {
7220        Self(value)
7221    }
7222}
7223impl ::std::str::FromStr for SmuflFont {
7224    type Err = ::std::convert::Infallible;
7225    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7226        Ok(Self(value.to_string()))
7227    }
7228}
7229impl ::std::fmt::Display for SmuflFont {
7230    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7231        self.0.fmt(f)
7232    }
7233}
7234///SmuflGlyph
7235///
7236/// <details><summary>JSON schema</summary>
7237///
7238/// ```json
7239///{
7240///  "type": "string"
7241///}
7242/// ```
7243/// </details>
7244#[derive(
7245    ::serde::Deserialize,
7246    ::serde::Serialize,
7247    Clone,
7248    Debug,
7249    Eq,
7250    Hash,
7251    Ord,
7252    PartialEq,
7253    PartialOrd
7254)]
7255#[serde(transparent)]
7256pub struct SmuflGlyph(pub ::std::string::String);
7257impl ::std::ops::Deref for SmuflGlyph {
7258    type Target = ::std::string::String;
7259    fn deref(&self) -> &::std::string::String {
7260        &self.0
7261    }
7262}
7263impl ::std::convert::From<SmuflGlyph> for ::std::string::String {
7264    fn from(value: SmuflGlyph) -> Self {
7265        value.0
7266    }
7267}
7268impl ::std::convert::From<&SmuflGlyph> for SmuflGlyph {
7269    fn from(value: &SmuflGlyph) -> Self {
7270        value.clone()
7271    }
7272}
7273impl ::std::convert::From<::std::string::String> for SmuflGlyph {
7274    fn from(value: ::std::string::String) -> Self {
7275        Self(value)
7276    }
7277}
7278impl ::std::str::FromStr for SmuflGlyph {
7279    type Err = ::std::convert::Infallible;
7280    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7281        Ok(Self(value.to_string()))
7282    }
7283}
7284impl ::std::fmt::Display for SmuflGlyph {
7285    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7286        self.0.fmt(f)
7287    }
7288}
7289///StaffLabel
7290///
7291/// <details><summary>JSON schema</summary>
7292///
7293/// ```json
7294///{
7295///  "type": "string"
7296///}
7297/// ```
7298/// </details>
7299#[derive(
7300    ::serde::Deserialize,
7301    ::serde::Serialize,
7302    Clone,
7303    Debug,
7304    Eq,
7305    Hash,
7306    Ord,
7307    PartialEq,
7308    PartialOrd
7309)]
7310#[serde(transparent)]
7311pub struct StaffLabel(pub ::std::string::String);
7312impl ::std::ops::Deref for StaffLabel {
7313    type Target = ::std::string::String;
7314    fn deref(&self) -> &::std::string::String {
7315        &self.0
7316    }
7317}
7318impl ::std::convert::From<StaffLabel> for ::std::string::String {
7319    fn from(value: StaffLabel) -> Self {
7320        value.0
7321    }
7322}
7323impl ::std::convert::From<&StaffLabel> for StaffLabel {
7324    fn from(value: &StaffLabel) -> Self {
7325        value.clone()
7326    }
7327}
7328impl ::std::convert::From<::std::string::String> for StaffLabel {
7329    fn from(value: ::std::string::String) -> Self {
7330        Self(value)
7331    }
7332}
7333impl ::std::str::FromStr for StaffLabel {
7334    type Err = ::std::convert::Infallible;
7335    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7336        Ok(Self(value.to_string()))
7337    }
7338}
7339impl ::std::fmt::Display for StaffLabel {
7340    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7341        self.0.fmt(f)
7342    }
7343}
7344///StaffLabelref
7345///
7346/// <details><summary>JSON schema</summary>
7347///
7348/// ```json
7349///{
7350///  "type": "string"
7351///}
7352/// ```
7353/// </details>
7354#[derive(
7355    ::serde::Deserialize,
7356    ::serde::Serialize,
7357    Clone,
7358    Debug,
7359    Eq,
7360    Hash,
7361    Ord,
7362    PartialEq,
7363    PartialOrd
7364)]
7365#[serde(transparent)]
7366pub struct StaffLabelref(pub ::std::string::String);
7367impl ::std::ops::Deref for StaffLabelref {
7368    type Target = ::std::string::String;
7369    fn deref(&self) -> &::std::string::String {
7370        &self.0
7371    }
7372}
7373impl ::std::convert::From<StaffLabelref> for ::std::string::String {
7374    fn from(value: StaffLabelref) -> Self {
7375        value.0
7376    }
7377}
7378impl ::std::convert::From<&StaffLabelref> for StaffLabelref {
7379    fn from(value: &StaffLabelref) -> Self {
7380        value.clone()
7381    }
7382}
7383impl ::std::convert::From<::std::string::String> for StaffLabelref {
7384    fn from(value: ::std::string::String) -> Self {
7385        Self(value)
7386    }
7387}
7388impl ::std::str::FromStr for StaffLabelref {
7389    type Err = ::std::convert::Infallible;
7390    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7391        Ok(Self(value.to_string()))
7392    }
7393}
7394impl ::std::fmt::Display for StaffLabelref {
7395    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7396        self.0.fmt(f)
7397    }
7398}
7399///StaffNumber
7400///
7401/// <details><summary>JSON schema</summary>
7402///
7403/// ```json
7404///{
7405///  "type": "integer"
7406///}
7407/// ```
7408/// </details>
7409#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7410#[serde(transparent)]
7411pub struct StaffNumber(pub i64);
7412impl ::std::ops::Deref for StaffNumber {
7413    type Target = i64;
7414    fn deref(&self) -> &i64 {
7415        &self.0
7416    }
7417}
7418impl ::std::convert::From<StaffNumber> for i64 {
7419    fn from(value: StaffNumber) -> Self {
7420        value.0
7421    }
7422}
7423impl ::std::convert::From<&StaffNumber> for StaffNumber {
7424    fn from(value: &StaffNumber) -> Self {
7425        value.clone()
7426    }
7427}
7428impl ::std::convert::From<i64> for StaffNumber {
7429    fn from(value: i64) -> Self {
7430        Self(value)
7431    }
7432}
7433impl ::std::str::FromStr for StaffNumber {
7434    type Err = <i64 as ::std::str::FromStr>::Err;
7435    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7436        Ok(Self(value.parse()?))
7437    }
7438}
7439impl ::std::convert::TryFrom<&str> for StaffNumber {
7440    type Error = <i64 as ::std::str::FromStr>::Err;
7441    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
7442        value.parse()
7443    }
7444}
7445impl ::std::convert::TryFrom<&String> for StaffNumber {
7446    type Error = <i64 as ::std::str::FromStr>::Err;
7447    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
7448        value.parse()
7449    }
7450}
7451impl ::std::convert::TryFrom<String> for StaffNumber {
7452    type Error = <i64 as ::std::str::FromStr>::Err;
7453    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
7454        value.parse()
7455    }
7456}
7457impl ::std::fmt::Display for StaffNumber {
7458    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7459        self.0.fmt(f)
7460    }
7461}
7462///StaffPosition
7463///
7464/// <details><summary>JSON schema</summary>
7465///
7466/// ```json
7467///{
7468///  "type": "integer"
7469///}
7470/// ```
7471/// </details>
7472#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7473#[serde(transparent)]
7474pub struct StaffPosition(pub i64);
7475impl ::std::ops::Deref for StaffPosition {
7476    type Target = i64;
7477    fn deref(&self) -> &i64 {
7478        &self.0
7479    }
7480}
7481impl ::std::convert::From<StaffPosition> for i64 {
7482    fn from(value: StaffPosition) -> Self {
7483        value.0
7484    }
7485}
7486impl ::std::convert::From<&StaffPosition> for StaffPosition {
7487    fn from(value: &StaffPosition) -> Self {
7488        value.clone()
7489    }
7490}
7491impl ::std::convert::From<i64> for StaffPosition {
7492    fn from(value: i64) -> Self {
7493        Self(value)
7494    }
7495}
7496impl ::std::str::FromStr for StaffPosition {
7497    type Err = <i64 as ::std::str::FromStr>::Err;
7498    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7499        Ok(Self(value.parse()?))
7500    }
7501}
7502impl ::std::convert::TryFrom<&str> for StaffPosition {
7503    type Error = <i64 as ::std::str::FromStr>::Err;
7504    fn try_from(value: &str) -> ::std::result::Result<Self, Self::Error> {
7505        value.parse()
7506    }
7507}
7508impl ::std::convert::TryFrom<&String> for StaffPosition {
7509    type Error = <i64 as ::std::str::FromStr>::Err;
7510    fn try_from(value: &String) -> ::std::result::Result<Self, Self::Error> {
7511        value.parse()
7512    }
7513}
7514impl ::std::convert::TryFrom<String> for StaffPosition {
7515    type Error = <i64 as ::std::str::FromStr>::Err;
7516    fn try_from(value: String) -> ::std::result::Result<Self, Self::Error> {
7517        value.parse()
7518    }
7519}
7520impl ::std::fmt::Display for StaffPosition {
7521    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7522        self.0.fmt(f)
7523    }
7524}
7525///StaffSymbol
7526///
7527/// <details><summary>JSON schema</summary>
7528///
7529/// ```json
7530///{
7531///  "type": "string",
7532///  "enum": [
7533///    "bracket",
7534///    "brace",
7535///    "noSymbol"
7536///  ]
7537///}
7538/// ```
7539/// </details>
7540#[derive(
7541    ::serde::Deserialize,
7542    ::serde::Serialize,
7543    Clone,
7544    Copy,
7545    Debug,
7546    Eq,
7547    Hash,
7548    Ord,
7549    PartialEq,
7550    PartialOrd
7551)]
7552pub enum StaffSymbol {
7553    #[serde(rename = "bracket")]
7554    Bracket,
7555    #[serde(rename = "brace")]
7556    Brace,
7557    #[serde(rename = "noSymbol")]
7558    NoSymbol,
7559}
7560impl ::std::convert::From<&Self> for StaffSymbol {
7561    fn from(value: &StaffSymbol) -> Self {
7562        value.clone()
7563    }
7564}
7565impl ::std::fmt::Display for StaffSymbol {
7566    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7567        match *self {
7568            Self::Bracket => write!(f, "bracket"),
7569            Self::Brace => write!(f, "brace"),
7570            Self::NoSymbol => write!(f, "noSymbol"),
7571        }
7572    }
7573}
7574impl ::std::str::FromStr for StaffSymbol {
7575    type Err = self::error::ConversionError;
7576    fn from_str(
7577        value: &str,
7578    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7579        match value {
7580            "bracket" => Ok(Self::Bracket),
7581            "brace" => Ok(Self::Brace),
7582            "noSymbol" => Ok(Self::NoSymbol),
7583            _ => Err("invalid value".into()),
7584        }
7585    }
7586}
7587impl ::std::convert::TryFrom<&str> for StaffSymbol {
7588    type Error = self::error::ConversionError;
7589    fn try_from(
7590        value: &str,
7591    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7592        value.parse()
7593    }
7594}
7595impl ::std::convert::TryFrom<&::std::string::String> for StaffSymbol {
7596    type Error = self::error::ConversionError;
7597    fn try_from(
7598        value: &::std::string::String,
7599    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7600        value.parse()
7601    }
7602}
7603impl ::std::convert::TryFrom<::std::string::String> for StaffSymbol {
7604    type Error = self::error::ConversionError;
7605    fn try_from(
7606        value: ::std::string::String,
7607    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7608        value.parse()
7609    }
7610}
7611///StemDirection
7612///
7613/// <details><summary>JSON schema</summary>
7614///
7615/// ```json
7616///{
7617///  "type": "string",
7618///  "enum": [
7619///    "up",
7620///    "down"
7621///  ]
7622///}
7623/// ```
7624/// </details>
7625#[derive(
7626    ::serde::Deserialize,
7627    ::serde::Serialize,
7628    Clone,
7629    Copy,
7630    Debug,
7631    Eq,
7632    Hash,
7633    Ord,
7634    PartialEq,
7635    PartialOrd
7636)]
7637pub enum StemDirection {
7638    #[serde(rename = "up")]
7639    Up,
7640    #[serde(rename = "down")]
7641    Down,
7642}
7643impl ::std::convert::From<&Self> for StemDirection {
7644    fn from(value: &StemDirection) -> Self {
7645        value.clone()
7646    }
7647}
7648impl ::std::fmt::Display for StemDirection {
7649    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7650        match *self {
7651            Self::Up => write!(f, "up"),
7652            Self::Down => write!(f, "down"),
7653        }
7654    }
7655}
7656impl ::std::str::FromStr for StemDirection {
7657    type Err = self::error::ConversionError;
7658    fn from_str(
7659        value: &str,
7660    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7661        match value {
7662            "up" => Ok(Self::Up),
7663            "down" => Ok(Self::Down),
7664            _ => Err("invalid value".into()),
7665        }
7666    }
7667}
7668impl ::std::convert::TryFrom<&str> for StemDirection {
7669    type Error = self::error::ConversionError;
7670    fn try_from(
7671        value: &str,
7672    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7673        value.parse()
7674    }
7675}
7676impl ::std::convert::TryFrom<&::std::string::String> for StemDirection {
7677    type Error = self::error::ConversionError;
7678    fn try_from(
7679        value: &::std::string::String,
7680    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7681        value.parse()
7682    }
7683}
7684impl ::std::convert::TryFrom<::std::string::String> for StemDirection {
7685    type Error = self::error::ConversionError;
7686    fn try_from(
7687        value: ::std::string::String,
7688    ) -> ::std::result::Result<Self, self::error::ConversionError> {
7689        value.parse()
7690    }
7691}
7692///String
7693///
7694/// <details><summary>JSON schema</summary>
7695///
7696/// ```json
7697///{
7698///  "type": "string"
7699///}
7700/// ```
7701/// </details>
7702#[derive(
7703    ::serde::Deserialize,
7704    ::serde::Serialize,
7705    Clone,
7706    Debug,
7707    Eq,
7708    Hash,
7709    Ord,
7710    PartialEq,
7711    PartialOrd
7712)]
7713#[serde(transparent)]
7714pub struct String(pub ::std::string::String);
7715impl ::std::ops::Deref for String {
7716    type Target = ::std::string::String;
7717    fn deref(&self) -> &::std::string::String {
7718        &self.0
7719    }
7720}
7721impl ::std::convert::From<String> for ::std::string::String {
7722    fn from(value: String) -> Self {
7723        value.0
7724    }
7725}
7726impl ::std::convert::From<&String> for String {
7727    fn from(value: &String) -> Self {
7728        value.clone()
7729    }
7730}
7731impl ::std::convert::From<::std::string::String> for String {
7732    fn from(value: ::std::string::String) -> Self {
7733        Self(value)
7734    }
7735}
7736impl ::std::str::FromStr for String {
7737    type Err = ::std::convert::Infallible;
7738    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7739        Ok(Self(value.to_string()))
7740    }
7741}
7742impl ::std::fmt::Display for String {
7743    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7744        self.0.fmt(f)
7745    }
7746}
7747///StyleClass
7748///
7749/// <details><summary>JSON schema</summary>
7750///
7751/// ```json
7752///{
7753///  "type": "string"
7754///}
7755/// ```
7756/// </details>
7757#[derive(
7758    ::serde::Deserialize,
7759    ::serde::Serialize,
7760    Clone,
7761    Debug,
7762    Eq,
7763    Hash,
7764    Ord,
7765    PartialEq,
7766    PartialOrd
7767)]
7768#[serde(transparent)]
7769pub struct StyleClass(pub ::std::string::String);
7770impl ::std::ops::Deref for StyleClass {
7771    type Target = ::std::string::String;
7772    fn deref(&self) -> &::std::string::String {
7773        &self.0
7774    }
7775}
7776impl ::std::convert::From<StyleClass> for ::std::string::String {
7777    fn from(value: StyleClass) -> Self {
7778        value.0
7779    }
7780}
7781impl ::std::convert::From<&StyleClass> for StyleClass {
7782    fn from(value: &StyleClass) -> Self {
7783        value.clone()
7784    }
7785}
7786impl ::std::convert::From<::std::string::String> for StyleClass {
7787    fn from(value: ::std::string::String) -> Self {
7788        Self(value)
7789    }
7790}
7791impl ::std::str::FromStr for StyleClass {
7792    type Err = ::std::convert::Infallible;
7793    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
7794        Ok(Self(value.to_string()))
7795    }
7796}
7797impl ::std::fmt::Display for StyleClass {
7798    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7799        self.0.fmt(f)
7800    }
7801}
7802///SystemLayoutContent
7803///
7804/// <details><summary>JSON schema</summary>
7805///
7806/// ```json
7807///{
7808///  "type": "array",
7809///  "items": {
7810///    "anyOf": [
7811///      {
7812///        "type": "object",
7813///        "required": [
7814///          "content",
7815///          "type"
7816///        ],
7817///        "properties": {
7818///          "content": {
7819///            "$ref": "#/$defs/system-layout-content"
7820///          },
7821///          "label": {
7822///            "$ref": "#/$defs/staff-label"
7823///          },
7824///          "symbol": {
7825///            "$ref": "#/$defs/staff-symbol"
7826///          },
7827///          "type": {
7828///            "type": "string",
7829///            "const": "group"
7830///          }
7831///        },
7832///        "additionalProperties": false
7833///      },
7834///      {
7835///        "type": "object",
7836///        "required": [
7837///          "sources",
7838///          "type"
7839///        ],
7840///        "properties": {
7841///          "label": {
7842///            "$ref": "#/$defs/staff-label"
7843///          },
7844///          "labelref": {
7845///            "$ref": "#/$defs/staff-labelref"
7846///          },
7847///          "sources": {
7848///            "type": "array",
7849///            "items": {
7850///              "type": "object",
7851///              "required": [
7852///                "part"
7853///              ],
7854///              "properties": {
7855///                "label": {
7856///                  "$ref": "#/$defs/staff-label"
7857///                },
7858///                "labelref": {
7859///                  "$ref": "#/$defs/staff-labelref"
7860///                },
7861///                "part": {
7862///                  "$ref": "#/$defs/id"
7863///                },
7864///                "staff": {
7865///                  "$ref": "#/$defs/staff-number"
7866///                },
7867///                "stem": {
7868///                  "$ref": "#/$defs/stem-direction"
7869///                },
7870///                "voice": {
7871///                  "$ref": "#/$defs/voice-name"
7872///                }
7873///              },
7874///              "additionalProperties": false
7875///            }
7876///          },
7877///          "symbol": {
7878///            "$ref": "#/$defs/staff-symbol"
7879///          },
7880///          "type": {
7881///            "type": "string",
7882///            "const": "staff"
7883///          }
7884///        },
7885///        "additionalProperties": false
7886///      }
7887///    ]
7888///  }
7889///}
7890/// ```
7891/// </details>
7892#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7893#[serde(transparent)]
7894pub struct SystemLayoutContent(pub ::std::vec::Vec<SystemLayoutContentItem>);
7895impl ::std::ops::Deref for SystemLayoutContent {
7896    type Target = ::std::vec::Vec<SystemLayoutContentItem>;
7897    fn deref(&self) -> &::std::vec::Vec<SystemLayoutContentItem> {
7898        &self.0
7899    }
7900}
7901impl ::std::convert::From<SystemLayoutContent>
7902for ::std::vec::Vec<SystemLayoutContentItem> {
7903    fn from(value: SystemLayoutContent) -> Self {
7904        value.0
7905    }
7906}
7907impl ::std::convert::From<&SystemLayoutContent> for SystemLayoutContent {
7908    fn from(value: &SystemLayoutContent) -> Self {
7909        value.clone()
7910    }
7911}
7912impl ::std::convert::From<::std::vec::Vec<SystemLayoutContentItem>>
7913for SystemLayoutContent {
7914    fn from(value: ::std::vec::Vec<SystemLayoutContentItem>) -> Self {
7915        Self(value)
7916    }
7917}
7918///SystemLayoutContentItem
7919///
7920/// <details><summary>JSON schema</summary>
7921///
7922/// ```json
7923///{
7924///  "anyOf": [
7925///    {
7926///      "type": "object",
7927///      "required": [
7928///        "content",
7929///        "type"
7930///      ],
7931///      "properties": {
7932///        "content": {
7933///          "$ref": "#/$defs/system-layout-content"
7934///        },
7935///        "label": {
7936///          "$ref": "#/$defs/staff-label"
7937///        },
7938///        "symbol": {
7939///          "$ref": "#/$defs/staff-symbol"
7940///        },
7941///        "type": {
7942///          "type": "string",
7943///          "const": "group"
7944///        }
7945///      },
7946///      "additionalProperties": false
7947///    },
7948///    {
7949///      "type": "object",
7950///      "required": [
7951///        "sources",
7952///        "type"
7953///      ],
7954///      "properties": {
7955///        "label": {
7956///          "$ref": "#/$defs/staff-label"
7957///        },
7958///        "labelref": {
7959///          "$ref": "#/$defs/staff-labelref"
7960///        },
7961///        "sources": {
7962///          "type": "array",
7963///          "items": {
7964///            "type": "object",
7965///            "required": [
7966///              "part"
7967///            ],
7968///            "properties": {
7969///              "label": {
7970///                "$ref": "#/$defs/staff-label"
7971///              },
7972///              "labelref": {
7973///                "$ref": "#/$defs/staff-labelref"
7974///              },
7975///              "part": {
7976///                "$ref": "#/$defs/id"
7977///              },
7978///              "staff": {
7979///                "$ref": "#/$defs/staff-number"
7980///              },
7981///              "stem": {
7982///                "$ref": "#/$defs/stem-direction"
7983///              },
7984///              "voice": {
7985///                "$ref": "#/$defs/voice-name"
7986///              }
7987///            },
7988///            "additionalProperties": false
7989///          }
7990///        },
7991///        "symbol": {
7992///          "$ref": "#/$defs/staff-symbol"
7993///        },
7994///        "type": {
7995///          "type": "string",
7996///          "const": "staff"
7997///        }
7998///      },
7999///      "additionalProperties": false
8000///    }
8001///  ]
8002///}
8003/// ```
8004/// </details>
8005#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8006#[serde(tag = "type", deny_unknown_fields)]
8007pub enum SystemLayoutContentItem {
8008    #[serde(rename = "group")]
8009    Group {
8010        content: SystemLayoutContent,
8011        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8012        label: ::std::option::Option<StaffLabel>,
8013        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8014        symbol: ::std::option::Option<StaffSymbol>,
8015    },
8016    #[serde(rename = "staff")]
8017    Staff {
8018        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8019        label: ::std::option::Option<StaffLabel>,
8020        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8021        labelref: ::std::option::Option<StaffLabelref>,
8022        sources: ::std::vec::Vec<SystemLayoutContentItemSourcesItem>,
8023        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8024        symbol: ::std::option::Option<StaffSymbol>,
8025    },
8026}
8027impl ::std::convert::From<&Self> for SystemLayoutContentItem {
8028    fn from(value: &SystemLayoutContentItem) -> Self {
8029        value.clone()
8030    }
8031}
8032///SystemLayoutContentItemSourcesItem
8033///
8034/// <details><summary>JSON schema</summary>
8035///
8036/// ```json
8037///{
8038///  "type": "object",
8039///  "required": [
8040///    "part"
8041///  ],
8042///  "properties": {
8043///    "label": {
8044///      "$ref": "#/$defs/staff-label"
8045///    },
8046///    "labelref": {
8047///      "$ref": "#/$defs/staff-labelref"
8048///    },
8049///    "part": {
8050///      "$ref": "#/$defs/id"
8051///    },
8052///    "staff": {
8053///      "$ref": "#/$defs/staff-number"
8054///    },
8055///    "stem": {
8056///      "$ref": "#/$defs/stem-direction"
8057///    },
8058///    "voice": {
8059///      "$ref": "#/$defs/voice-name"
8060///    }
8061///  },
8062///  "additionalProperties": false
8063///}
8064/// ```
8065/// </details>
8066#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
8067#[serde(deny_unknown_fields)]
8068pub struct SystemLayoutContentItemSourcesItem {
8069    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8070    pub label: ::std::option::Option<StaffLabel>,
8071    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8072    pub labelref: ::std::option::Option<StaffLabelref>,
8073    pub part: Id,
8074    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8075    pub staff: ::std::option::Option<StaffNumber>,
8076    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8077    pub stem: ::std::option::Option<StemDirection>,
8078    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8079    pub voice: ::std::option::Option<VoiceName>,
8080}
8081impl ::std::convert::From<&SystemLayoutContentItemSourcesItem>
8082for SystemLayoutContentItemSourcesItem {
8083    fn from(value: &SystemLayoutContentItemSourcesItem) -> Self {
8084        value.clone()
8085    }
8086}
8087impl SystemLayoutContentItemSourcesItem {
8088    pub fn builder() -> builder::SystemLayoutContentItemSourcesItem {
8089        Default::default()
8090    }
8091}
8092///TupletDisplaySetting
8093///
8094/// <details><summary>JSON schema</summary>
8095///
8096/// ```json
8097///{
8098///  "type": "string",
8099///  "enum": [
8100///    "noNumber",
8101///    "inner",
8102///    "both"
8103///  ]
8104///}
8105/// ```
8106/// </details>
8107#[derive(
8108    ::serde::Deserialize,
8109    ::serde::Serialize,
8110    Clone,
8111    Copy,
8112    Debug,
8113    Eq,
8114    Hash,
8115    Ord,
8116    PartialEq,
8117    PartialOrd
8118)]
8119pub enum TupletDisplaySetting {
8120    #[serde(rename = "noNumber")]
8121    NoNumber,
8122    #[serde(rename = "inner")]
8123    Inner,
8124    #[serde(rename = "both")]
8125    Both,
8126}
8127impl ::std::convert::From<&Self> for TupletDisplaySetting {
8128    fn from(value: &TupletDisplaySetting) -> Self {
8129        value.clone()
8130    }
8131}
8132impl ::std::fmt::Display for TupletDisplaySetting {
8133    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8134        match *self {
8135            Self::NoNumber => write!(f, "noNumber"),
8136            Self::Inner => write!(f, "inner"),
8137            Self::Both => write!(f, "both"),
8138        }
8139    }
8140}
8141impl ::std::str::FromStr for TupletDisplaySetting {
8142    type Err = self::error::ConversionError;
8143    fn from_str(
8144        value: &str,
8145    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8146        match value {
8147            "noNumber" => Ok(Self::NoNumber),
8148            "inner" => Ok(Self::Inner),
8149            "both" => Ok(Self::Both),
8150            _ => Err("invalid value".into()),
8151        }
8152    }
8153}
8154impl ::std::convert::TryFrom<&str> for TupletDisplaySetting {
8155    type Error = self::error::ConversionError;
8156    fn try_from(
8157        value: &str,
8158    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8159        value.parse()
8160    }
8161}
8162impl ::std::convert::TryFrom<&::std::string::String> for TupletDisplaySetting {
8163    type Error = self::error::ConversionError;
8164    fn try_from(
8165        value: &::std::string::String,
8166    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8167        value.parse()
8168    }
8169}
8170impl ::std::convert::TryFrom<::std::string::String> for TupletDisplaySetting {
8171    type Error = self::error::ConversionError;
8172    fn try_from(
8173        value: ::std::string::String,
8174    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8175        value.parse()
8176    }
8177}
8178///UpOrDown
8179///
8180/// <details><summary>JSON schema</summary>
8181///
8182/// ```json
8183///{
8184///  "type": "string",
8185///  "enum": [
8186///    "up",
8187///    "down"
8188///  ]
8189///}
8190/// ```
8191/// </details>
8192#[derive(
8193    ::serde::Deserialize,
8194    ::serde::Serialize,
8195    Clone,
8196    Copy,
8197    Debug,
8198    Eq,
8199    Hash,
8200    Ord,
8201    PartialEq,
8202    PartialOrd
8203)]
8204pub enum UpOrDown {
8205    #[serde(rename = "up")]
8206    Up,
8207    #[serde(rename = "down")]
8208    Down,
8209}
8210impl ::std::convert::From<&Self> for UpOrDown {
8211    fn from(value: &UpOrDown) -> Self {
8212        value.clone()
8213    }
8214}
8215impl ::std::fmt::Display for UpOrDown {
8216    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8217        match *self {
8218            Self::Up => write!(f, "up"),
8219            Self::Down => write!(f, "down"),
8220        }
8221    }
8222}
8223impl ::std::str::FromStr for UpOrDown {
8224    type Err = self::error::ConversionError;
8225    fn from_str(
8226        value: &str,
8227    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8228        match value {
8229            "up" => Ok(Self::Up),
8230            "down" => Ok(Self::Down),
8231            _ => Err("invalid value".into()),
8232        }
8233    }
8234}
8235impl ::std::convert::TryFrom<&str> for UpOrDown {
8236    type Error = self::error::ConversionError;
8237    fn try_from(
8238        value: &str,
8239    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8240        value.parse()
8241    }
8242}
8243impl ::std::convert::TryFrom<&::std::string::String> for UpOrDown {
8244    type Error = self::error::ConversionError;
8245    fn try_from(
8246        value: &::std::string::String,
8247    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8248        value.parse()
8249    }
8250}
8251impl ::std::convert::TryFrom<::std::string::String> for UpOrDown {
8252    type Error = self::error::ConversionError;
8253    fn try_from(
8254        value: ::std::string::String,
8255    ) -> ::std::result::Result<Self, self::error::ConversionError> {
8256        value.parse()
8257    }
8258}
8259///VoiceName
8260///
8261/// <details><summary>JSON schema</summary>
8262///
8263/// ```json
8264///{
8265///  "type": "string"
8266///}
8267/// ```
8268/// </details>
8269#[derive(
8270    ::serde::Deserialize,
8271    ::serde::Serialize,
8272    Clone,
8273    Debug,
8274    Eq,
8275    Hash,
8276    Ord,
8277    PartialEq,
8278    PartialOrd
8279)]
8280#[serde(transparent)]
8281pub struct VoiceName(pub ::std::string::String);
8282impl ::std::ops::Deref for VoiceName {
8283    type Target = ::std::string::String;
8284    fn deref(&self) -> &::std::string::String {
8285        &self.0
8286    }
8287}
8288impl ::std::convert::From<VoiceName> for ::std::string::String {
8289    fn from(value: VoiceName) -> Self {
8290        value.0
8291    }
8292}
8293impl ::std::convert::From<&VoiceName> for VoiceName {
8294    fn from(value: &VoiceName) -> Self {
8295        value.clone()
8296    }
8297}
8298impl ::std::convert::From<::std::string::String> for VoiceName {
8299    fn from(value: ::std::string::String) -> Self {
8300        Self(value)
8301    }
8302}
8303impl ::std::str::FromStr for VoiceName {
8304    type Err = ::std::convert::Infallible;
8305    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
8306        Ok(Self(value.to_string()))
8307    }
8308}
8309impl ::std::fmt::Display for VoiceName {
8310    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
8311        self.0.fmt(f)
8312    }
8313}
8314/// Types for composing complex structures.
8315pub mod builder {
8316    #[derive(Clone, Debug)]
8317    pub struct BeamListItem {
8318        events: ::std::result::Result<::std::vec::Vec<super::Id>, ::std::string::String>,
8319        hooks: ::std::result::Result<
8320            ::std::vec::Vec<super::BeamListItemHooksItem>,
8321            ::std::string::String,
8322        >,
8323        inner: ::std::result::Result<
8324            ::std::option::Option<super::BeamList>,
8325            ::std::string::String,
8326        >,
8327    }
8328    impl ::std::default::Default for BeamListItem {
8329        fn default() -> Self {
8330            Self {
8331                events: Err("no value supplied for events".to_string()),
8332                hooks: Ok(Default::default()),
8333                inner: Ok(Default::default()),
8334            }
8335        }
8336    }
8337    impl BeamListItem {
8338        pub fn events<T>(mut self, value: T) -> Self
8339        where
8340            T: ::std::convert::TryInto<::std::vec::Vec<super::Id>>,
8341            T::Error: ::std::fmt::Display,
8342        {
8343            self.events = value
8344                .try_into()
8345                .map_err(|e| {
8346                    format!("error converting supplied value for events: {}", e)
8347                });
8348            self
8349        }
8350        pub fn hooks<T>(mut self, value: T) -> Self
8351        where
8352            T: ::std::convert::TryInto<::std::vec::Vec<super::BeamListItemHooksItem>>,
8353            T::Error: ::std::fmt::Display,
8354        {
8355            self.hooks = value
8356                .try_into()
8357                .map_err(|e| {
8358                    format!("error converting supplied value for hooks: {}", e)
8359                });
8360            self
8361        }
8362        pub fn inner<T>(mut self, value: T) -> Self
8363        where
8364            T: ::std::convert::TryInto<::std::option::Option<super::BeamList>>,
8365            T::Error: ::std::fmt::Display,
8366        {
8367            self.inner = value
8368                .try_into()
8369                .map_err(|e| {
8370                    format!("error converting supplied value for inner: {}", e)
8371                });
8372            self
8373        }
8374    }
8375    impl ::std::convert::TryFrom<BeamListItem> for super::BeamListItem {
8376        type Error = super::error::ConversionError;
8377        fn try_from(
8378            value: BeamListItem,
8379        ) -> ::std::result::Result<Self, super::error::ConversionError> {
8380            Ok(Self {
8381                events: value.events?,
8382                hooks: value.hooks?,
8383                inner: value.inner?,
8384            })
8385        }
8386    }
8387    impl ::std::convert::From<super::BeamListItem> for BeamListItem {
8388        fn from(value: super::BeamListItem) -> Self {
8389            Self {
8390                events: Ok(value.events),
8391                hooks: Ok(value.hooks),
8392                inner: Ok(value.inner),
8393            }
8394        }
8395    }
8396    #[derive(Clone, Debug)]
8397    pub struct BeamListItemHooksItem {
8398        direction: ::std::result::Result<
8399            super::BeamListItemHooksItemDirection,
8400            ::std::string::String,
8401        >,
8402        event: ::std::result::Result<super::Id, ::std::string::String>,
8403    }
8404    impl ::std::default::Default for BeamListItemHooksItem {
8405        fn default() -> Self {
8406            Self {
8407                direction: Err("no value supplied for direction".to_string()),
8408                event: Err("no value supplied for event".to_string()),
8409            }
8410        }
8411    }
8412    impl BeamListItemHooksItem {
8413        pub fn direction<T>(mut self, value: T) -> Self
8414        where
8415            T: ::std::convert::TryInto<super::BeamListItemHooksItemDirection>,
8416            T::Error: ::std::fmt::Display,
8417        {
8418            self.direction = value
8419                .try_into()
8420                .map_err(|e| {
8421                    format!("error converting supplied value for direction: {}", e)
8422                });
8423            self
8424        }
8425        pub fn event<T>(mut self, value: T) -> Self
8426        where
8427            T: ::std::convert::TryInto<super::Id>,
8428            T::Error: ::std::fmt::Display,
8429        {
8430            self.event = value
8431                .try_into()
8432                .map_err(|e| {
8433                    format!("error converting supplied value for event: {}", e)
8434                });
8435            self
8436        }
8437    }
8438    impl ::std::convert::TryFrom<BeamListItemHooksItem>
8439    for super::BeamListItemHooksItem {
8440        type Error = super::error::ConversionError;
8441        fn try_from(
8442            value: BeamListItemHooksItem,
8443        ) -> ::std::result::Result<Self, super::error::ConversionError> {
8444            Ok(Self {
8445                direction: value.direction?,
8446                event: value.event?,
8447            })
8448        }
8449    }
8450    impl ::std::convert::From<super::BeamListItemHooksItem> for BeamListItemHooksItem {
8451        fn from(value: super::BeamListItemHooksItem) -> Self {
8452            Self {
8453                direction: Ok(value.direction),
8454                event: Ok(value.event),
8455            }
8456        }
8457    }
8458    #[derive(Clone, Debug)]
8459    pub struct Event {
8460        duration: ::std::result::Result<
8461            ::std::option::Option<super::NoteValue>,
8462            ::std::string::String,
8463        >,
8464        id: ::std::result::Result<
8465            ::std::option::Option<super::Id>,
8466            ::std::string::String,
8467        >,
8468        lyrics: ::std::result::Result<
8469            ::std::option::Option<super::EventLyrics>,
8470            ::std::string::String,
8471        >,
8472        markings: ::std::result::Result<
8473            ::std::option::Option<super::EventMarkings>,
8474            ::std::string::String,
8475        >,
8476        measure: ::std::result::Result<
8477            ::std::option::Option<bool>,
8478            ::std::string::String,
8479        >,
8480        notes: ::std::result::Result<
8481            ::std::vec::Vec<super::EventNotesItem>,
8482            ::std::string::String,
8483        >,
8484        orient: ::std::result::Result<
8485            ::std::option::Option<super::Orientation>,
8486            ::std::string::String,
8487        >,
8488        rest: ::std::result::Result<
8489            ::std::option::Option<super::EventRest>,
8490            ::std::string::String,
8491        >,
8492        slurs: ::std::result::Result<
8493            ::std::vec::Vec<super::EventSlursItem>,
8494            ::std::string::String,
8495        >,
8496        smufl_font: ::std::result::Result<
8497            ::std::option::Option<super::SmuflFont>,
8498            ::std::string::String,
8499        >,
8500        staff: ::std::result::Result<
8501            ::std::option::Option<super::StaffNumber>,
8502            ::std::string::String,
8503        >,
8504        stem_direction: ::std::result::Result<
8505            ::std::option::Option<super::StemDirection>,
8506            ::std::string::String,
8507        >,
8508        type_: ::std::result::Result<
8509            ::std::option::Option<::std::string::String>,
8510            ::std::string::String,
8511        >,
8512    }
8513    impl ::std::default::Default for Event {
8514        fn default() -> Self {
8515            Self {
8516                duration: Ok(Default::default()),
8517                id: Ok(Default::default()),
8518                lyrics: Ok(Default::default()),
8519                markings: Ok(Default::default()),
8520                measure: Ok(Default::default()),
8521                notes: Ok(Default::default()),
8522                orient: Ok(Default::default()),
8523                rest: Ok(Default::default()),
8524                slurs: Ok(Default::default()),
8525                smufl_font: Ok(Default::default()),
8526                staff: Ok(Default::default()),
8527                stem_direction: Ok(Default::default()),
8528                type_: Ok(Default::default()),
8529            }
8530        }
8531    }
8532    impl Event {
8533        pub fn duration<T>(mut self, value: T) -> Self
8534        where
8535            T: ::std::convert::TryInto<::std::option::Option<super::NoteValue>>,
8536            T::Error: ::std::fmt::Display,
8537        {
8538            self.duration = value
8539                .try_into()
8540                .map_err(|e| {
8541                    format!("error converting supplied value for duration: {}", e)
8542                });
8543            self
8544        }
8545        pub fn id<T>(mut self, value: T) -> Self
8546        where
8547            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
8548            T::Error: ::std::fmt::Display,
8549        {
8550            self.id = value
8551                .try_into()
8552                .map_err(|e| format!("error converting supplied value for id: {}", e));
8553            self
8554        }
8555        pub fn lyrics<T>(mut self, value: T) -> Self
8556        where
8557            T: ::std::convert::TryInto<::std::option::Option<super::EventLyrics>>,
8558            T::Error: ::std::fmt::Display,
8559        {
8560            self.lyrics = value
8561                .try_into()
8562                .map_err(|e| {
8563                    format!("error converting supplied value for lyrics: {}", e)
8564                });
8565            self
8566        }
8567        pub fn markings<T>(mut self, value: T) -> Self
8568        where
8569            T: ::std::convert::TryInto<::std::option::Option<super::EventMarkings>>,
8570            T::Error: ::std::fmt::Display,
8571        {
8572            self.markings = value
8573                .try_into()
8574                .map_err(|e| {
8575                    format!("error converting supplied value for markings: {}", e)
8576                });
8577            self
8578        }
8579        pub fn measure<T>(mut self, value: T) -> Self
8580        where
8581            T: ::std::convert::TryInto<::std::option::Option<bool>>,
8582            T::Error: ::std::fmt::Display,
8583        {
8584            self.measure = value
8585                .try_into()
8586                .map_err(|e| {
8587                    format!("error converting supplied value for measure: {}", e)
8588                });
8589            self
8590        }
8591        pub fn notes<T>(mut self, value: T) -> Self
8592        where
8593            T: ::std::convert::TryInto<::std::vec::Vec<super::EventNotesItem>>,
8594            T::Error: ::std::fmt::Display,
8595        {
8596            self.notes = value
8597                .try_into()
8598                .map_err(|e| {
8599                    format!("error converting supplied value for notes: {}", e)
8600                });
8601            self
8602        }
8603        pub fn orient<T>(mut self, value: T) -> Self
8604        where
8605            T: ::std::convert::TryInto<::std::option::Option<super::Orientation>>,
8606            T::Error: ::std::fmt::Display,
8607        {
8608            self.orient = value
8609                .try_into()
8610                .map_err(|e| {
8611                    format!("error converting supplied value for orient: {}", e)
8612                });
8613            self
8614        }
8615        pub fn rest<T>(mut self, value: T) -> Self
8616        where
8617            T: ::std::convert::TryInto<::std::option::Option<super::EventRest>>,
8618            T::Error: ::std::fmt::Display,
8619        {
8620            self.rest = value
8621                .try_into()
8622                .map_err(|e| format!("error converting supplied value for rest: {}", e));
8623            self
8624        }
8625        pub fn slurs<T>(mut self, value: T) -> Self
8626        where
8627            T: ::std::convert::TryInto<::std::vec::Vec<super::EventSlursItem>>,
8628            T::Error: ::std::fmt::Display,
8629        {
8630            self.slurs = value
8631                .try_into()
8632                .map_err(|e| {
8633                    format!("error converting supplied value for slurs: {}", e)
8634                });
8635            self
8636        }
8637        pub fn smufl_font<T>(mut self, value: T) -> Self
8638        where
8639            T: ::std::convert::TryInto<::std::option::Option<super::SmuflFont>>,
8640            T::Error: ::std::fmt::Display,
8641        {
8642            self.smufl_font = value
8643                .try_into()
8644                .map_err(|e| {
8645                    format!("error converting supplied value for smufl_font: {}", e)
8646                });
8647            self
8648        }
8649        pub fn staff<T>(mut self, value: T) -> Self
8650        where
8651            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
8652            T::Error: ::std::fmt::Display,
8653        {
8654            self.staff = value
8655                .try_into()
8656                .map_err(|e| {
8657                    format!("error converting supplied value for staff: {}", e)
8658                });
8659            self
8660        }
8661        pub fn stem_direction<T>(mut self, value: T) -> Self
8662        where
8663            T: ::std::convert::TryInto<::std::option::Option<super::StemDirection>>,
8664            T::Error: ::std::fmt::Display,
8665        {
8666            self.stem_direction = value
8667                .try_into()
8668                .map_err(|e| {
8669                    format!("error converting supplied value for stem_direction: {}", e)
8670                });
8671            self
8672        }
8673        pub fn type_<T>(mut self, value: T) -> Self
8674        where
8675            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
8676            T::Error: ::std::fmt::Display,
8677        {
8678            self.type_ = value
8679                .try_into()
8680                .map_err(|e| {
8681                    format!("error converting supplied value for type_: {}", e)
8682                });
8683            self
8684        }
8685    }
8686    impl ::std::convert::TryFrom<Event> for super::Event {
8687        type Error = super::error::ConversionError;
8688        fn try_from(
8689            value: Event,
8690        ) -> ::std::result::Result<Self, super::error::ConversionError> {
8691            Ok(Self {
8692                duration: value.duration?,
8693                id: value.id?,
8694                lyrics: value.lyrics?,
8695                markings: value.markings?,
8696                measure: value.measure?,
8697                notes: value.notes?,
8698                orient: value.orient?,
8699                rest: value.rest?,
8700                slurs: value.slurs?,
8701                smufl_font: value.smufl_font?,
8702                staff: value.staff?,
8703                stem_direction: value.stem_direction?,
8704                type_: value.type_?,
8705            })
8706        }
8707    }
8708    impl ::std::convert::From<super::Event> for Event {
8709        fn from(value: super::Event) -> Self {
8710            Self {
8711                duration: Ok(value.duration),
8712                id: Ok(value.id),
8713                lyrics: Ok(value.lyrics),
8714                markings: Ok(value.markings),
8715                measure: Ok(value.measure),
8716                notes: Ok(value.notes),
8717                orient: Ok(value.orient),
8718                rest: Ok(value.rest),
8719                slurs: Ok(value.slurs),
8720                smufl_font: Ok(value.smufl_font),
8721                staff: Ok(value.staff),
8722                stem_direction: Ok(value.stem_direction),
8723                type_: Ok(value.type_),
8724            }
8725        }
8726    }
8727    #[derive(Clone, Debug)]
8728    pub struct EventLyrics {
8729        lines: ::std::result::Result<
8730            ::std::collections::HashMap<
8731                super::EventLyricsLinesKey,
8732                super::EventLyricsLinesValue,
8733            >,
8734            ::std::string::String,
8735        >,
8736    }
8737    impl ::std::default::Default for EventLyrics {
8738        fn default() -> Self {
8739            Self {
8740                lines: Ok(Default::default()),
8741            }
8742        }
8743    }
8744    impl EventLyrics {
8745        pub fn lines<T>(mut self, value: T) -> Self
8746        where
8747            T: ::std::convert::TryInto<
8748                ::std::collections::HashMap<
8749                    super::EventLyricsLinesKey,
8750                    super::EventLyricsLinesValue,
8751                >,
8752            >,
8753            T::Error: ::std::fmt::Display,
8754        {
8755            self.lines = value
8756                .try_into()
8757                .map_err(|e| {
8758                    format!("error converting supplied value for lines: {}", e)
8759                });
8760            self
8761        }
8762    }
8763    impl ::std::convert::TryFrom<EventLyrics> for super::EventLyrics {
8764        type Error = super::error::ConversionError;
8765        fn try_from(
8766            value: EventLyrics,
8767        ) -> ::std::result::Result<Self, super::error::ConversionError> {
8768            Ok(Self { lines: value.lines? })
8769        }
8770    }
8771    impl ::std::convert::From<super::EventLyrics> for EventLyrics {
8772        fn from(value: super::EventLyrics) -> Self {
8773            Self { lines: Ok(value.lines) }
8774        }
8775    }
8776    #[derive(Clone, Debug)]
8777    pub struct EventLyricsLinesValue {
8778        text: ::std::result::Result<super::String, ::std::string::String>,
8779        type_: ::std::result::Result<
8780            ::std::option::Option<super::EventLyricsLinesValueType>,
8781            ::std::string::String,
8782        >,
8783    }
8784    impl ::std::default::Default for EventLyricsLinesValue {
8785        fn default() -> Self {
8786            Self {
8787                text: Err("no value supplied for text".to_string()),
8788                type_: Ok(Default::default()),
8789            }
8790        }
8791    }
8792    impl EventLyricsLinesValue {
8793        pub fn text<T>(mut self, value: T) -> Self
8794        where
8795            T: ::std::convert::TryInto<super::String>,
8796            T::Error: ::std::fmt::Display,
8797        {
8798            self.text = value
8799                .try_into()
8800                .map_err(|e| format!("error converting supplied value for text: {}", e));
8801            self
8802        }
8803        pub fn type_<T>(mut self, value: T) -> Self
8804        where
8805            T: ::std::convert::TryInto<
8806                ::std::option::Option<super::EventLyricsLinesValueType>,
8807            >,
8808            T::Error: ::std::fmt::Display,
8809        {
8810            self.type_ = value
8811                .try_into()
8812                .map_err(|e| {
8813                    format!("error converting supplied value for type_: {}", e)
8814                });
8815            self
8816        }
8817    }
8818    impl ::std::convert::TryFrom<EventLyricsLinesValue>
8819    for super::EventLyricsLinesValue {
8820        type Error = super::error::ConversionError;
8821        fn try_from(
8822            value: EventLyricsLinesValue,
8823        ) -> ::std::result::Result<Self, super::error::ConversionError> {
8824            Ok(Self {
8825                text: value.text?,
8826                type_: value.type_?,
8827            })
8828        }
8829    }
8830    impl ::std::convert::From<super::EventLyricsLinesValue> for EventLyricsLinesValue {
8831        fn from(value: super::EventLyricsLinesValue) -> Self {
8832            Self {
8833                text: Ok(value.text),
8834                type_: Ok(value.type_),
8835            }
8836        }
8837    }
8838    #[derive(Clone, Debug)]
8839    pub struct EventMarkings {
8840        accent: ::std::result::Result<
8841            ::std::option::Option<super::EventMarkingsAccent>,
8842            ::std::string::String,
8843        >,
8844        breath: ::std::result::Result<
8845            ::std::option::Option<super::EventMarkingsBreath>,
8846            ::std::string::String,
8847        >,
8848        soft_accent: ::std::result::Result<
8849            ::std::option::Option<super::EventMarkingsSoftAccent>,
8850            ::std::string::String,
8851        >,
8852        spiccato: ::std::result::Result<
8853            ::std::option::Option<super::EventMarkingsSpiccato>,
8854            ::std::string::String,
8855        >,
8856        staccatissimo: ::std::result::Result<
8857            ::std::option::Option<super::EventMarkingsStaccatissimo>,
8858            ::std::string::String,
8859        >,
8860        staccato: ::std::result::Result<
8861            ::std::option::Option<super::EventMarkingsStaccato>,
8862            ::std::string::String,
8863        >,
8864        stress: ::std::result::Result<
8865            ::std::option::Option<super::EventMarkingsStress>,
8866            ::std::string::String,
8867        >,
8868        strong_accent: ::std::result::Result<
8869            ::std::option::Option<super::EventMarkingsStrongAccent>,
8870            ::std::string::String,
8871        >,
8872        tenuto: ::std::result::Result<
8873            ::std::option::Option<super::EventMarkingsTenuto>,
8874            ::std::string::String,
8875        >,
8876        tremolo: ::std::result::Result<
8877            ::std::option::Option<super::EventMarkingsTremolo>,
8878            ::std::string::String,
8879        >,
8880        unstress: ::std::result::Result<
8881            ::std::option::Option<super::EventMarkingsUnstress>,
8882            ::std::string::String,
8883        >,
8884    }
8885    impl ::std::default::Default for EventMarkings {
8886        fn default() -> Self {
8887            Self {
8888                accent: Ok(Default::default()),
8889                breath: Ok(Default::default()),
8890                soft_accent: Ok(Default::default()),
8891                spiccato: Ok(Default::default()),
8892                staccatissimo: Ok(Default::default()),
8893                staccato: Ok(Default::default()),
8894                stress: Ok(Default::default()),
8895                strong_accent: Ok(Default::default()),
8896                tenuto: Ok(Default::default()),
8897                tremolo: Ok(Default::default()),
8898                unstress: Ok(Default::default()),
8899            }
8900        }
8901    }
8902    impl EventMarkings {
8903        pub fn accent<T>(mut self, value: T) -> Self
8904        where
8905            T: ::std::convert::TryInto<
8906                ::std::option::Option<super::EventMarkingsAccent>,
8907            >,
8908            T::Error: ::std::fmt::Display,
8909        {
8910            self.accent = value
8911                .try_into()
8912                .map_err(|e| {
8913                    format!("error converting supplied value for accent: {}", e)
8914                });
8915            self
8916        }
8917        pub fn breath<T>(mut self, value: T) -> Self
8918        where
8919            T: ::std::convert::TryInto<
8920                ::std::option::Option<super::EventMarkingsBreath>,
8921            >,
8922            T::Error: ::std::fmt::Display,
8923        {
8924            self.breath = value
8925                .try_into()
8926                .map_err(|e| {
8927                    format!("error converting supplied value for breath: {}", e)
8928                });
8929            self
8930        }
8931        pub fn soft_accent<T>(mut self, value: T) -> Self
8932        where
8933            T: ::std::convert::TryInto<
8934                ::std::option::Option<super::EventMarkingsSoftAccent>,
8935            >,
8936            T::Error: ::std::fmt::Display,
8937        {
8938            self.soft_accent = value
8939                .try_into()
8940                .map_err(|e| {
8941                    format!("error converting supplied value for soft_accent: {}", e)
8942                });
8943            self
8944        }
8945        pub fn spiccato<T>(mut self, value: T) -> Self
8946        where
8947            T: ::std::convert::TryInto<
8948                ::std::option::Option<super::EventMarkingsSpiccato>,
8949            >,
8950            T::Error: ::std::fmt::Display,
8951        {
8952            self.spiccato = value
8953                .try_into()
8954                .map_err(|e| {
8955                    format!("error converting supplied value for spiccato: {}", e)
8956                });
8957            self
8958        }
8959        pub fn staccatissimo<T>(mut self, value: T) -> Self
8960        where
8961            T: ::std::convert::TryInto<
8962                ::std::option::Option<super::EventMarkingsStaccatissimo>,
8963            >,
8964            T::Error: ::std::fmt::Display,
8965        {
8966            self.staccatissimo = value
8967                .try_into()
8968                .map_err(|e| {
8969                    format!("error converting supplied value for staccatissimo: {}", e)
8970                });
8971            self
8972        }
8973        pub fn staccato<T>(mut self, value: T) -> Self
8974        where
8975            T: ::std::convert::TryInto<
8976                ::std::option::Option<super::EventMarkingsStaccato>,
8977            >,
8978            T::Error: ::std::fmt::Display,
8979        {
8980            self.staccato = value
8981                .try_into()
8982                .map_err(|e| {
8983                    format!("error converting supplied value for staccato: {}", e)
8984                });
8985            self
8986        }
8987        pub fn stress<T>(mut self, value: T) -> Self
8988        where
8989            T: ::std::convert::TryInto<
8990                ::std::option::Option<super::EventMarkingsStress>,
8991            >,
8992            T::Error: ::std::fmt::Display,
8993        {
8994            self.stress = value
8995                .try_into()
8996                .map_err(|e| {
8997                    format!("error converting supplied value for stress: {}", e)
8998                });
8999            self
9000        }
9001        pub fn strong_accent<T>(mut self, value: T) -> Self
9002        where
9003            T: ::std::convert::TryInto<
9004                ::std::option::Option<super::EventMarkingsStrongAccent>,
9005            >,
9006            T::Error: ::std::fmt::Display,
9007        {
9008            self.strong_accent = value
9009                .try_into()
9010                .map_err(|e| {
9011                    format!("error converting supplied value for strong_accent: {}", e)
9012                });
9013            self
9014        }
9015        pub fn tenuto<T>(mut self, value: T) -> Self
9016        where
9017            T: ::std::convert::TryInto<
9018                ::std::option::Option<super::EventMarkingsTenuto>,
9019            >,
9020            T::Error: ::std::fmt::Display,
9021        {
9022            self.tenuto = value
9023                .try_into()
9024                .map_err(|e| {
9025                    format!("error converting supplied value for tenuto: {}", e)
9026                });
9027            self
9028        }
9029        pub fn tremolo<T>(mut self, value: T) -> Self
9030        where
9031            T: ::std::convert::TryInto<
9032                ::std::option::Option<super::EventMarkingsTremolo>,
9033            >,
9034            T::Error: ::std::fmt::Display,
9035        {
9036            self.tremolo = value
9037                .try_into()
9038                .map_err(|e| {
9039                    format!("error converting supplied value for tremolo: {}", e)
9040                });
9041            self
9042        }
9043        pub fn unstress<T>(mut self, value: T) -> Self
9044        where
9045            T: ::std::convert::TryInto<
9046                ::std::option::Option<super::EventMarkingsUnstress>,
9047            >,
9048            T::Error: ::std::fmt::Display,
9049        {
9050            self.unstress = value
9051                .try_into()
9052                .map_err(|e| {
9053                    format!("error converting supplied value for unstress: {}", e)
9054                });
9055            self
9056        }
9057    }
9058    impl ::std::convert::TryFrom<EventMarkings> for super::EventMarkings {
9059        type Error = super::error::ConversionError;
9060        fn try_from(
9061            value: EventMarkings,
9062        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9063            Ok(Self {
9064                accent: value.accent?,
9065                breath: value.breath?,
9066                soft_accent: value.soft_accent?,
9067                spiccato: value.spiccato?,
9068                staccatissimo: value.staccatissimo?,
9069                staccato: value.staccato?,
9070                stress: value.stress?,
9071                strong_accent: value.strong_accent?,
9072                tenuto: value.tenuto?,
9073                tremolo: value.tremolo?,
9074                unstress: value.unstress?,
9075            })
9076        }
9077    }
9078    impl ::std::convert::From<super::EventMarkings> for EventMarkings {
9079        fn from(value: super::EventMarkings) -> Self {
9080            Self {
9081                accent: Ok(value.accent),
9082                breath: Ok(value.breath),
9083                soft_accent: Ok(value.soft_accent),
9084                spiccato: Ok(value.spiccato),
9085                staccatissimo: Ok(value.staccatissimo),
9086                staccato: Ok(value.staccato),
9087                stress: Ok(value.stress),
9088                strong_accent: Ok(value.strong_accent),
9089                tenuto: Ok(value.tenuto),
9090                tremolo: Ok(value.tremolo),
9091                unstress: Ok(value.unstress),
9092            }
9093        }
9094    }
9095    #[derive(Clone, Debug)]
9096    pub struct EventMarkingsAccent {
9097        pointing: ::std::result::Result<
9098            ::std::option::Option<super::UpOrDown>,
9099            ::std::string::String,
9100        >,
9101    }
9102    impl ::std::default::Default for EventMarkingsAccent {
9103        fn default() -> Self {
9104            Self {
9105                pointing: Ok(Default::default()),
9106            }
9107        }
9108    }
9109    impl EventMarkingsAccent {
9110        pub fn pointing<T>(mut self, value: T) -> Self
9111        where
9112            T: ::std::convert::TryInto<::std::option::Option<super::UpOrDown>>,
9113            T::Error: ::std::fmt::Display,
9114        {
9115            self.pointing = value
9116                .try_into()
9117                .map_err(|e| {
9118                    format!("error converting supplied value for pointing: {}", e)
9119                });
9120            self
9121        }
9122    }
9123    impl ::std::convert::TryFrom<EventMarkingsAccent> for super::EventMarkingsAccent {
9124        type Error = super::error::ConversionError;
9125        fn try_from(
9126            value: EventMarkingsAccent,
9127        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9128            Ok(Self { pointing: value.pointing? })
9129        }
9130    }
9131    impl ::std::convert::From<super::EventMarkingsAccent> for EventMarkingsAccent {
9132        fn from(value: super::EventMarkingsAccent) -> Self {
9133            Self {
9134                pointing: Ok(value.pointing),
9135            }
9136        }
9137    }
9138    #[derive(Clone, Debug)]
9139    pub struct EventMarkingsBreath {
9140        symbol: ::std::result::Result<
9141            ::std::option::Option<::std::string::String>,
9142            ::std::string::String,
9143        >,
9144    }
9145    impl ::std::default::Default for EventMarkingsBreath {
9146        fn default() -> Self {
9147            Self {
9148                symbol: Ok(Default::default()),
9149            }
9150        }
9151    }
9152    impl EventMarkingsBreath {
9153        pub fn symbol<T>(mut self, value: T) -> Self
9154        where
9155            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
9156            T::Error: ::std::fmt::Display,
9157        {
9158            self.symbol = value
9159                .try_into()
9160                .map_err(|e| {
9161                    format!("error converting supplied value for symbol: {}", e)
9162                });
9163            self
9164        }
9165    }
9166    impl ::std::convert::TryFrom<EventMarkingsBreath> for super::EventMarkingsBreath {
9167        type Error = super::error::ConversionError;
9168        fn try_from(
9169            value: EventMarkingsBreath,
9170        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9171            Ok(Self { symbol: value.symbol? })
9172        }
9173    }
9174    impl ::std::convert::From<super::EventMarkingsBreath> for EventMarkingsBreath {
9175        fn from(value: super::EventMarkingsBreath) -> Self {
9176            Self { symbol: Ok(value.symbol) }
9177        }
9178    }
9179    #[derive(Clone, Debug)]
9180    pub struct EventMarkingsSoftAccent {}
9181    impl ::std::default::Default for EventMarkingsSoftAccent {
9182        fn default() -> Self {
9183            Self {}
9184        }
9185    }
9186    impl EventMarkingsSoftAccent {}
9187    impl ::std::convert::TryFrom<EventMarkingsSoftAccent>
9188    for super::EventMarkingsSoftAccent {
9189        type Error = super::error::ConversionError;
9190        fn try_from(
9191            _value: EventMarkingsSoftAccent,
9192        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9193            Ok(Self {})
9194        }
9195    }
9196    impl ::std::convert::From<super::EventMarkingsSoftAccent>
9197    for EventMarkingsSoftAccent {
9198        fn from(_value: super::EventMarkingsSoftAccent) -> Self {
9199            Self {}
9200        }
9201    }
9202    #[derive(Clone, Debug)]
9203    pub struct EventMarkingsSpiccato {}
9204    impl ::std::default::Default for EventMarkingsSpiccato {
9205        fn default() -> Self {
9206            Self {}
9207        }
9208    }
9209    impl EventMarkingsSpiccato {}
9210    impl ::std::convert::TryFrom<EventMarkingsSpiccato>
9211    for super::EventMarkingsSpiccato {
9212        type Error = super::error::ConversionError;
9213        fn try_from(
9214            _value: EventMarkingsSpiccato,
9215        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9216            Ok(Self {})
9217        }
9218    }
9219    impl ::std::convert::From<super::EventMarkingsSpiccato> for EventMarkingsSpiccato {
9220        fn from(_value: super::EventMarkingsSpiccato) -> Self {
9221            Self {}
9222        }
9223    }
9224    #[derive(Clone, Debug)]
9225    pub struct EventMarkingsStaccatissimo {}
9226    impl ::std::default::Default for EventMarkingsStaccatissimo {
9227        fn default() -> Self {
9228            Self {}
9229        }
9230    }
9231    impl EventMarkingsStaccatissimo {}
9232    impl ::std::convert::TryFrom<EventMarkingsStaccatissimo>
9233    for super::EventMarkingsStaccatissimo {
9234        type Error = super::error::ConversionError;
9235        fn try_from(
9236            _value: EventMarkingsStaccatissimo,
9237        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9238            Ok(Self {})
9239        }
9240    }
9241    impl ::std::convert::From<super::EventMarkingsStaccatissimo>
9242    for EventMarkingsStaccatissimo {
9243        fn from(_value: super::EventMarkingsStaccatissimo) -> Self {
9244            Self {}
9245        }
9246    }
9247    #[derive(Clone, Debug)]
9248    pub struct EventMarkingsStaccato {}
9249    impl ::std::default::Default for EventMarkingsStaccato {
9250        fn default() -> Self {
9251            Self {}
9252        }
9253    }
9254    impl EventMarkingsStaccato {}
9255    impl ::std::convert::TryFrom<EventMarkingsStaccato>
9256    for super::EventMarkingsStaccato {
9257        type Error = super::error::ConversionError;
9258        fn try_from(
9259            _value: EventMarkingsStaccato,
9260        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9261            Ok(Self {})
9262        }
9263    }
9264    impl ::std::convert::From<super::EventMarkingsStaccato> for EventMarkingsStaccato {
9265        fn from(_value: super::EventMarkingsStaccato) -> Self {
9266            Self {}
9267        }
9268    }
9269    #[derive(Clone, Debug)]
9270    pub struct EventMarkingsStress {}
9271    impl ::std::default::Default for EventMarkingsStress {
9272        fn default() -> Self {
9273            Self {}
9274        }
9275    }
9276    impl EventMarkingsStress {}
9277    impl ::std::convert::TryFrom<EventMarkingsStress> for super::EventMarkingsStress {
9278        type Error = super::error::ConversionError;
9279        fn try_from(
9280            _value: EventMarkingsStress,
9281        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9282            Ok(Self {})
9283        }
9284    }
9285    impl ::std::convert::From<super::EventMarkingsStress> for EventMarkingsStress {
9286        fn from(_value: super::EventMarkingsStress) -> Self {
9287            Self {}
9288        }
9289    }
9290    #[derive(Clone, Debug)]
9291    pub struct EventMarkingsStrongAccent {
9292        pointing: ::std::result::Result<
9293            ::std::option::Option<super::UpOrDown>,
9294            ::std::string::String,
9295        >,
9296    }
9297    impl ::std::default::Default for EventMarkingsStrongAccent {
9298        fn default() -> Self {
9299            Self {
9300                pointing: Ok(Default::default()),
9301            }
9302        }
9303    }
9304    impl EventMarkingsStrongAccent {
9305        pub fn pointing<T>(mut self, value: T) -> Self
9306        where
9307            T: ::std::convert::TryInto<::std::option::Option<super::UpOrDown>>,
9308            T::Error: ::std::fmt::Display,
9309        {
9310            self.pointing = value
9311                .try_into()
9312                .map_err(|e| {
9313                    format!("error converting supplied value for pointing: {}", e)
9314                });
9315            self
9316        }
9317    }
9318    impl ::std::convert::TryFrom<EventMarkingsStrongAccent>
9319    for super::EventMarkingsStrongAccent {
9320        type Error = super::error::ConversionError;
9321        fn try_from(
9322            value: EventMarkingsStrongAccent,
9323        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9324            Ok(Self { pointing: value.pointing? })
9325        }
9326    }
9327    impl ::std::convert::From<super::EventMarkingsStrongAccent>
9328    for EventMarkingsStrongAccent {
9329        fn from(value: super::EventMarkingsStrongAccent) -> Self {
9330            Self {
9331                pointing: Ok(value.pointing),
9332            }
9333        }
9334    }
9335    #[derive(Clone, Debug)]
9336    pub struct EventMarkingsTenuto {}
9337    impl ::std::default::Default for EventMarkingsTenuto {
9338        fn default() -> Self {
9339            Self {}
9340        }
9341    }
9342    impl EventMarkingsTenuto {}
9343    impl ::std::convert::TryFrom<EventMarkingsTenuto> for super::EventMarkingsTenuto {
9344        type Error = super::error::ConversionError;
9345        fn try_from(
9346            _value: EventMarkingsTenuto,
9347        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9348            Ok(Self {})
9349        }
9350    }
9351    impl ::std::convert::From<super::EventMarkingsTenuto> for EventMarkingsTenuto {
9352        fn from(_value: super::EventMarkingsTenuto) -> Self {
9353            Self {}
9354        }
9355    }
9356    #[derive(Clone, Debug)]
9357    pub struct EventMarkingsTremolo {
9358        marks: ::std::result::Result<super::PositiveInteger, ::std::string::String>,
9359    }
9360    impl ::std::default::Default for EventMarkingsTremolo {
9361        fn default() -> Self {
9362            Self {
9363                marks: Err("no value supplied for marks".to_string()),
9364            }
9365        }
9366    }
9367    impl EventMarkingsTremolo {
9368        pub fn marks<T>(mut self, value: T) -> Self
9369        where
9370            T: ::std::convert::TryInto<super::PositiveInteger>,
9371            T::Error: ::std::fmt::Display,
9372        {
9373            self.marks = value
9374                .try_into()
9375                .map_err(|e| {
9376                    format!("error converting supplied value for marks: {}", e)
9377                });
9378            self
9379        }
9380    }
9381    impl ::std::convert::TryFrom<EventMarkingsTremolo> for super::EventMarkingsTremolo {
9382        type Error = super::error::ConversionError;
9383        fn try_from(
9384            value: EventMarkingsTremolo,
9385        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9386            Ok(Self { marks: value.marks? })
9387        }
9388    }
9389    impl ::std::convert::From<super::EventMarkingsTremolo> for EventMarkingsTremolo {
9390        fn from(value: super::EventMarkingsTremolo) -> Self {
9391            Self { marks: Ok(value.marks) }
9392        }
9393    }
9394    #[derive(Clone, Debug)]
9395    pub struct EventMarkingsUnstress {}
9396    impl ::std::default::Default for EventMarkingsUnstress {
9397        fn default() -> Self {
9398            Self {}
9399        }
9400    }
9401    impl EventMarkingsUnstress {}
9402    impl ::std::convert::TryFrom<EventMarkingsUnstress>
9403    for super::EventMarkingsUnstress {
9404        type Error = super::error::ConversionError;
9405        fn try_from(
9406            _value: EventMarkingsUnstress,
9407        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9408            Ok(Self {})
9409        }
9410    }
9411    impl ::std::convert::From<super::EventMarkingsUnstress> for EventMarkingsUnstress {
9412        fn from(_value: super::EventMarkingsUnstress) -> Self {
9413            Self {}
9414        }
9415    }
9416    #[derive(Clone, Debug)]
9417    pub struct EventNotesItem {
9418        accidental_display: ::std::result::Result<
9419            ::std::option::Option<super::EventNotesItemAccidentalDisplay>,
9420            ::std::string::String,
9421        >,
9422        class: ::std::result::Result<
9423            ::std::option::Option<super::StyleClass>,
9424            ::std::string::String,
9425        >,
9426        id: ::std::result::Result<
9427            ::std::option::Option<super::Id>,
9428            ::std::string::String,
9429        >,
9430        perform: ::std::result::Result<
9431            ::std::option::Option<super::EventNotesItemPerform>,
9432            ::std::string::String,
9433        >,
9434        pitch: ::std::result::Result<super::EventNotesItemPitch, ::std::string::String>,
9435        smufl_font: ::std::result::Result<
9436            ::std::option::Option<super::SmuflFont>,
9437            ::std::string::String,
9438        >,
9439        staff: ::std::result::Result<
9440            ::std::option::Option<super::StaffNumber>,
9441            ::std::string::String,
9442        >,
9443        ties: ::std::result::Result<
9444            ::std::vec::Vec<super::EventNotesItemTiesItem>,
9445            ::std::string::String,
9446        >,
9447    }
9448    impl ::std::default::Default for EventNotesItem {
9449        fn default() -> Self {
9450            Self {
9451                accidental_display: Ok(Default::default()),
9452                class: Ok(Default::default()),
9453                id: Ok(Default::default()),
9454                perform: Ok(Default::default()),
9455                pitch: Err("no value supplied for pitch".to_string()),
9456                smufl_font: Ok(Default::default()),
9457                staff: Ok(Default::default()),
9458                ties: Ok(Default::default()),
9459            }
9460        }
9461    }
9462    impl EventNotesItem {
9463        pub fn accidental_display<T>(mut self, value: T) -> Self
9464        where
9465            T: ::std::convert::TryInto<
9466                ::std::option::Option<super::EventNotesItemAccidentalDisplay>,
9467            >,
9468            T::Error: ::std::fmt::Display,
9469        {
9470            self.accidental_display = value
9471                .try_into()
9472                .map_err(|e| {
9473                    format!(
9474                        "error converting supplied value for accidental_display: {}", e
9475                    )
9476                });
9477            self
9478        }
9479        pub fn class<T>(mut self, value: T) -> Self
9480        where
9481            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
9482            T::Error: ::std::fmt::Display,
9483        {
9484            self.class = value
9485                .try_into()
9486                .map_err(|e| {
9487                    format!("error converting supplied value for class: {}", e)
9488                });
9489            self
9490        }
9491        pub fn id<T>(mut self, value: T) -> Self
9492        where
9493            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
9494            T::Error: ::std::fmt::Display,
9495        {
9496            self.id = value
9497                .try_into()
9498                .map_err(|e| format!("error converting supplied value for id: {}", e));
9499            self
9500        }
9501        pub fn perform<T>(mut self, value: T) -> Self
9502        where
9503            T: ::std::convert::TryInto<
9504                ::std::option::Option<super::EventNotesItemPerform>,
9505            >,
9506            T::Error: ::std::fmt::Display,
9507        {
9508            self.perform = value
9509                .try_into()
9510                .map_err(|e| {
9511                    format!("error converting supplied value for perform: {}", e)
9512                });
9513            self
9514        }
9515        pub fn pitch<T>(mut self, value: T) -> Self
9516        where
9517            T: ::std::convert::TryInto<super::EventNotesItemPitch>,
9518            T::Error: ::std::fmt::Display,
9519        {
9520            self.pitch = value
9521                .try_into()
9522                .map_err(|e| {
9523                    format!("error converting supplied value for pitch: {}", e)
9524                });
9525            self
9526        }
9527        pub fn smufl_font<T>(mut self, value: T) -> Self
9528        where
9529            T: ::std::convert::TryInto<::std::option::Option<super::SmuflFont>>,
9530            T::Error: ::std::fmt::Display,
9531        {
9532            self.smufl_font = value
9533                .try_into()
9534                .map_err(|e| {
9535                    format!("error converting supplied value for smufl_font: {}", e)
9536                });
9537            self
9538        }
9539        pub fn staff<T>(mut self, value: T) -> Self
9540        where
9541            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
9542            T::Error: ::std::fmt::Display,
9543        {
9544            self.staff = value
9545                .try_into()
9546                .map_err(|e| {
9547                    format!("error converting supplied value for staff: {}", e)
9548                });
9549            self
9550        }
9551        pub fn ties<T>(mut self, value: T) -> Self
9552        where
9553            T: ::std::convert::TryInto<::std::vec::Vec<super::EventNotesItemTiesItem>>,
9554            T::Error: ::std::fmt::Display,
9555        {
9556            self.ties = value
9557                .try_into()
9558                .map_err(|e| format!("error converting supplied value for ties: {}", e));
9559            self
9560        }
9561    }
9562    impl ::std::convert::TryFrom<EventNotesItem> for super::EventNotesItem {
9563        type Error = super::error::ConversionError;
9564        fn try_from(
9565            value: EventNotesItem,
9566        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9567            Ok(Self {
9568                accidental_display: value.accidental_display?,
9569                class: value.class?,
9570                id: value.id?,
9571                perform: value.perform?,
9572                pitch: value.pitch?,
9573                smufl_font: value.smufl_font?,
9574                staff: value.staff?,
9575                ties: value.ties?,
9576            })
9577        }
9578    }
9579    impl ::std::convert::From<super::EventNotesItem> for EventNotesItem {
9580        fn from(value: super::EventNotesItem) -> Self {
9581            Self {
9582                accidental_display: Ok(value.accidental_display),
9583                class: Ok(value.class),
9584                id: Ok(value.id),
9585                perform: Ok(value.perform),
9586                pitch: Ok(value.pitch),
9587                smufl_font: Ok(value.smufl_font),
9588                staff: Ok(value.staff),
9589                ties: Ok(value.ties),
9590            }
9591        }
9592    }
9593    #[derive(Clone, Debug)]
9594    pub struct EventNotesItemAccidentalDisplay {
9595        enclosure: ::std::result::Result<
9596            ::std::option::Option<super::EventNotesItemAccidentalDisplayEnclosure>,
9597            ::std::string::String,
9598        >,
9599        force: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
9600        show: ::std::result::Result<bool, ::std::string::String>,
9601    }
9602    impl ::std::default::Default for EventNotesItemAccidentalDisplay {
9603        fn default() -> Self {
9604            Self {
9605                enclosure: Ok(Default::default()),
9606                force: Ok(Default::default()),
9607                show: Err("no value supplied for show".to_string()),
9608            }
9609        }
9610    }
9611    impl EventNotesItemAccidentalDisplay {
9612        pub fn enclosure<T>(mut self, value: T) -> Self
9613        where
9614            T: ::std::convert::TryInto<
9615                ::std::option::Option<super::EventNotesItemAccidentalDisplayEnclosure>,
9616            >,
9617            T::Error: ::std::fmt::Display,
9618        {
9619            self.enclosure = value
9620                .try_into()
9621                .map_err(|e| {
9622                    format!("error converting supplied value for enclosure: {}", e)
9623                });
9624            self
9625        }
9626        pub fn force<T>(mut self, value: T) -> Self
9627        where
9628            T: ::std::convert::TryInto<::std::option::Option<bool>>,
9629            T::Error: ::std::fmt::Display,
9630        {
9631            self.force = value
9632                .try_into()
9633                .map_err(|e| {
9634                    format!("error converting supplied value for force: {}", e)
9635                });
9636            self
9637        }
9638        pub fn show<T>(mut self, value: T) -> Self
9639        where
9640            T: ::std::convert::TryInto<bool>,
9641            T::Error: ::std::fmt::Display,
9642        {
9643            self.show = value
9644                .try_into()
9645                .map_err(|e| format!("error converting supplied value for show: {}", e));
9646            self
9647        }
9648    }
9649    impl ::std::convert::TryFrom<EventNotesItemAccidentalDisplay>
9650    for super::EventNotesItemAccidentalDisplay {
9651        type Error = super::error::ConversionError;
9652        fn try_from(
9653            value: EventNotesItemAccidentalDisplay,
9654        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9655            Ok(Self {
9656                enclosure: value.enclosure?,
9657                force: value.force?,
9658                show: value.show?,
9659            })
9660        }
9661    }
9662    impl ::std::convert::From<super::EventNotesItemAccidentalDisplay>
9663    for EventNotesItemAccidentalDisplay {
9664        fn from(value: super::EventNotesItemAccidentalDisplay) -> Self {
9665            Self {
9666                enclosure: Ok(value.enclosure),
9667                force: Ok(value.force),
9668                show: Ok(value.show),
9669            }
9670        }
9671    }
9672    #[derive(Clone, Debug)]
9673    pub struct EventNotesItemAccidentalDisplayEnclosure {
9674        symbol: ::std::result::Result<
9675            super::EventNotesItemAccidentalDisplayEnclosureSymbol,
9676            ::std::string::String,
9677        >,
9678    }
9679    impl ::std::default::Default for EventNotesItemAccidentalDisplayEnclosure {
9680        fn default() -> Self {
9681            Self {
9682                symbol: Err("no value supplied for symbol".to_string()),
9683            }
9684        }
9685    }
9686    impl EventNotesItemAccidentalDisplayEnclosure {
9687        pub fn symbol<T>(mut self, value: T) -> Self
9688        where
9689            T: ::std::convert::TryInto<
9690                super::EventNotesItemAccidentalDisplayEnclosureSymbol,
9691            >,
9692            T::Error: ::std::fmt::Display,
9693        {
9694            self.symbol = value
9695                .try_into()
9696                .map_err(|e| {
9697                    format!("error converting supplied value for symbol: {}", e)
9698                });
9699            self
9700        }
9701    }
9702    impl ::std::convert::TryFrom<EventNotesItemAccidentalDisplayEnclosure>
9703    for super::EventNotesItemAccidentalDisplayEnclosure {
9704        type Error = super::error::ConversionError;
9705        fn try_from(
9706            value: EventNotesItemAccidentalDisplayEnclosure,
9707        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9708            Ok(Self { symbol: value.symbol? })
9709        }
9710    }
9711    impl ::std::convert::From<super::EventNotesItemAccidentalDisplayEnclosure>
9712    for EventNotesItemAccidentalDisplayEnclosure {
9713        fn from(value: super::EventNotesItemAccidentalDisplayEnclosure) -> Self {
9714            Self { symbol: Ok(value.symbol) }
9715        }
9716    }
9717    #[derive(Clone, Debug)]
9718    pub struct EventNotesItemPerform {}
9719    impl ::std::default::Default for EventNotesItemPerform {
9720        fn default() -> Self {
9721            Self {}
9722        }
9723    }
9724    impl EventNotesItemPerform {}
9725    impl ::std::convert::TryFrom<EventNotesItemPerform>
9726    for super::EventNotesItemPerform {
9727        type Error = super::error::ConversionError;
9728        fn try_from(
9729            _value: EventNotesItemPerform,
9730        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9731            Ok(Self {})
9732        }
9733    }
9734    impl ::std::convert::From<super::EventNotesItemPerform> for EventNotesItemPerform {
9735        fn from(_value: super::EventNotesItemPerform) -> Self {
9736            Self {}
9737        }
9738    }
9739    #[derive(Clone, Debug)]
9740    pub struct EventNotesItemPitch {
9741        alter: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
9742        octave: ::std::result::Result<i64, ::std::string::String>,
9743        step: ::std::result::Result<
9744            super::EventNotesItemPitchStep,
9745            ::std::string::String,
9746        >,
9747    }
9748    impl ::std::default::Default for EventNotesItemPitch {
9749        fn default() -> Self {
9750            Self {
9751                alter: Ok(Default::default()),
9752                octave: Err("no value supplied for octave".to_string()),
9753                step: Err("no value supplied for step".to_string()),
9754            }
9755        }
9756    }
9757    impl EventNotesItemPitch {
9758        pub fn alter<T>(mut self, value: T) -> Self
9759        where
9760            T: ::std::convert::TryInto<::std::option::Option<i64>>,
9761            T::Error: ::std::fmt::Display,
9762        {
9763            self.alter = value
9764                .try_into()
9765                .map_err(|e| {
9766                    format!("error converting supplied value for alter: {}", e)
9767                });
9768            self
9769        }
9770        pub fn octave<T>(mut self, value: T) -> Self
9771        where
9772            T: ::std::convert::TryInto<i64>,
9773            T::Error: ::std::fmt::Display,
9774        {
9775            self.octave = value
9776                .try_into()
9777                .map_err(|e| {
9778                    format!("error converting supplied value for octave: {}", e)
9779                });
9780            self
9781        }
9782        pub fn step<T>(mut self, value: T) -> Self
9783        where
9784            T: ::std::convert::TryInto<super::EventNotesItemPitchStep>,
9785            T::Error: ::std::fmt::Display,
9786        {
9787            self.step = value
9788                .try_into()
9789                .map_err(|e| format!("error converting supplied value for step: {}", e));
9790            self
9791        }
9792    }
9793    impl ::std::convert::TryFrom<EventNotesItemPitch> for super::EventNotesItemPitch {
9794        type Error = super::error::ConversionError;
9795        fn try_from(
9796            value: EventNotesItemPitch,
9797        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9798            Ok(Self {
9799                alter: value.alter?,
9800                octave: value.octave?,
9801                step: value.step?,
9802            })
9803        }
9804    }
9805    impl ::std::convert::From<super::EventNotesItemPitch> for EventNotesItemPitch {
9806        fn from(value: super::EventNotesItemPitch) -> Self {
9807            Self {
9808                alter: Ok(value.alter),
9809                octave: Ok(value.octave),
9810                step: Ok(value.step),
9811            }
9812        }
9813    }
9814    #[derive(Clone, Debug)]
9815    pub struct EventNotesItemTiesItem {
9816        lv: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
9817        side: ::std::result::Result<
9818            ::std::option::Option<super::SlurSide>,
9819            ::std::string::String,
9820        >,
9821        target: ::std::result::Result<
9822            ::std::option::Option<super::Id>,
9823            ::std::string::String,
9824        >,
9825    }
9826    impl ::std::default::Default for EventNotesItemTiesItem {
9827        fn default() -> Self {
9828            Self {
9829                lv: Ok(Default::default()),
9830                side: Ok(Default::default()),
9831                target: Ok(Default::default()),
9832            }
9833        }
9834    }
9835    impl EventNotesItemTiesItem {
9836        pub fn lv<T>(mut self, value: T) -> Self
9837        where
9838            T: ::std::convert::TryInto<::std::option::Option<bool>>,
9839            T::Error: ::std::fmt::Display,
9840        {
9841            self.lv = value
9842                .try_into()
9843                .map_err(|e| format!("error converting supplied value for lv: {}", e));
9844            self
9845        }
9846        pub fn side<T>(mut self, value: T) -> Self
9847        where
9848            T: ::std::convert::TryInto<::std::option::Option<super::SlurSide>>,
9849            T::Error: ::std::fmt::Display,
9850        {
9851            self.side = value
9852                .try_into()
9853                .map_err(|e| format!("error converting supplied value for side: {}", e));
9854            self
9855        }
9856        pub fn target<T>(mut self, value: T) -> Self
9857        where
9858            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
9859            T::Error: ::std::fmt::Display,
9860        {
9861            self.target = value
9862                .try_into()
9863                .map_err(|e| {
9864                    format!("error converting supplied value for target: {}", e)
9865                });
9866            self
9867        }
9868    }
9869    impl ::std::convert::TryFrom<EventNotesItemTiesItem>
9870    for super::EventNotesItemTiesItem {
9871        type Error = super::error::ConversionError;
9872        fn try_from(
9873            value: EventNotesItemTiesItem,
9874        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9875            Ok(Self {
9876                lv: value.lv?,
9877                side: value.side?,
9878                target: value.target?,
9879            })
9880        }
9881    }
9882    impl ::std::convert::From<super::EventNotesItemTiesItem> for EventNotesItemTiesItem {
9883        fn from(value: super::EventNotesItemTiesItem) -> Self {
9884            Self {
9885                lv: Ok(value.lv),
9886                side: Ok(value.side),
9887                target: Ok(value.target),
9888            }
9889        }
9890    }
9891    #[derive(Clone, Debug)]
9892    pub struct EventRest {
9893        staff_position: ::std::result::Result<
9894            ::std::option::Option<super::StaffPosition>,
9895            ::std::string::String,
9896        >,
9897    }
9898    impl ::std::default::Default for EventRest {
9899        fn default() -> Self {
9900            Self {
9901                staff_position: Ok(Default::default()),
9902            }
9903        }
9904    }
9905    impl EventRest {
9906        pub fn staff_position<T>(mut self, value: T) -> Self
9907        where
9908            T: ::std::convert::TryInto<::std::option::Option<super::StaffPosition>>,
9909            T::Error: ::std::fmt::Display,
9910        {
9911            self.staff_position = value
9912                .try_into()
9913                .map_err(|e| {
9914                    format!("error converting supplied value for staff_position: {}", e)
9915                });
9916            self
9917        }
9918    }
9919    impl ::std::convert::TryFrom<EventRest> for super::EventRest {
9920        type Error = super::error::ConversionError;
9921        fn try_from(
9922            value: EventRest,
9923        ) -> ::std::result::Result<Self, super::error::ConversionError> {
9924            Ok(Self {
9925                staff_position: value.staff_position?,
9926            })
9927        }
9928    }
9929    impl ::std::convert::From<super::EventRest> for EventRest {
9930        fn from(value: super::EventRest) -> Self {
9931            Self {
9932                staff_position: Ok(value.staff_position),
9933            }
9934        }
9935    }
9936    #[derive(Clone, Debug)]
9937    pub struct EventSlursItem {
9938        end_note: ::std::result::Result<
9939            ::std::option::Option<super::Id>,
9940            ::std::string::String,
9941        >,
9942        line_type: ::std::result::Result<
9943            ::std::option::Option<super::EventSlursItemLineType>,
9944            ::std::string::String,
9945        >,
9946        side: ::std::result::Result<
9947            ::std::option::Option<super::SlurSide>,
9948            ::std::string::String,
9949        >,
9950        side_end: ::std::result::Result<
9951            ::std::option::Option<super::SlurSide>,
9952            ::std::string::String,
9953        >,
9954        start_note: ::std::result::Result<
9955            ::std::option::Option<super::Id>,
9956            ::std::string::String,
9957        >,
9958        target: ::std::result::Result<super::Id, ::std::string::String>,
9959    }
9960    impl ::std::default::Default for EventSlursItem {
9961        fn default() -> Self {
9962            Self {
9963                end_note: Ok(Default::default()),
9964                line_type: Ok(Default::default()),
9965                side: Ok(Default::default()),
9966                side_end: Ok(Default::default()),
9967                start_note: Ok(Default::default()),
9968                target: Err("no value supplied for target".to_string()),
9969            }
9970        }
9971    }
9972    impl EventSlursItem {
9973        pub fn end_note<T>(mut self, value: T) -> Self
9974        where
9975            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
9976            T::Error: ::std::fmt::Display,
9977        {
9978            self.end_note = value
9979                .try_into()
9980                .map_err(|e| {
9981                    format!("error converting supplied value for end_note: {}", e)
9982                });
9983            self
9984        }
9985        pub fn line_type<T>(mut self, value: T) -> Self
9986        where
9987            T: ::std::convert::TryInto<
9988                ::std::option::Option<super::EventSlursItemLineType>,
9989            >,
9990            T::Error: ::std::fmt::Display,
9991        {
9992            self.line_type = value
9993                .try_into()
9994                .map_err(|e| {
9995                    format!("error converting supplied value for line_type: {}", e)
9996                });
9997            self
9998        }
9999        pub fn side<T>(mut self, value: T) -> Self
10000        where
10001            T: ::std::convert::TryInto<::std::option::Option<super::SlurSide>>,
10002            T::Error: ::std::fmt::Display,
10003        {
10004            self.side = value
10005                .try_into()
10006                .map_err(|e| format!("error converting supplied value for side: {}", e));
10007            self
10008        }
10009        pub fn side_end<T>(mut self, value: T) -> Self
10010        where
10011            T: ::std::convert::TryInto<::std::option::Option<super::SlurSide>>,
10012            T::Error: ::std::fmt::Display,
10013        {
10014            self.side_end = value
10015                .try_into()
10016                .map_err(|e| {
10017                    format!("error converting supplied value for side_end: {}", e)
10018                });
10019            self
10020        }
10021        pub fn start_note<T>(mut self, value: T) -> Self
10022        where
10023            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
10024            T::Error: ::std::fmt::Display,
10025        {
10026            self.start_note = value
10027                .try_into()
10028                .map_err(|e| {
10029                    format!("error converting supplied value for start_note: {}", e)
10030                });
10031            self
10032        }
10033        pub fn target<T>(mut self, value: T) -> Self
10034        where
10035            T: ::std::convert::TryInto<super::Id>,
10036            T::Error: ::std::fmt::Display,
10037        {
10038            self.target = value
10039                .try_into()
10040                .map_err(|e| {
10041                    format!("error converting supplied value for target: {}", e)
10042                });
10043            self
10044        }
10045    }
10046    impl ::std::convert::TryFrom<EventSlursItem> for super::EventSlursItem {
10047        type Error = super::error::ConversionError;
10048        fn try_from(
10049            value: EventSlursItem,
10050        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10051            Ok(Self {
10052                end_note: value.end_note?,
10053                line_type: value.line_type?,
10054                side: value.side?,
10055                side_end: value.side_end?,
10056                start_note: value.start_note?,
10057                target: value.target?,
10058            })
10059        }
10060    }
10061    impl ::std::convert::From<super::EventSlursItem> for EventSlursItem {
10062        fn from(value: super::EventSlursItem) -> Self {
10063            Self {
10064                end_note: Ok(value.end_note),
10065                line_type: Ok(value.line_type),
10066                side: Ok(value.side),
10067                side_end: Ok(value.side_end),
10068                start_note: Ok(value.start_note),
10069                target: Ok(value.target),
10070            }
10071        }
10072    }
10073    #[derive(Clone, Debug)]
10074    pub struct MeasureRhythmicPosition {
10075        measure: ::std::result::Result<super::MeasureNumber, ::std::string::String>,
10076        position: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
10077    }
10078    impl ::std::default::Default for MeasureRhythmicPosition {
10079        fn default() -> Self {
10080            Self {
10081                measure: Err("no value supplied for measure".to_string()),
10082                position: Err("no value supplied for position".to_string()),
10083            }
10084        }
10085    }
10086    impl MeasureRhythmicPosition {
10087        pub fn measure<T>(mut self, value: T) -> Self
10088        where
10089            T: ::std::convert::TryInto<super::MeasureNumber>,
10090            T::Error: ::std::fmt::Display,
10091        {
10092            self.measure = value
10093                .try_into()
10094                .map_err(|e| {
10095                    format!("error converting supplied value for measure: {}", e)
10096                });
10097            self
10098        }
10099        pub fn position<T>(mut self, value: T) -> Self
10100        where
10101            T: ::std::convert::TryInto<super::RhythmicPosition>,
10102            T::Error: ::std::fmt::Display,
10103        {
10104            self.position = value
10105                .try_into()
10106                .map_err(|e| {
10107                    format!("error converting supplied value for position: {}", e)
10108                });
10109            self
10110        }
10111    }
10112    impl ::std::convert::TryFrom<MeasureRhythmicPosition>
10113    for super::MeasureRhythmicPosition {
10114        type Error = super::error::ConversionError;
10115        fn try_from(
10116            value: MeasureRhythmicPosition,
10117        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10118            Ok(Self {
10119                measure: value.measure?,
10120                position: value.position?,
10121            })
10122        }
10123    }
10124    impl ::std::convert::From<super::MeasureRhythmicPosition>
10125    for MeasureRhythmicPosition {
10126        fn from(value: super::MeasureRhythmicPosition) -> Self {
10127            Self {
10128                measure: Ok(value.measure),
10129                position: Ok(value.position),
10130            }
10131        }
10132    }
10133    #[derive(Clone, Debug)]
10134    pub struct MnxDocument {
10135        global: ::std::result::Result<super::MnxDocumentGlobal, ::std::string::String>,
10136        layouts: ::std::result::Result<
10137            ::std::vec::Vec<super::MnxDocumentLayoutsItem>,
10138            ::std::string::String,
10139        >,
10140        mnx: ::std::result::Result<super::MnxDocumentMnx, ::std::string::String>,
10141        parts: ::std::result::Result<
10142            ::std::vec::Vec<super::MnxDocumentPartsItem>,
10143            ::std::string::String,
10144        >,
10145        scores: ::std::result::Result<
10146            ::std::vec::Vec<super::MnxDocumentScoresItem>,
10147            ::std::string::String,
10148        >,
10149    }
10150    impl ::std::default::Default for MnxDocument {
10151        fn default() -> Self {
10152            Self {
10153                global: Err("no value supplied for global".to_string()),
10154                layouts: Ok(Default::default()),
10155                mnx: Err("no value supplied for mnx".to_string()),
10156                parts: Err("no value supplied for parts".to_string()),
10157                scores: Ok(Default::default()),
10158            }
10159        }
10160    }
10161    impl MnxDocument {
10162        pub fn global<T>(mut self, value: T) -> Self
10163        where
10164            T: ::std::convert::TryInto<super::MnxDocumentGlobal>,
10165            T::Error: ::std::fmt::Display,
10166        {
10167            self.global = value
10168                .try_into()
10169                .map_err(|e| {
10170                    format!("error converting supplied value for global: {}", e)
10171                });
10172            self
10173        }
10174        pub fn layouts<T>(mut self, value: T) -> Self
10175        where
10176            T: ::std::convert::TryInto<::std::vec::Vec<super::MnxDocumentLayoutsItem>>,
10177            T::Error: ::std::fmt::Display,
10178        {
10179            self.layouts = value
10180                .try_into()
10181                .map_err(|e| {
10182                    format!("error converting supplied value for layouts: {}", e)
10183                });
10184            self
10185        }
10186        pub fn mnx<T>(mut self, value: T) -> Self
10187        where
10188            T: ::std::convert::TryInto<super::MnxDocumentMnx>,
10189            T::Error: ::std::fmt::Display,
10190        {
10191            self.mnx = value
10192                .try_into()
10193                .map_err(|e| format!("error converting supplied value for mnx: {}", e));
10194            self
10195        }
10196        pub fn parts<T>(mut self, value: T) -> Self
10197        where
10198            T: ::std::convert::TryInto<::std::vec::Vec<super::MnxDocumentPartsItem>>,
10199            T::Error: ::std::fmt::Display,
10200        {
10201            self.parts = value
10202                .try_into()
10203                .map_err(|e| {
10204                    format!("error converting supplied value for parts: {}", e)
10205                });
10206            self
10207        }
10208        pub fn scores<T>(mut self, value: T) -> Self
10209        where
10210            T: ::std::convert::TryInto<::std::vec::Vec<super::MnxDocumentScoresItem>>,
10211            T::Error: ::std::fmt::Display,
10212        {
10213            self.scores = value
10214                .try_into()
10215                .map_err(|e| {
10216                    format!("error converting supplied value for scores: {}", e)
10217                });
10218            self
10219        }
10220    }
10221    impl ::std::convert::TryFrom<MnxDocument> for super::MnxDocument {
10222        type Error = super::error::ConversionError;
10223        fn try_from(
10224            value: MnxDocument,
10225        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10226            Ok(Self {
10227                global: value.global?,
10228                layouts: value.layouts?,
10229                mnx: value.mnx?,
10230                parts: value.parts?,
10231                scores: value.scores?,
10232            })
10233        }
10234    }
10235    impl ::std::convert::From<super::MnxDocument> for MnxDocument {
10236        fn from(value: super::MnxDocument) -> Self {
10237            Self {
10238                global: Ok(value.global),
10239                layouts: Ok(value.layouts),
10240                mnx: Ok(value.mnx),
10241                parts: Ok(value.parts),
10242                scores: Ok(value.scores),
10243            }
10244        }
10245    }
10246    #[derive(Clone, Debug)]
10247    pub struct MnxDocumentGlobal {
10248        lyrics: ::std::result::Result<
10249            ::std::option::Option<super::MnxDocumentGlobalLyrics>,
10250            ::std::string::String,
10251        >,
10252        measures: ::std::result::Result<
10253            ::std::vec::Vec<super::MnxDocumentGlobalMeasuresItem>,
10254            ::std::string::String,
10255        >,
10256        styles: ::std::result::Result<
10257            ::std::vec::Vec<super::MnxDocumentGlobalStylesItem>,
10258            ::std::string::String,
10259        >,
10260    }
10261    impl ::std::default::Default for MnxDocumentGlobal {
10262        fn default() -> Self {
10263            Self {
10264                lyrics: Ok(Default::default()),
10265                measures: Err("no value supplied for measures".to_string()),
10266                styles: Ok(Default::default()),
10267            }
10268        }
10269    }
10270    impl MnxDocumentGlobal {
10271        pub fn lyrics<T>(mut self, value: T) -> Self
10272        where
10273            T: ::std::convert::TryInto<
10274                ::std::option::Option<super::MnxDocumentGlobalLyrics>,
10275            >,
10276            T::Error: ::std::fmt::Display,
10277        {
10278            self.lyrics = value
10279                .try_into()
10280                .map_err(|e| {
10281                    format!("error converting supplied value for lyrics: {}", e)
10282                });
10283            self
10284        }
10285        pub fn measures<T>(mut self, value: T) -> Self
10286        where
10287            T: ::std::convert::TryInto<
10288                ::std::vec::Vec<super::MnxDocumentGlobalMeasuresItem>,
10289            >,
10290            T::Error: ::std::fmt::Display,
10291        {
10292            self.measures = value
10293                .try_into()
10294                .map_err(|e| {
10295                    format!("error converting supplied value for measures: {}", e)
10296                });
10297            self
10298        }
10299        pub fn styles<T>(mut self, value: T) -> Self
10300        where
10301            T: ::std::convert::TryInto<
10302                ::std::vec::Vec<super::MnxDocumentGlobalStylesItem>,
10303            >,
10304            T::Error: ::std::fmt::Display,
10305        {
10306            self.styles = value
10307                .try_into()
10308                .map_err(|e| {
10309                    format!("error converting supplied value for styles: {}", e)
10310                });
10311            self
10312        }
10313    }
10314    impl ::std::convert::TryFrom<MnxDocumentGlobal> for super::MnxDocumentGlobal {
10315        type Error = super::error::ConversionError;
10316        fn try_from(
10317            value: MnxDocumentGlobal,
10318        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10319            Ok(Self {
10320                lyrics: value.lyrics?,
10321                measures: value.measures?,
10322                styles: value.styles?,
10323            })
10324        }
10325    }
10326    impl ::std::convert::From<super::MnxDocumentGlobal> for MnxDocumentGlobal {
10327        fn from(value: super::MnxDocumentGlobal) -> Self {
10328            Self {
10329                lyrics: Ok(value.lyrics),
10330                measures: Ok(value.measures),
10331                styles: Ok(value.styles),
10332            }
10333        }
10334    }
10335    #[derive(Clone, Debug)]
10336    pub struct MnxDocumentGlobalLyrics {
10337        line_metadata: ::std::result::Result<
10338            ::std::collections::HashMap<
10339                super::MnxDocumentGlobalLyricsLineMetadataKey,
10340                super::MnxDocumentGlobalLyricsLineMetadataValue,
10341            >,
10342            ::std::string::String,
10343        >,
10344        line_order: ::std::result::Result<
10345            ::std::vec::Vec<::std::string::String>,
10346            ::std::string::String,
10347        >,
10348    }
10349    impl ::std::default::Default for MnxDocumentGlobalLyrics {
10350        fn default() -> Self {
10351            Self {
10352                line_metadata: Ok(Default::default()),
10353                line_order: Ok(Default::default()),
10354            }
10355        }
10356    }
10357    impl MnxDocumentGlobalLyrics {
10358        pub fn line_metadata<T>(mut self, value: T) -> Self
10359        where
10360            T: ::std::convert::TryInto<
10361                ::std::collections::HashMap<
10362                    super::MnxDocumentGlobalLyricsLineMetadataKey,
10363                    super::MnxDocumentGlobalLyricsLineMetadataValue,
10364                >,
10365            >,
10366            T::Error: ::std::fmt::Display,
10367        {
10368            self.line_metadata = value
10369                .try_into()
10370                .map_err(|e| {
10371                    format!("error converting supplied value for line_metadata: {}", e)
10372                });
10373            self
10374        }
10375        pub fn line_order<T>(mut self, value: T) -> Self
10376        where
10377            T: ::std::convert::TryInto<::std::vec::Vec<::std::string::String>>,
10378            T::Error: ::std::fmt::Display,
10379        {
10380            self.line_order = value
10381                .try_into()
10382                .map_err(|e| {
10383                    format!("error converting supplied value for line_order: {}", e)
10384                });
10385            self
10386        }
10387    }
10388    impl ::std::convert::TryFrom<MnxDocumentGlobalLyrics>
10389    for super::MnxDocumentGlobalLyrics {
10390        type Error = super::error::ConversionError;
10391        fn try_from(
10392            value: MnxDocumentGlobalLyrics,
10393        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10394            Ok(Self {
10395                line_metadata: value.line_metadata?,
10396                line_order: value.line_order?,
10397            })
10398        }
10399    }
10400    impl ::std::convert::From<super::MnxDocumentGlobalLyrics>
10401    for MnxDocumentGlobalLyrics {
10402        fn from(value: super::MnxDocumentGlobalLyrics) -> Self {
10403            Self {
10404                line_metadata: Ok(value.line_metadata),
10405                line_order: Ok(value.line_order),
10406            }
10407        }
10408    }
10409    #[derive(Clone, Debug)]
10410    pub struct MnxDocumentGlobalLyricsLineMetadataValue {
10411        label: ::std::result::Result<
10412            ::std::option::Option<::std::string::String>,
10413            ::std::string::String,
10414        >,
10415        lang: ::std::result::Result<
10416            ::std::option::Option<::std::string::String>,
10417            ::std::string::String,
10418        >,
10419    }
10420    impl ::std::default::Default for MnxDocumentGlobalLyricsLineMetadataValue {
10421        fn default() -> Self {
10422            Self {
10423                label: Ok(Default::default()),
10424                lang: Ok(Default::default()),
10425            }
10426        }
10427    }
10428    impl MnxDocumentGlobalLyricsLineMetadataValue {
10429        pub fn label<T>(mut self, value: T) -> Self
10430        where
10431            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
10432            T::Error: ::std::fmt::Display,
10433        {
10434            self.label = value
10435                .try_into()
10436                .map_err(|e| {
10437                    format!("error converting supplied value for label: {}", e)
10438                });
10439            self
10440        }
10441        pub fn lang<T>(mut self, value: T) -> Self
10442        where
10443            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
10444            T::Error: ::std::fmt::Display,
10445        {
10446            self.lang = value
10447                .try_into()
10448                .map_err(|e| format!("error converting supplied value for lang: {}", e));
10449            self
10450        }
10451    }
10452    impl ::std::convert::TryFrom<MnxDocumentGlobalLyricsLineMetadataValue>
10453    for super::MnxDocumentGlobalLyricsLineMetadataValue {
10454        type Error = super::error::ConversionError;
10455        fn try_from(
10456            value: MnxDocumentGlobalLyricsLineMetadataValue,
10457        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10458            Ok(Self {
10459                label: value.label?,
10460                lang: value.lang?,
10461            })
10462        }
10463    }
10464    impl ::std::convert::From<super::MnxDocumentGlobalLyricsLineMetadataValue>
10465    for MnxDocumentGlobalLyricsLineMetadataValue {
10466        fn from(value: super::MnxDocumentGlobalLyricsLineMetadataValue) -> Self {
10467            Self {
10468                label: Ok(value.label),
10469                lang: Ok(value.lang),
10470            }
10471        }
10472    }
10473    #[derive(Clone, Debug)]
10474    pub struct MnxDocumentGlobalMeasuresItem {
10475        barline: ::std::result::Result<
10476            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemBarline>,
10477            ::std::string::String,
10478        >,
10479        ending: ::std::result::Result<
10480            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemEnding>,
10481            ::std::string::String,
10482        >,
10483        fine: ::std::result::Result<
10484            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemFine>,
10485            ::std::string::String,
10486        >,
10487        index: ::std::result::Result<
10488            ::std::option::Option<super::MeasureNumber>,
10489            ::std::string::String,
10490        >,
10491        jump: ::std::result::Result<
10492            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemJump>,
10493            ::std::string::String,
10494        >,
10495        key: ::std::result::Result<
10496            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemKey>,
10497            ::std::string::String,
10498        >,
10499        number: ::std::result::Result<
10500            ::std::option::Option<super::MeasureNumber>,
10501            ::std::string::String,
10502        >,
10503        repeat_end: ::std::result::Result<
10504            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemRepeatEnd>,
10505            ::std::string::String,
10506        >,
10507        repeat_start: ::std::result::Result<
10508            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemRepeatStart>,
10509            ::std::string::String,
10510        >,
10511        segno: ::std::result::Result<
10512            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemSegno>,
10513            ::std::string::String,
10514        >,
10515        tempos: ::std::result::Result<
10516            ::std::vec::Vec<super::MnxDocumentGlobalMeasuresItemTemposItem>,
10517            ::std::string::String,
10518        >,
10519        time: ::std::result::Result<
10520            ::std::option::Option<super::MnxDocumentGlobalMeasuresItemTime>,
10521            ::std::string::String,
10522        >,
10523    }
10524    impl ::std::default::Default for MnxDocumentGlobalMeasuresItem {
10525        fn default() -> Self {
10526            Self {
10527                barline: Ok(Default::default()),
10528                ending: Ok(Default::default()),
10529                fine: Ok(Default::default()),
10530                index: Ok(Default::default()),
10531                jump: Ok(Default::default()),
10532                key: Ok(Default::default()),
10533                number: Ok(Default::default()),
10534                repeat_end: Ok(Default::default()),
10535                repeat_start: Ok(Default::default()),
10536                segno: Ok(Default::default()),
10537                tempos: Ok(Default::default()),
10538                time: Ok(Default::default()),
10539            }
10540        }
10541    }
10542    impl MnxDocumentGlobalMeasuresItem {
10543        pub fn barline<T>(mut self, value: T) -> Self
10544        where
10545            T: ::std::convert::TryInto<
10546                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemBarline>,
10547            >,
10548            T::Error: ::std::fmt::Display,
10549        {
10550            self.barline = value
10551                .try_into()
10552                .map_err(|e| {
10553                    format!("error converting supplied value for barline: {}", e)
10554                });
10555            self
10556        }
10557        pub fn ending<T>(mut self, value: T) -> Self
10558        where
10559            T: ::std::convert::TryInto<
10560                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemEnding>,
10561            >,
10562            T::Error: ::std::fmt::Display,
10563        {
10564            self.ending = value
10565                .try_into()
10566                .map_err(|e| {
10567                    format!("error converting supplied value for ending: {}", e)
10568                });
10569            self
10570        }
10571        pub fn fine<T>(mut self, value: T) -> Self
10572        where
10573            T: ::std::convert::TryInto<
10574                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemFine>,
10575            >,
10576            T::Error: ::std::fmt::Display,
10577        {
10578            self.fine = value
10579                .try_into()
10580                .map_err(|e| format!("error converting supplied value for fine: {}", e));
10581            self
10582        }
10583        pub fn index<T>(mut self, value: T) -> Self
10584        where
10585            T: ::std::convert::TryInto<::std::option::Option<super::MeasureNumber>>,
10586            T::Error: ::std::fmt::Display,
10587        {
10588            self.index = value
10589                .try_into()
10590                .map_err(|e| {
10591                    format!("error converting supplied value for index: {}", e)
10592                });
10593            self
10594        }
10595        pub fn jump<T>(mut self, value: T) -> Self
10596        where
10597            T: ::std::convert::TryInto<
10598                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemJump>,
10599            >,
10600            T::Error: ::std::fmt::Display,
10601        {
10602            self.jump = value
10603                .try_into()
10604                .map_err(|e| format!("error converting supplied value for jump: {}", e));
10605            self
10606        }
10607        pub fn key<T>(mut self, value: T) -> Self
10608        where
10609            T: ::std::convert::TryInto<
10610                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemKey>,
10611            >,
10612            T::Error: ::std::fmt::Display,
10613        {
10614            self.key = value
10615                .try_into()
10616                .map_err(|e| format!("error converting supplied value for key: {}", e));
10617            self
10618        }
10619        pub fn number<T>(mut self, value: T) -> Self
10620        where
10621            T: ::std::convert::TryInto<::std::option::Option<super::MeasureNumber>>,
10622            T::Error: ::std::fmt::Display,
10623        {
10624            self.number = value
10625                .try_into()
10626                .map_err(|e| {
10627                    format!("error converting supplied value for number: {}", e)
10628                });
10629            self
10630        }
10631        pub fn repeat_end<T>(mut self, value: T) -> Self
10632        where
10633            T: ::std::convert::TryInto<
10634                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemRepeatEnd>,
10635            >,
10636            T::Error: ::std::fmt::Display,
10637        {
10638            self.repeat_end = value
10639                .try_into()
10640                .map_err(|e| {
10641                    format!("error converting supplied value for repeat_end: {}", e)
10642                });
10643            self
10644        }
10645        pub fn repeat_start<T>(mut self, value: T) -> Self
10646        where
10647            T: ::std::convert::TryInto<
10648                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemRepeatStart>,
10649            >,
10650            T::Error: ::std::fmt::Display,
10651        {
10652            self.repeat_start = value
10653                .try_into()
10654                .map_err(|e| {
10655                    format!("error converting supplied value for repeat_start: {}", e)
10656                });
10657            self
10658        }
10659        pub fn segno<T>(mut self, value: T) -> Self
10660        where
10661            T: ::std::convert::TryInto<
10662                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemSegno>,
10663            >,
10664            T::Error: ::std::fmt::Display,
10665        {
10666            self.segno = value
10667                .try_into()
10668                .map_err(|e| {
10669                    format!("error converting supplied value for segno: {}", e)
10670                });
10671            self
10672        }
10673        pub fn tempos<T>(mut self, value: T) -> Self
10674        where
10675            T: ::std::convert::TryInto<
10676                ::std::vec::Vec<super::MnxDocumentGlobalMeasuresItemTemposItem>,
10677            >,
10678            T::Error: ::std::fmt::Display,
10679        {
10680            self.tempos = value
10681                .try_into()
10682                .map_err(|e| {
10683                    format!("error converting supplied value for tempos: {}", e)
10684                });
10685            self
10686        }
10687        pub fn time<T>(mut self, value: T) -> Self
10688        where
10689            T: ::std::convert::TryInto<
10690                ::std::option::Option<super::MnxDocumentGlobalMeasuresItemTime>,
10691            >,
10692            T::Error: ::std::fmt::Display,
10693        {
10694            self.time = value
10695                .try_into()
10696                .map_err(|e| format!("error converting supplied value for time: {}", e));
10697            self
10698        }
10699    }
10700    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItem>
10701    for super::MnxDocumentGlobalMeasuresItem {
10702        type Error = super::error::ConversionError;
10703        fn try_from(
10704            value: MnxDocumentGlobalMeasuresItem,
10705        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10706            Ok(Self {
10707                barline: value.barline?,
10708                ending: value.ending?,
10709                fine: value.fine?,
10710                index: value.index?,
10711                jump: value.jump?,
10712                key: value.key?,
10713                number: value.number?,
10714                repeat_end: value.repeat_end?,
10715                repeat_start: value.repeat_start?,
10716                segno: value.segno?,
10717                tempos: value.tempos?,
10718                time: value.time?,
10719            })
10720        }
10721    }
10722    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItem>
10723    for MnxDocumentGlobalMeasuresItem {
10724        fn from(value: super::MnxDocumentGlobalMeasuresItem) -> Self {
10725            Self {
10726                barline: Ok(value.barline),
10727                ending: Ok(value.ending),
10728                fine: Ok(value.fine),
10729                index: Ok(value.index),
10730                jump: Ok(value.jump),
10731                key: Ok(value.key),
10732                number: Ok(value.number),
10733                repeat_end: Ok(value.repeat_end),
10734                repeat_start: Ok(value.repeat_start),
10735                segno: Ok(value.segno),
10736                tempos: Ok(value.tempos),
10737                time: Ok(value.time),
10738            }
10739        }
10740    }
10741    #[derive(Clone, Debug)]
10742    pub struct MnxDocumentGlobalMeasuresItemBarline {
10743        type_: ::std::result::Result<
10744            super::MnxDocumentGlobalMeasuresItemBarlineType,
10745            ::std::string::String,
10746        >,
10747    }
10748    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemBarline {
10749        fn default() -> Self {
10750            Self {
10751                type_: Err("no value supplied for type_".to_string()),
10752            }
10753        }
10754    }
10755    impl MnxDocumentGlobalMeasuresItemBarline {
10756        pub fn type_<T>(mut self, value: T) -> Self
10757        where
10758            T: ::std::convert::TryInto<super::MnxDocumentGlobalMeasuresItemBarlineType>,
10759            T::Error: ::std::fmt::Display,
10760        {
10761            self.type_ = value
10762                .try_into()
10763                .map_err(|e| {
10764                    format!("error converting supplied value for type_: {}", e)
10765                });
10766            self
10767        }
10768    }
10769    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemBarline>
10770    for super::MnxDocumentGlobalMeasuresItemBarline {
10771        type Error = super::error::ConversionError;
10772        fn try_from(
10773            value: MnxDocumentGlobalMeasuresItemBarline,
10774        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10775            Ok(Self { type_: value.type_? })
10776        }
10777    }
10778    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemBarline>
10779    for MnxDocumentGlobalMeasuresItemBarline {
10780        fn from(value: super::MnxDocumentGlobalMeasuresItemBarline) -> Self {
10781            Self { type_: Ok(value.type_) }
10782        }
10783    }
10784    #[derive(Clone, Debug)]
10785    pub struct MnxDocumentGlobalMeasuresItemEnding {
10786        class: ::std::result::Result<
10787            ::std::option::Option<super::StyleClass>,
10788            ::std::string::String,
10789        >,
10790        color: ::std::result::Result<
10791            ::std::option::Option<super::Color>,
10792            ::std::string::String,
10793        >,
10794        duration: ::std::result::Result<i64, ::std::string::String>,
10795        numbers: ::std::result::Result<::std::vec::Vec<i64>, ::std::string::String>,
10796        open: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
10797    }
10798    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemEnding {
10799        fn default() -> Self {
10800            Self {
10801                class: Ok(Default::default()),
10802                color: Ok(Default::default()),
10803                duration: Err("no value supplied for duration".to_string()),
10804                numbers: Ok(Default::default()),
10805                open: Ok(Default::default()),
10806            }
10807        }
10808    }
10809    impl MnxDocumentGlobalMeasuresItemEnding {
10810        pub fn class<T>(mut self, value: T) -> Self
10811        where
10812            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
10813            T::Error: ::std::fmt::Display,
10814        {
10815            self.class = value
10816                .try_into()
10817                .map_err(|e| {
10818                    format!("error converting supplied value for class: {}", e)
10819                });
10820            self
10821        }
10822        pub fn color<T>(mut self, value: T) -> Self
10823        where
10824            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
10825            T::Error: ::std::fmt::Display,
10826        {
10827            self.color = value
10828                .try_into()
10829                .map_err(|e| {
10830                    format!("error converting supplied value for color: {}", e)
10831                });
10832            self
10833        }
10834        pub fn duration<T>(mut self, value: T) -> Self
10835        where
10836            T: ::std::convert::TryInto<i64>,
10837            T::Error: ::std::fmt::Display,
10838        {
10839            self.duration = value
10840                .try_into()
10841                .map_err(|e| {
10842                    format!("error converting supplied value for duration: {}", e)
10843                });
10844            self
10845        }
10846        pub fn numbers<T>(mut self, value: T) -> Self
10847        where
10848            T: ::std::convert::TryInto<::std::vec::Vec<i64>>,
10849            T::Error: ::std::fmt::Display,
10850        {
10851            self.numbers = value
10852                .try_into()
10853                .map_err(|e| {
10854                    format!("error converting supplied value for numbers: {}", e)
10855                });
10856            self
10857        }
10858        pub fn open<T>(mut self, value: T) -> Self
10859        where
10860            T: ::std::convert::TryInto<::std::option::Option<bool>>,
10861            T::Error: ::std::fmt::Display,
10862        {
10863            self.open = value
10864                .try_into()
10865                .map_err(|e| format!("error converting supplied value for open: {}", e));
10866            self
10867        }
10868    }
10869    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemEnding>
10870    for super::MnxDocumentGlobalMeasuresItemEnding {
10871        type Error = super::error::ConversionError;
10872        fn try_from(
10873            value: MnxDocumentGlobalMeasuresItemEnding,
10874        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10875            Ok(Self {
10876                class: value.class?,
10877                color: value.color?,
10878                duration: value.duration?,
10879                numbers: value.numbers?,
10880                open: value.open?,
10881            })
10882        }
10883    }
10884    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemEnding>
10885    for MnxDocumentGlobalMeasuresItemEnding {
10886        fn from(value: super::MnxDocumentGlobalMeasuresItemEnding) -> Self {
10887            Self {
10888                class: Ok(value.class),
10889                color: Ok(value.color),
10890                duration: Ok(value.duration),
10891                numbers: Ok(value.numbers),
10892                open: Ok(value.open),
10893            }
10894        }
10895    }
10896    #[derive(Clone, Debug)]
10897    pub struct MnxDocumentGlobalMeasuresItemFine {
10898        class: ::std::result::Result<
10899            ::std::option::Option<super::StyleClass>,
10900            ::std::string::String,
10901        >,
10902        color: ::std::result::Result<
10903            ::std::option::Option<super::Color>,
10904            ::std::string::String,
10905        >,
10906        location: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
10907    }
10908    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemFine {
10909        fn default() -> Self {
10910            Self {
10911                class: Ok(Default::default()),
10912                color: Ok(Default::default()),
10913                location: Err("no value supplied for location".to_string()),
10914            }
10915        }
10916    }
10917    impl MnxDocumentGlobalMeasuresItemFine {
10918        pub fn class<T>(mut self, value: T) -> Self
10919        where
10920            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
10921            T::Error: ::std::fmt::Display,
10922        {
10923            self.class = value
10924                .try_into()
10925                .map_err(|e| {
10926                    format!("error converting supplied value for class: {}", e)
10927                });
10928            self
10929        }
10930        pub fn color<T>(mut self, value: T) -> Self
10931        where
10932            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
10933            T::Error: ::std::fmt::Display,
10934        {
10935            self.color = value
10936                .try_into()
10937                .map_err(|e| {
10938                    format!("error converting supplied value for color: {}", e)
10939                });
10940            self
10941        }
10942        pub fn location<T>(mut self, value: T) -> Self
10943        where
10944            T: ::std::convert::TryInto<super::RhythmicPosition>,
10945            T::Error: ::std::fmt::Display,
10946        {
10947            self.location = value
10948                .try_into()
10949                .map_err(|e| {
10950                    format!("error converting supplied value for location: {}", e)
10951                });
10952            self
10953        }
10954    }
10955    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemFine>
10956    for super::MnxDocumentGlobalMeasuresItemFine {
10957        type Error = super::error::ConversionError;
10958        fn try_from(
10959            value: MnxDocumentGlobalMeasuresItemFine,
10960        ) -> ::std::result::Result<Self, super::error::ConversionError> {
10961            Ok(Self {
10962                class: value.class?,
10963                color: value.color?,
10964                location: value.location?,
10965            })
10966        }
10967    }
10968    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemFine>
10969    for MnxDocumentGlobalMeasuresItemFine {
10970        fn from(value: super::MnxDocumentGlobalMeasuresItemFine) -> Self {
10971            Self {
10972                class: Ok(value.class),
10973                color: Ok(value.color),
10974                location: Ok(value.location),
10975            }
10976        }
10977    }
10978    #[derive(Clone, Debug)]
10979    pub struct MnxDocumentGlobalMeasuresItemJump {
10980        location: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
10981        type_: ::std::result::Result<
10982            super::MnxDocumentGlobalMeasuresItemJumpType,
10983            ::std::string::String,
10984        >,
10985    }
10986    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemJump {
10987        fn default() -> Self {
10988            Self {
10989                location: Err("no value supplied for location".to_string()),
10990                type_: Err("no value supplied for type_".to_string()),
10991            }
10992        }
10993    }
10994    impl MnxDocumentGlobalMeasuresItemJump {
10995        pub fn location<T>(mut self, value: T) -> Self
10996        where
10997            T: ::std::convert::TryInto<super::RhythmicPosition>,
10998            T::Error: ::std::fmt::Display,
10999        {
11000            self.location = value
11001                .try_into()
11002                .map_err(|e| {
11003                    format!("error converting supplied value for location: {}", e)
11004                });
11005            self
11006        }
11007        pub fn type_<T>(mut self, value: T) -> Self
11008        where
11009            T: ::std::convert::TryInto<super::MnxDocumentGlobalMeasuresItemJumpType>,
11010            T::Error: ::std::fmt::Display,
11011        {
11012            self.type_ = value
11013                .try_into()
11014                .map_err(|e| {
11015                    format!("error converting supplied value for type_: {}", e)
11016                });
11017            self
11018        }
11019    }
11020    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemJump>
11021    for super::MnxDocumentGlobalMeasuresItemJump {
11022        type Error = super::error::ConversionError;
11023        fn try_from(
11024            value: MnxDocumentGlobalMeasuresItemJump,
11025        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11026            Ok(Self {
11027                location: value.location?,
11028                type_: value.type_?,
11029            })
11030        }
11031    }
11032    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemJump>
11033    for MnxDocumentGlobalMeasuresItemJump {
11034        fn from(value: super::MnxDocumentGlobalMeasuresItemJump) -> Self {
11035            Self {
11036                location: Ok(value.location),
11037                type_: Ok(value.type_),
11038            }
11039        }
11040    }
11041    #[derive(Clone, Debug)]
11042    pub struct MnxDocumentGlobalMeasuresItemKey {
11043        class: ::std::result::Result<
11044            ::std::option::Option<super::StyleClass>,
11045            ::std::string::String,
11046        >,
11047        color: ::std::result::Result<
11048            ::std::option::Option<super::Color>,
11049            ::std::string::String,
11050        >,
11051        fifths: ::std::result::Result<i64, ::std::string::String>,
11052    }
11053    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemKey {
11054        fn default() -> Self {
11055            Self {
11056                class: Ok(Default::default()),
11057                color: Ok(Default::default()),
11058                fifths: Err("no value supplied for fifths".to_string()),
11059            }
11060        }
11061    }
11062    impl MnxDocumentGlobalMeasuresItemKey {
11063        pub fn class<T>(mut self, value: T) -> Self
11064        where
11065            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
11066            T::Error: ::std::fmt::Display,
11067        {
11068            self.class = value
11069                .try_into()
11070                .map_err(|e| {
11071                    format!("error converting supplied value for class: {}", e)
11072                });
11073            self
11074        }
11075        pub fn color<T>(mut self, value: T) -> Self
11076        where
11077            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
11078            T::Error: ::std::fmt::Display,
11079        {
11080            self.color = value
11081                .try_into()
11082                .map_err(|e| {
11083                    format!("error converting supplied value for color: {}", e)
11084                });
11085            self
11086        }
11087        pub fn fifths<T>(mut self, value: T) -> Self
11088        where
11089            T: ::std::convert::TryInto<i64>,
11090            T::Error: ::std::fmt::Display,
11091        {
11092            self.fifths = value
11093                .try_into()
11094                .map_err(|e| {
11095                    format!("error converting supplied value for fifths: {}", e)
11096                });
11097            self
11098        }
11099    }
11100    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemKey>
11101    for super::MnxDocumentGlobalMeasuresItemKey {
11102        type Error = super::error::ConversionError;
11103        fn try_from(
11104            value: MnxDocumentGlobalMeasuresItemKey,
11105        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11106            Ok(Self {
11107                class: value.class?,
11108                color: value.color?,
11109                fifths: value.fifths?,
11110            })
11111        }
11112    }
11113    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemKey>
11114    for MnxDocumentGlobalMeasuresItemKey {
11115        fn from(value: super::MnxDocumentGlobalMeasuresItemKey) -> Self {
11116            Self {
11117                class: Ok(value.class),
11118                color: Ok(value.color),
11119                fifths: Ok(value.fifths),
11120            }
11121        }
11122    }
11123    #[derive(Clone, Debug)]
11124    pub struct MnxDocumentGlobalMeasuresItemRepeatEnd {
11125        times: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
11126    }
11127    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemRepeatEnd {
11128        fn default() -> Self {
11129            Self {
11130                times: Ok(Default::default()),
11131            }
11132        }
11133    }
11134    impl MnxDocumentGlobalMeasuresItemRepeatEnd {
11135        pub fn times<T>(mut self, value: T) -> Self
11136        where
11137            T: ::std::convert::TryInto<::std::option::Option<i64>>,
11138            T::Error: ::std::fmt::Display,
11139        {
11140            self.times = value
11141                .try_into()
11142                .map_err(|e| {
11143                    format!("error converting supplied value for times: {}", e)
11144                });
11145            self
11146        }
11147    }
11148    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemRepeatEnd>
11149    for super::MnxDocumentGlobalMeasuresItemRepeatEnd {
11150        type Error = super::error::ConversionError;
11151        fn try_from(
11152            value: MnxDocumentGlobalMeasuresItemRepeatEnd,
11153        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11154            Ok(Self { times: value.times? })
11155        }
11156    }
11157    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemRepeatEnd>
11158    for MnxDocumentGlobalMeasuresItemRepeatEnd {
11159        fn from(value: super::MnxDocumentGlobalMeasuresItemRepeatEnd) -> Self {
11160            Self { times: Ok(value.times) }
11161        }
11162    }
11163    #[derive(Clone, Debug)]
11164    pub struct MnxDocumentGlobalMeasuresItemRepeatStart {}
11165    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemRepeatStart {
11166        fn default() -> Self {
11167            Self {}
11168        }
11169    }
11170    impl MnxDocumentGlobalMeasuresItemRepeatStart {}
11171    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemRepeatStart>
11172    for super::MnxDocumentGlobalMeasuresItemRepeatStart {
11173        type Error = super::error::ConversionError;
11174        fn try_from(
11175            _value: MnxDocumentGlobalMeasuresItemRepeatStart,
11176        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11177            Ok(Self {})
11178        }
11179    }
11180    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemRepeatStart>
11181    for MnxDocumentGlobalMeasuresItemRepeatStart {
11182        fn from(_value: super::MnxDocumentGlobalMeasuresItemRepeatStart) -> Self {
11183            Self {}
11184        }
11185    }
11186    #[derive(Clone, Debug)]
11187    pub struct MnxDocumentGlobalMeasuresItemSegno {
11188        class: ::std::result::Result<
11189            ::std::option::Option<super::StyleClass>,
11190            ::std::string::String,
11191        >,
11192        color: ::std::result::Result<
11193            ::std::option::Option<super::Color>,
11194            ::std::string::String,
11195        >,
11196        glyph: ::std::result::Result<
11197            ::std::option::Option<super::SmuflGlyph>,
11198            ::std::string::String,
11199        >,
11200        location: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
11201    }
11202    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemSegno {
11203        fn default() -> Self {
11204            Self {
11205                class: Ok(Default::default()),
11206                color: Ok(Default::default()),
11207                glyph: Ok(Default::default()),
11208                location: Err("no value supplied for location".to_string()),
11209            }
11210        }
11211    }
11212    impl MnxDocumentGlobalMeasuresItemSegno {
11213        pub fn class<T>(mut self, value: T) -> Self
11214        where
11215            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
11216            T::Error: ::std::fmt::Display,
11217        {
11218            self.class = value
11219                .try_into()
11220                .map_err(|e| {
11221                    format!("error converting supplied value for class: {}", e)
11222                });
11223            self
11224        }
11225        pub fn color<T>(mut self, value: T) -> Self
11226        where
11227            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
11228            T::Error: ::std::fmt::Display,
11229        {
11230            self.color = value
11231                .try_into()
11232                .map_err(|e| {
11233                    format!("error converting supplied value for color: {}", e)
11234                });
11235            self
11236        }
11237        pub fn glyph<T>(mut self, value: T) -> Self
11238        where
11239            T: ::std::convert::TryInto<::std::option::Option<super::SmuflGlyph>>,
11240            T::Error: ::std::fmt::Display,
11241        {
11242            self.glyph = value
11243                .try_into()
11244                .map_err(|e| {
11245                    format!("error converting supplied value for glyph: {}", e)
11246                });
11247            self
11248        }
11249        pub fn location<T>(mut self, value: T) -> Self
11250        where
11251            T: ::std::convert::TryInto<super::RhythmicPosition>,
11252            T::Error: ::std::fmt::Display,
11253        {
11254            self.location = value
11255                .try_into()
11256                .map_err(|e| {
11257                    format!("error converting supplied value for location: {}", e)
11258                });
11259            self
11260        }
11261    }
11262    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemSegno>
11263    for super::MnxDocumentGlobalMeasuresItemSegno {
11264        type Error = super::error::ConversionError;
11265        fn try_from(
11266            value: MnxDocumentGlobalMeasuresItemSegno,
11267        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11268            Ok(Self {
11269                class: value.class?,
11270                color: value.color?,
11271                glyph: value.glyph?,
11272                location: value.location?,
11273            })
11274        }
11275    }
11276    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemSegno>
11277    for MnxDocumentGlobalMeasuresItemSegno {
11278        fn from(value: super::MnxDocumentGlobalMeasuresItemSegno) -> Self {
11279            Self {
11280                class: Ok(value.class),
11281                color: Ok(value.color),
11282                glyph: Ok(value.glyph),
11283                location: Ok(value.location),
11284            }
11285        }
11286    }
11287    #[derive(Clone, Debug)]
11288    pub struct MnxDocumentGlobalMeasuresItemTemposItem {
11289        bpm: ::std::result::Result<i64, ::std::string::String>,
11290        location: ::std::result::Result<
11291            ::std::option::Option<super::RhythmicPosition>,
11292            ::std::string::String,
11293        >,
11294        value: ::std::result::Result<super::NoteValue, ::std::string::String>,
11295    }
11296    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemTemposItem {
11297        fn default() -> Self {
11298            Self {
11299                bpm: Err("no value supplied for bpm".to_string()),
11300                location: Ok(Default::default()),
11301                value: Err("no value supplied for value".to_string()),
11302            }
11303        }
11304    }
11305    impl MnxDocumentGlobalMeasuresItemTemposItem {
11306        pub fn bpm<T>(mut self, value: T) -> Self
11307        where
11308            T: ::std::convert::TryInto<i64>,
11309            T::Error: ::std::fmt::Display,
11310        {
11311            self.bpm = value
11312                .try_into()
11313                .map_err(|e| format!("error converting supplied value for bpm: {}", e));
11314            self
11315        }
11316        pub fn location<T>(mut self, value: T) -> Self
11317        where
11318            T: ::std::convert::TryInto<::std::option::Option<super::RhythmicPosition>>,
11319            T::Error: ::std::fmt::Display,
11320        {
11321            self.location = value
11322                .try_into()
11323                .map_err(|e| {
11324                    format!("error converting supplied value for location: {}", e)
11325                });
11326            self
11327        }
11328        pub fn value<T>(mut self, value: T) -> Self
11329        where
11330            T: ::std::convert::TryInto<super::NoteValue>,
11331            T::Error: ::std::fmt::Display,
11332        {
11333            self.value = value
11334                .try_into()
11335                .map_err(|e| {
11336                    format!("error converting supplied value for value: {}", e)
11337                });
11338            self
11339        }
11340    }
11341    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemTemposItem>
11342    for super::MnxDocumentGlobalMeasuresItemTemposItem {
11343        type Error = super::error::ConversionError;
11344        fn try_from(
11345            value: MnxDocumentGlobalMeasuresItemTemposItem,
11346        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11347            Ok(Self {
11348                bpm: value.bpm?,
11349                location: value.location?,
11350                value: value.value?,
11351            })
11352        }
11353    }
11354    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemTemposItem>
11355    for MnxDocumentGlobalMeasuresItemTemposItem {
11356        fn from(value: super::MnxDocumentGlobalMeasuresItemTemposItem) -> Self {
11357            Self {
11358                bpm: Ok(value.bpm),
11359                location: Ok(value.location),
11360                value: Ok(value.value),
11361            }
11362        }
11363    }
11364    #[derive(Clone, Debug)]
11365    pub struct MnxDocumentGlobalMeasuresItemTime {
11366        count: ::std::result::Result<super::PositiveInteger, ::std::string::String>,
11367        unit: ::std::result::Result<
11368            super::MnxDocumentGlobalMeasuresItemTimeUnit,
11369            ::std::string::String,
11370        >,
11371    }
11372    impl ::std::default::Default for MnxDocumentGlobalMeasuresItemTime {
11373        fn default() -> Self {
11374            Self {
11375                count: Err("no value supplied for count".to_string()),
11376                unit: Err("no value supplied for unit".to_string()),
11377            }
11378        }
11379    }
11380    impl MnxDocumentGlobalMeasuresItemTime {
11381        pub fn count<T>(mut self, value: T) -> Self
11382        where
11383            T: ::std::convert::TryInto<super::PositiveInteger>,
11384            T::Error: ::std::fmt::Display,
11385        {
11386            self.count = value
11387                .try_into()
11388                .map_err(|e| {
11389                    format!("error converting supplied value for count: {}", e)
11390                });
11391            self
11392        }
11393        pub fn unit<T>(mut self, value: T) -> Self
11394        where
11395            T: ::std::convert::TryInto<super::MnxDocumentGlobalMeasuresItemTimeUnit>,
11396            T::Error: ::std::fmt::Display,
11397        {
11398            self.unit = value
11399                .try_into()
11400                .map_err(|e| format!("error converting supplied value for unit: {}", e));
11401            self
11402        }
11403    }
11404    impl ::std::convert::TryFrom<MnxDocumentGlobalMeasuresItemTime>
11405    for super::MnxDocumentGlobalMeasuresItemTime {
11406        type Error = super::error::ConversionError;
11407        fn try_from(
11408            value: MnxDocumentGlobalMeasuresItemTime,
11409        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11410            Ok(Self {
11411                count: value.count?,
11412                unit: value.unit?,
11413            })
11414        }
11415    }
11416    impl ::std::convert::From<super::MnxDocumentGlobalMeasuresItemTime>
11417    for MnxDocumentGlobalMeasuresItemTime {
11418        fn from(value: super::MnxDocumentGlobalMeasuresItemTime) -> Self {
11419            Self {
11420                count: Ok(value.count),
11421                unit: Ok(value.unit),
11422            }
11423        }
11424    }
11425    #[derive(Clone, Debug)]
11426    pub struct MnxDocumentGlobalStylesItem {
11427        color: ::std::result::Result<
11428            ::std::option::Option<super::Color>,
11429            ::std::string::String,
11430        >,
11431        selector: ::std::result::Result<::std::string::String, ::std::string::String>,
11432    }
11433    impl ::std::default::Default for MnxDocumentGlobalStylesItem {
11434        fn default() -> Self {
11435            Self {
11436                color: Ok(Default::default()),
11437                selector: Err("no value supplied for selector".to_string()),
11438            }
11439        }
11440    }
11441    impl MnxDocumentGlobalStylesItem {
11442        pub fn color<T>(mut self, value: T) -> Self
11443        where
11444            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
11445            T::Error: ::std::fmt::Display,
11446        {
11447            self.color = value
11448                .try_into()
11449                .map_err(|e| {
11450                    format!("error converting supplied value for color: {}", e)
11451                });
11452            self
11453        }
11454        pub fn selector<T>(mut self, value: T) -> Self
11455        where
11456            T: ::std::convert::TryInto<::std::string::String>,
11457            T::Error: ::std::fmt::Display,
11458        {
11459            self.selector = value
11460                .try_into()
11461                .map_err(|e| {
11462                    format!("error converting supplied value for selector: {}", e)
11463                });
11464            self
11465        }
11466    }
11467    impl ::std::convert::TryFrom<MnxDocumentGlobalStylesItem>
11468    for super::MnxDocumentGlobalStylesItem {
11469        type Error = super::error::ConversionError;
11470        fn try_from(
11471            value: MnxDocumentGlobalStylesItem,
11472        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11473            Ok(Self {
11474                color: value.color?,
11475                selector: value.selector?,
11476            })
11477        }
11478    }
11479    impl ::std::convert::From<super::MnxDocumentGlobalStylesItem>
11480    for MnxDocumentGlobalStylesItem {
11481        fn from(value: super::MnxDocumentGlobalStylesItem) -> Self {
11482            Self {
11483                color: Ok(value.color),
11484                selector: Ok(value.selector),
11485            }
11486        }
11487    }
11488    #[derive(Clone, Debug)]
11489    pub struct MnxDocumentLayoutsItem {
11490        content: ::std::result::Result<
11491            super::SystemLayoutContent,
11492            ::std::string::String,
11493        >,
11494        id: ::std::result::Result<super::Id, ::std::string::String>,
11495    }
11496    impl ::std::default::Default for MnxDocumentLayoutsItem {
11497        fn default() -> Self {
11498            Self {
11499                content: Err("no value supplied for content".to_string()),
11500                id: Err("no value supplied for id".to_string()),
11501            }
11502        }
11503    }
11504    impl MnxDocumentLayoutsItem {
11505        pub fn content<T>(mut self, value: T) -> Self
11506        where
11507            T: ::std::convert::TryInto<super::SystemLayoutContent>,
11508            T::Error: ::std::fmt::Display,
11509        {
11510            self.content = value
11511                .try_into()
11512                .map_err(|e| {
11513                    format!("error converting supplied value for content: {}", e)
11514                });
11515            self
11516        }
11517        pub fn id<T>(mut self, value: T) -> Self
11518        where
11519            T: ::std::convert::TryInto<super::Id>,
11520            T::Error: ::std::fmt::Display,
11521        {
11522            self.id = value
11523                .try_into()
11524                .map_err(|e| format!("error converting supplied value for id: {}", e));
11525            self
11526        }
11527    }
11528    impl ::std::convert::TryFrom<MnxDocumentLayoutsItem>
11529    for super::MnxDocumentLayoutsItem {
11530        type Error = super::error::ConversionError;
11531        fn try_from(
11532            value: MnxDocumentLayoutsItem,
11533        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11534            Ok(Self {
11535                content: value.content?,
11536                id: value.id?,
11537            })
11538        }
11539    }
11540    impl ::std::convert::From<super::MnxDocumentLayoutsItem> for MnxDocumentLayoutsItem {
11541        fn from(value: super::MnxDocumentLayoutsItem) -> Self {
11542            Self {
11543                content: Ok(value.content),
11544                id: Ok(value.id),
11545            }
11546        }
11547    }
11548    #[derive(Clone, Debug)]
11549    pub struct MnxDocumentMnx {
11550        support: ::std::result::Result<
11551            ::std::option::Option<super::MnxDocumentMnxSupport>,
11552            ::std::string::String,
11553        >,
11554        version: ::std::result::Result<i64, ::std::string::String>,
11555    }
11556    impl ::std::default::Default for MnxDocumentMnx {
11557        fn default() -> Self {
11558            Self {
11559                support: Ok(Default::default()),
11560                version: Err("no value supplied for version".to_string()),
11561            }
11562        }
11563    }
11564    impl MnxDocumentMnx {
11565        pub fn support<T>(mut self, value: T) -> Self
11566        where
11567            T: ::std::convert::TryInto<
11568                ::std::option::Option<super::MnxDocumentMnxSupport>,
11569            >,
11570            T::Error: ::std::fmt::Display,
11571        {
11572            self.support = value
11573                .try_into()
11574                .map_err(|e| {
11575                    format!("error converting supplied value for support: {}", e)
11576                });
11577            self
11578        }
11579        pub fn version<T>(mut self, value: T) -> Self
11580        where
11581            T: ::std::convert::TryInto<i64>,
11582            T::Error: ::std::fmt::Display,
11583        {
11584            self.version = value
11585                .try_into()
11586                .map_err(|e| {
11587                    format!("error converting supplied value for version: {}", e)
11588                });
11589            self
11590        }
11591    }
11592    impl ::std::convert::TryFrom<MnxDocumentMnx> for super::MnxDocumentMnx {
11593        type Error = super::error::ConversionError;
11594        fn try_from(
11595            value: MnxDocumentMnx,
11596        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11597            Ok(Self {
11598                support: value.support?,
11599                version: value.version?,
11600            })
11601        }
11602    }
11603    impl ::std::convert::From<super::MnxDocumentMnx> for MnxDocumentMnx {
11604        fn from(value: super::MnxDocumentMnx) -> Self {
11605            Self {
11606                support: Ok(value.support),
11607                version: Ok(value.version),
11608            }
11609        }
11610    }
11611    #[derive(Clone, Debug)]
11612    pub struct MnxDocumentMnxSupport {
11613        use_accidental_display: ::std::result::Result<
11614            ::std::option::Option<bool>,
11615            ::std::string::String,
11616        >,
11617    }
11618    impl ::std::default::Default for MnxDocumentMnxSupport {
11619        fn default() -> Self {
11620            Self {
11621                use_accidental_display: Ok(Default::default()),
11622            }
11623        }
11624    }
11625    impl MnxDocumentMnxSupport {
11626        pub fn use_accidental_display<T>(mut self, value: T) -> Self
11627        where
11628            T: ::std::convert::TryInto<::std::option::Option<bool>>,
11629            T::Error: ::std::fmt::Display,
11630        {
11631            self.use_accidental_display = value
11632                .try_into()
11633                .map_err(|e| {
11634                    format!(
11635                        "error converting supplied value for use_accidental_display: {}",
11636                        e
11637                    )
11638                });
11639            self
11640        }
11641    }
11642    impl ::std::convert::TryFrom<MnxDocumentMnxSupport>
11643    for super::MnxDocumentMnxSupport {
11644        type Error = super::error::ConversionError;
11645        fn try_from(
11646            value: MnxDocumentMnxSupport,
11647        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11648            Ok(Self {
11649                use_accidental_display: value.use_accidental_display?,
11650            })
11651        }
11652    }
11653    impl ::std::convert::From<super::MnxDocumentMnxSupport> for MnxDocumentMnxSupport {
11654        fn from(value: super::MnxDocumentMnxSupport) -> Self {
11655            Self {
11656                use_accidental_display: Ok(value.use_accidental_display),
11657            }
11658        }
11659    }
11660    #[derive(Clone, Debug)]
11661    pub struct MnxDocumentPartsItem {
11662        id: ::std::result::Result<
11663            ::std::option::Option<super::Id>,
11664            ::std::string::String,
11665        >,
11666        measures: ::std::result::Result<
11667            ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItem>,
11668            ::std::string::String,
11669        >,
11670        name: ::std::result::Result<
11671            ::std::option::Option<::std::string::String>,
11672            ::std::string::String,
11673        >,
11674        short_name: ::std::result::Result<
11675            ::std::option::Option<::std::string::String>,
11676            ::std::string::String,
11677        >,
11678        smufl_font: ::std::result::Result<
11679            ::std::option::Option<super::SmuflFont>,
11680            ::std::string::String,
11681        >,
11682        staves: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
11683    }
11684    impl ::std::default::Default for MnxDocumentPartsItem {
11685        fn default() -> Self {
11686            Self {
11687                id: Ok(Default::default()),
11688                measures: Ok(Default::default()),
11689                name: Ok(Default::default()),
11690                short_name: Ok(Default::default()),
11691                smufl_font: Ok(Default::default()),
11692                staves: Ok(Default::default()),
11693            }
11694        }
11695    }
11696    impl MnxDocumentPartsItem {
11697        pub fn id<T>(mut self, value: T) -> Self
11698        where
11699            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
11700            T::Error: ::std::fmt::Display,
11701        {
11702            self.id = value
11703                .try_into()
11704                .map_err(|e| format!("error converting supplied value for id: {}", e));
11705            self
11706        }
11707        pub fn measures<T>(mut self, value: T) -> Self
11708        where
11709            T: ::std::convert::TryInto<
11710                ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItem>,
11711            >,
11712            T::Error: ::std::fmt::Display,
11713        {
11714            self.measures = value
11715                .try_into()
11716                .map_err(|e| {
11717                    format!("error converting supplied value for measures: {}", e)
11718                });
11719            self
11720        }
11721        pub fn name<T>(mut self, value: T) -> Self
11722        where
11723            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
11724            T::Error: ::std::fmt::Display,
11725        {
11726            self.name = value
11727                .try_into()
11728                .map_err(|e| format!("error converting supplied value for name: {}", e));
11729            self
11730        }
11731        pub fn short_name<T>(mut self, value: T) -> Self
11732        where
11733            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
11734            T::Error: ::std::fmt::Display,
11735        {
11736            self.short_name = value
11737                .try_into()
11738                .map_err(|e| {
11739                    format!("error converting supplied value for short_name: {}", e)
11740                });
11741            self
11742        }
11743        pub fn smufl_font<T>(mut self, value: T) -> Self
11744        where
11745            T: ::std::convert::TryInto<::std::option::Option<super::SmuflFont>>,
11746            T::Error: ::std::fmt::Display,
11747        {
11748            self.smufl_font = value
11749                .try_into()
11750                .map_err(|e| {
11751                    format!("error converting supplied value for smufl_font: {}", e)
11752                });
11753            self
11754        }
11755        pub fn staves<T>(mut self, value: T) -> Self
11756        where
11757            T: ::std::convert::TryInto<::std::option::Option<i64>>,
11758            T::Error: ::std::fmt::Display,
11759        {
11760            self.staves = value
11761                .try_into()
11762                .map_err(|e| {
11763                    format!("error converting supplied value for staves: {}", e)
11764                });
11765            self
11766        }
11767    }
11768    impl ::std::convert::TryFrom<MnxDocumentPartsItem> for super::MnxDocumentPartsItem {
11769        type Error = super::error::ConversionError;
11770        fn try_from(
11771            value: MnxDocumentPartsItem,
11772        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11773            Ok(Self {
11774                id: value.id?,
11775                measures: value.measures?,
11776                name: value.name?,
11777                short_name: value.short_name?,
11778                smufl_font: value.smufl_font?,
11779                staves: value.staves?,
11780            })
11781        }
11782    }
11783    impl ::std::convert::From<super::MnxDocumentPartsItem> for MnxDocumentPartsItem {
11784        fn from(value: super::MnxDocumentPartsItem) -> Self {
11785            Self {
11786                id: Ok(value.id),
11787                measures: Ok(value.measures),
11788                name: Ok(value.name),
11789                short_name: Ok(value.short_name),
11790                smufl_font: Ok(value.smufl_font),
11791                staves: Ok(value.staves),
11792            }
11793        }
11794    }
11795    #[derive(Clone, Debug)]
11796    pub struct MnxDocumentPartsItemMeasuresItem {
11797        beams: ::std::result::Result<
11798            ::std::option::Option<super::BeamList>,
11799            ::std::string::String,
11800        >,
11801        clefs: ::std::result::Result<
11802            ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemClefsItem>,
11803            ::std::string::String,
11804        >,
11805        dynamics: ::std::result::Result<
11806            ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemDynamicsItem>,
11807            ::std::string::String,
11808        >,
11809        ottavas: ::std::result::Result<
11810            ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemOttavasItem>,
11811            ::std::string::String,
11812        >,
11813        sequences: ::std::result::Result<
11814            ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemSequencesItem>,
11815            ::std::string::String,
11816        >,
11817    }
11818    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItem {
11819        fn default() -> Self {
11820            Self {
11821                beams: Ok(Default::default()),
11822                clefs: Ok(Default::default()),
11823                dynamics: Ok(Default::default()),
11824                ottavas: Ok(Default::default()),
11825                sequences: Err("no value supplied for sequences".to_string()),
11826            }
11827        }
11828    }
11829    impl MnxDocumentPartsItemMeasuresItem {
11830        pub fn beams<T>(mut self, value: T) -> Self
11831        where
11832            T: ::std::convert::TryInto<::std::option::Option<super::BeamList>>,
11833            T::Error: ::std::fmt::Display,
11834        {
11835            self.beams = value
11836                .try_into()
11837                .map_err(|e| {
11838                    format!("error converting supplied value for beams: {}", e)
11839                });
11840            self
11841        }
11842        pub fn clefs<T>(mut self, value: T) -> Self
11843        where
11844            T: ::std::convert::TryInto<
11845                ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemClefsItem>,
11846            >,
11847            T::Error: ::std::fmt::Display,
11848        {
11849            self.clefs = value
11850                .try_into()
11851                .map_err(|e| {
11852                    format!("error converting supplied value for clefs: {}", e)
11853                });
11854            self
11855        }
11856        pub fn dynamics<T>(mut self, value: T) -> Self
11857        where
11858            T: ::std::convert::TryInto<
11859                ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemDynamicsItem>,
11860            >,
11861            T::Error: ::std::fmt::Display,
11862        {
11863            self.dynamics = value
11864                .try_into()
11865                .map_err(|e| {
11866                    format!("error converting supplied value for dynamics: {}", e)
11867                });
11868            self
11869        }
11870        pub fn ottavas<T>(mut self, value: T) -> Self
11871        where
11872            T: ::std::convert::TryInto<
11873                ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemOttavasItem>,
11874            >,
11875            T::Error: ::std::fmt::Display,
11876        {
11877            self.ottavas = value
11878                .try_into()
11879                .map_err(|e| {
11880                    format!("error converting supplied value for ottavas: {}", e)
11881                });
11882            self
11883        }
11884        pub fn sequences<T>(mut self, value: T) -> Self
11885        where
11886            T: ::std::convert::TryInto<
11887                ::std::vec::Vec<super::MnxDocumentPartsItemMeasuresItemSequencesItem>,
11888            >,
11889            T::Error: ::std::fmt::Display,
11890        {
11891            self.sequences = value
11892                .try_into()
11893                .map_err(|e| {
11894                    format!("error converting supplied value for sequences: {}", e)
11895                });
11896            self
11897        }
11898    }
11899    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItem>
11900    for super::MnxDocumentPartsItemMeasuresItem {
11901        type Error = super::error::ConversionError;
11902        fn try_from(
11903            value: MnxDocumentPartsItemMeasuresItem,
11904        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11905            Ok(Self {
11906                beams: value.beams?,
11907                clefs: value.clefs?,
11908                dynamics: value.dynamics?,
11909                ottavas: value.ottavas?,
11910                sequences: value.sequences?,
11911            })
11912        }
11913    }
11914    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItem>
11915    for MnxDocumentPartsItemMeasuresItem {
11916        fn from(value: super::MnxDocumentPartsItemMeasuresItem) -> Self {
11917            Self {
11918                beams: Ok(value.beams),
11919                clefs: Ok(value.clefs),
11920                dynamics: Ok(value.dynamics),
11921                ottavas: Ok(value.ottavas),
11922                sequences: Ok(value.sequences),
11923            }
11924        }
11925    }
11926    #[derive(Clone, Debug)]
11927    pub struct MnxDocumentPartsItemMeasuresItemClefsItem {
11928        clef: ::std::result::Result<
11929            super::MnxDocumentPartsItemMeasuresItemClefsItemClef,
11930            ::std::string::String,
11931        >,
11932        position: ::std::result::Result<
11933            ::std::option::Option<super::RhythmicPosition>,
11934            ::std::string::String,
11935        >,
11936        staff: ::std::result::Result<
11937            ::std::option::Option<super::StaffNumber>,
11938            ::std::string::String,
11939        >,
11940    }
11941    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItemClefsItem {
11942        fn default() -> Self {
11943            Self {
11944                clef: Err("no value supplied for clef".to_string()),
11945                position: Ok(Default::default()),
11946                staff: Ok(Default::default()),
11947            }
11948        }
11949    }
11950    impl MnxDocumentPartsItemMeasuresItemClefsItem {
11951        pub fn clef<T>(mut self, value: T) -> Self
11952        where
11953            T: ::std::convert::TryInto<
11954                super::MnxDocumentPartsItemMeasuresItemClefsItemClef,
11955            >,
11956            T::Error: ::std::fmt::Display,
11957        {
11958            self.clef = value
11959                .try_into()
11960                .map_err(|e| format!("error converting supplied value for clef: {}", e));
11961            self
11962        }
11963        pub fn position<T>(mut self, value: T) -> Self
11964        where
11965            T: ::std::convert::TryInto<::std::option::Option<super::RhythmicPosition>>,
11966            T::Error: ::std::fmt::Display,
11967        {
11968            self.position = value
11969                .try_into()
11970                .map_err(|e| {
11971                    format!("error converting supplied value for position: {}", e)
11972                });
11973            self
11974        }
11975        pub fn staff<T>(mut self, value: T) -> Self
11976        where
11977            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
11978            T::Error: ::std::fmt::Display,
11979        {
11980            self.staff = value
11981                .try_into()
11982                .map_err(|e| {
11983                    format!("error converting supplied value for staff: {}", e)
11984                });
11985            self
11986        }
11987    }
11988    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItemClefsItem>
11989    for super::MnxDocumentPartsItemMeasuresItemClefsItem {
11990        type Error = super::error::ConversionError;
11991        fn try_from(
11992            value: MnxDocumentPartsItemMeasuresItemClefsItem,
11993        ) -> ::std::result::Result<Self, super::error::ConversionError> {
11994            Ok(Self {
11995                clef: value.clef?,
11996                position: value.position?,
11997                staff: value.staff?,
11998            })
11999        }
12000    }
12001    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItemClefsItem>
12002    for MnxDocumentPartsItemMeasuresItemClefsItem {
12003        fn from(value: super::MnxDocumentPartsItemMeasuresItemClefsItem) -> Self {
12004            Self {
12005                clef: Ok(value.clef),
12006                position: Ok(value.position),
12007                staff: Ok(value.staff),
12008            }
12009        }
12010    }
12011    #[derive(Clone, Debug)]
12012    pub struct MnxDocumentPartsItemMeasuresItemClefsItemClef {
12013        class: ::std::result::Result<
12014            ::std::option::Option<super::StyleClass>,
12015            ::std::string::String,
12016        >,
12017        color: ::std::result::Result<
12018            ::std::option::Option<::std::string::String>,
12019            ::std::string::String,
12020        >,
12021        glyph: ::std::result::Result<
12022            ::std::option::Option<super::SmuflGlyph>,
12023            ::std::string::String,
12024        >,
12025        octave: ::std::result::Result<::std::option::Option<i64>, ::std::string::String>,
12026        sign: ::std::result::Result<
12027            super::MnxDocumentPartsItemMeasuresItemClefsItemClefSign,
12028            ::std::string::String,
12029        >,
12030        staff_position: ::std::result::Result<
12031            super::StaffPosition,
12032            ::std::string::String,
12033        >,
12034    }
12035    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItemClefsItemClef {
12036        fn default() -> Self {
12037            Self {
12038                class: Ok(Default::default()),
12039                color: Ok(Default::default()),
12040                glyph: Ok(Default::default()),
12041                octave: Ok(Default::default()),
12042                sign: Err("no value supplied for sign".to_string()),
12043                staff_position: Err("no value supplied for staff_position".to_string()),
12044            }
12045        }
12046    }
12047    impl MnxDocumentPartsItemMeasuresItemClefsItemClef {
12048        pub fn class<T>(mut self, value: T) -> Self
12049        where
12050            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
12051            T::Error: ::std::fmt::Display,
12052        {
12053            self.class = value
12054                .try_into()
12055                .map_err(|e| {
12056                    format!("error converting supplied value for class: {}", e)
12057                });
12058            self
12059        }
12060        pub fn color<T>(mut self, value: T) -> Self
12061        where
12062            T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
12063            T::Error: ::std::fmt::Display,
12064        {
12065            self.color = value
12066                .try_into()
12067                .map_err(|e| {
12068                    format!("error converting supplied value for color: {}", e)
12069                });
12070            self
12071        }
12072        pub fn glyph<T>(mut self, value: T) -> Self
12073        where
12074            T: ::std::convert::TryInto<::std::option::Option<super::SmuflGlyph>>,
12075            T::Error: ::std::fmt::Display,
12076        {
12077            self.glyph = value
12078                .try_into()
12079                .map_err(|e| {
12080                    format!("error converting supplied value for glyph: {}", e)
12081                });
12082            self
12083        }
12084        pub fn octave<T>(mut self, value: T) -> Self
12085        where
12086            T: ::std::convert::TryInto<::std::option::Option<i64>>,
12087            T::Error: ::std::fmt::Display,
12088        {
12089            self.octave = value
12090                .try_into()
12091                .map_err(|e| {
12092                    format!("error converting supplied value for octave: {}", e)
12093                });
12094            self
12095        }
12096        pub fn sign<T>(mut self, value: T) -> Self
12097        where
12098            T: ::std::convert::TryInto<
12099                super::MnxDocumentPartsItemMeasuresItemClefsItemClefSign,
12100            >,
12101            T::Error: ::std::fmt::Display,
12102        {
12103            self.sign = value
12104                .try_into()
12105                .map_err(|e| format!("error converting supplied value for sign: {}", e));
12106            self
12107        }
12108        pub fn staff_position<T>(mut self, value: T) -> Self
12109        where
12110            T: ::std::convert::TryInto<super::StaffPosition>,
12111            T::Error: ::std::fmt::Display,
12112        {
12113            self.staff_position = value
12114                .try_into()
12115                .map_err(|e| {
12116                    format!("error converting supplied value for staff_position: {}", e)
12117                });
12118            self
12119        }
12120    }
12121    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItemClefsItemClef>
12122    for super::MnxDocumentPartsItemMeasuresItemClefsItemClef {
12123        type Error = super::error::ConversionError;
12124        fn try_from(
12125            value: MnxDocumentPartsItemMeasuresItemClefsItemClef,
12126        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12127            Ok(Self {
12128                class: value.class?,
12129                color: value.color?,
12130                glyph: value.glyph?,
12131                octave: value.octave?,
12132                sign: value.sign?,
12133                staff_position: value.staff_position?,
12134            })
12135        }
12136    }
12137    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItemClefsItemClef>
12138    for MnxDocumentPartsItemMeasuresItemClefsItemClef {
12139        fn from(value: super::MnxDocumentPartsItemMeasuresItemClefsItemClef) -> Self {
12140            Self {
12141                class: Ok(value.class),
12142                color: Ok(value.color),
12143                glyph: Ok(value.glyph),
12144                octave: Ok(value.octave),
12145                sign: Ok(value.sign),
12146                staff_position: Ok(value.staff_position),
12147            }
12148        }
12149    }
12150    #[derive(Clone, Debug)]
12151    pub struct MnxDocumentPartsItemMeasuresItemDynamicsItem {
12152        glyph: ::std::result::Result<
12153            ::std::option::Option<super::SmuflGlyph>,
12154            ::std::string::String,
12155        >,
12156        position: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
12157        staff: ::std::result::Result<
12158            ::std::option::Option<super::StaffNumber>,
12159            ::std::string::String,
12160        >,
12161        value: ::std::result::Result<::std::string::String, ::std::string::String>,
12162        voice: ::std::result::Result<
12163            ::std::option::Option<super::VoiceName>,
12164            ::std::string::String,
12165        >,
12166    }
12167    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItemDynamicsItem {
12168        fn default() -> Self {
12169            Self {
12170                glyph: Ok(Default::default()),
12171                position: Err("no value supplied for position".to_string()),
12172                staff: Ok(Default::default()),
12173                value: Err("no value supplied for value".to_string()),
12174                voice: Ok(Default::default()),
12175            }
12176        }
12177    }
12178    impl MnxDocumentPartsItemMeasuresItemDynamicsItem {
12179        pub fn glyph<T>(mut self, value: T) -> Self
12180        where
12181            T: ::std::convert::TryInto<::std::option::Option<super::SmuflGlyph>>,
12182            T::Error: ::std::fmt::Display,
12183        {
12184            self.glyph = value
12185                .try_into()
12186                .map_err(|e| {
12187                    format!("error converting supplied value for glyph: {}", e)
12188                });
12189            self
12190        }
12191        pub fn position<T>(mut self, value: T) -> Self
12192        where
12193            T: ::std::convert::TryInto<super::RhythmicPosition>,
12194            T::Error: ::std::fmt::Display,
12195        {
12196            self.position = value
12197                .try_into()
12198                .map_err(|e| {
12199                    format!("error converting supplied value for position: {}", e)
12200                });
12201            self
12202        }
12203        pub fn staff<T>(mut self, value: T) -> Self
12204        where
12205            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
12206            T::Error: ::std::fmt::Display,
12207        {
12208            self.staff = value
12209                .try_into()
12210                .map_err(|e| {
12211                    format!("error converting supplied value for staff: {}", e)
12212                });
12213            self
12214        }
12215        pub fn value<T>(mut self, value: T) -> Self
12216        where
12217            T: ::std::convert::TryInto<::std::string::String>,
12218            T::Error: ::std::fmt::Display,
12219        {
12220            self.value = value
12221                .try_into()
12222                .map_err(|e| {
12223                    format!("error converting supplied value for value: {}", e)
12224                });
12225            self
12226        }
12227        pub fn voice<T>(mut self, value: T) -> Self
12228        where
12229            T: ::std::convert::TryInto<::std::option::Option<super::VoiceName>>,
12230            T::Error: ::std::fmt::Display,
12231        {
12232            self.voice = value
12233                .try_into()
12234                .map_err(|e| {
12235                    format!("error converting supplied value for voice: {}", e)
12236                });
12237            self
12238        }
12239    }
12240    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItemDynamicsItem>
12241    for super::MnxDocumentPartsItemMeasuresItemDynamicsItem {
12242        type Error = super::error::ConversionError;
12243        fn try_from(
12244            value: MnxDocumentPartsItemMeasuresItemDynamicsItem,
12245        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12246            Ok(Self {
12247                glyph: value.glyph?,
12248                position: value.position?,
12249                staff: value.staff?,
12250                value: value.value?,
12251                voice: value.voice?,
12252            })
12253        }
12254    }
12255    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItemDynamicsItem>
12256    for MnxDocumentPartsItemMeasuresItemDynamicsItem {
12257        fn from(value: super::MnxDocumentPartsItemMeasuresItemDynamicsItem) -> Self {
12258            Self {
12259                glyph: Ok(value.glyph),
12260                position: Ok(value.position),
12261                staff: Ok(value.staff),
12262                value: Ok(value.value),
12263                voice: Ok(value.voice),
12264            }
12265        }
12266    }
12267    #[derive(Clone, Debug)]
12268    pub struct MnxDocumentPartsItemMeasuresItemOttavasItem {
12269        end: ::std::result::Result<
12270            super::MeasureRhythmicPosition,
12271            ::std::string::String,
12272        >,
12273        orient: ::std::result::Result<
12274            ::std::option::Option<super::Orientation>,
12275            ::std::string::String,
12276        >,
12277        position: ::std::result::Result<super::RhythmicPosition, ::std::string::String>,
12278        staff: ::std::result::Result<
12279            ::std::option::Option<super::StaffNumber>,
12280            ::std::string::String,
12281        >,
12282        value: ::std::result::Result<
12283            super::MnxDocumentPartsItemMeasuresItemOttavasItemValue,
12284            ::std::string::String,
12285        >,
12286        voice: ::std::result::Result<
12287            ::std::option::Option<super::VoiceName>,
12288            ::std::string::String,
12289        >,
12290    }
12291    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItemOttavasItem {
12292        fn default() -> Self {
12293            Self {
12294                end: Err("no value supplied for end".to_string()),
12295                orient: Ok(Default::default()),
12296                position: Err("no value supplied for position".to_string()),
12297                staff: Ok(Default::default()),
12298                value: Err("no value supplied for value".to_string()),
12299                voice: Ok(Default::default()),
12300            }
12301        }
12302    }
12303    impl MnxDocumentPartsItemMeasuresItemOttavasItem {
12304        pub fn end<T>(mut self, value: T) -> Self
12305        where
12306            T: ::std::convert::TryInto<super::MeasureRhythmicPosition>,
12307            T::Error: ::std::fmt::Display,
12308        {
12309            self.end = value
12310                .try_into()
12311                .map_err(|e| format!("error converting supplied value for end: {}", e));
12312            self
12313        }
12314        pub fn orient<T>(mut self, value: T) -> Self
12315        where
12316            T: ::std::convert::TryInto<::std::option::Option<super::Orientation>>,
12317            T::Error: ::std::fmt::Display,
12318        {
12319            self.orient = value
12320                .try_into()
12321                .map_err(|e| {
12322                    format!("error converting supplied value for orient: {}", e)
12323                });
12324            self
12325        }
12326        pub fn position<T>(mut self, value: T) -> Self
12327        where
12328            T: ::std::convert::TryInto<super::RhythmicPosition>,
12329            T::Error: ::std::fmt::Display,
12330        {
12331            self.position = value
12332                .try_into()
12333                .map_err(|e| {
12334                    format!("error converting supplied value for position: {}", e)
12335                });
12336            self
12337        }
12338        pub fn staff<T>(mut self, value: T) -> Self
12339        where
12340            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
12341            T::Error: ::std::fmt::Display,
12342        {
12343            self.staff = value
12344                .try_into()
12345                .map_err(|e| {
12346                    format!("error converting supplied value for staff: {}", e)
12347                });
12348            self
12349        }
12350        pub fn value<T>(mut self, value: T) -> Self
12351        where
12352            T: ::std::convert::TryInto<
12353                super::MnxDocumentPartsItemMeasuresItemOttavasItemValue,
12354            >,
12355            T::Error: ::std::fmt::Display,
12356        {
12357            self.value = value
12358                .try_into()
12359                .map_err(|e| {
12360                    format!("error converting supplied value for value: {}", e)
12361                });
12362            self
12363        }
12364        pub fn voice<T>(mut self, value: T) -> Self
12365        where
12366            T: ::std::convert::TryInto<::std::option::Option<super::VoiceName>>,
12367            T::Error: ::std::fmt::Display,
12368        {
12369            self.voice = value
12370                .try_into()
12371                .map_err(|e| {
12372                    format!("error converting supplied value for voice: {}", e)
12373                });
12374            self
12375        }
12376    }
12377    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItemOttavasItem>
12378    for super::MnxDocumentPartsItemMeasuresItemOttavasItem {
12379        type Error = super::error::ConversionError;
12380        fn try_from(
12381            value: MnxDocumentPartsItemMeasuresItemOttavasItem,
12382        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12383            Ok(Self {
12384                end: value.end?,
12385                orient: value.orient?,
12386                position: value.position?,
12387                staff: value.staff?,
12388                value: value.value?,
12389                voice: value.voice?,
12390            })
12391        }
12392    }
12393    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItemOttavasItem>
12394    for MnxDocumentPartsItemMeasuresItemOttavasItem {
12395        fn from(value: super::MnxDocumentPartsItemMeasuresItemOttavasItem) -> Self {
12396            Self {
12397                end: Ok(value.end),
12398                orient: Ok(value.orient),
12399                position: Ok(value.position),
12400                staff: Ok(value.staff),
12401                value: Ok(value.value),
12402                voice: Ok(value.voice),
12403            }
12404        }
12405    }
12406    #[derive(Clone, Debug)]
12407    pub struct MnxDocumentPartsItemMeasuresItemSequencesItem {
12408        content: ::std::result::Result<super::SequenceContent, ::std::string::String>,
12409        orient: ::std::result::Result<
12410            ::std::option::Option<super::Orientation>,
12411            ::std::string::String,
12412        >,
12413        staff: ::std::result::Result<
12414            ::std::option::Option<super::StaffNumber>,
12415            ::std::string::String,
12416        >,
12417        voice: ::std::result::Result<
12418            ::std::option::Option<super::VoiceName>,
12419            ::std::string::String,
12420        >,
12421    }
12422    impl ::std::default::Default for MnxDocumentPartsItemMeasuresItemSequencesItem {
12423        fn default() -> Self {
12424            Self {
12425                content: Err("no value supplied for content".to_string()),
12426                orient: Ok(Default::default()),
12427                staff: Ok(Default::default()),
12428                voice: Ok(Default::default()),
12429            }
12430        }
12431    }
12432    impl MnxDocumentPartsItemMeasuresItemSequencesItem {
12433        pub fn content<T>(mut self, value: T) -> Self
12434        where
12435            T: ::std::convert::TryInto<super::SequenceContent>,
12436            T::Error: ::std::fmt::Display,
12437        {
12438            self.content = value
12439                .try_into()
12440                .map_err(|e| {
12441                    format!("error converting supplied value for content: {}", e)
12442                });
12443            self
12444        }
12445        pub fn orient<T>(mut self, value: T) -> Self
12446        where
12447            T: ::std::convert::TryInto<::std::option::Option<super::Orientation>>,
12448            T::Error: ::std::fmt::Display,
12449        {
12450            self.orient = value
12451                .try_into()
12452                .map_err(|e| {
12453                    format!("error converting supplied value for orient: {}", e)
12454                });
12455            self
12456        }
12457        pub fn staff<T>(mut self, value: T) -> Self
12458        where
12459            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
12460            T::Error: ::std::fmt::Display,
12461        {
12462            self.staff = value
12463                .try_into()
12464                .map_err(|e| {
12465                    format!("error converting supplied value for staff: {}", e)
12466                });
12467            self
12468        }
12469        pub fn voice<T>(mut self, value: T) -> Self
12470        where
12471            T: ::std::convert::TryInto<::std::option::Option<super::VoiceName>>,
12472            T::Error: ::std::fmt::Display,
12473        {
12474            self.voice = value
12475                .try_into()
12476                .map_err(|e| {
12477                    format!("error converting supplied value for voice: {}", e)
12478                });
12479            self
12480        }
12481    }
12482    impl ::std::convert::TryFrom<MnxDocumentPartsItemMeasuresItemSequencesItem>
12483    for super::MnxDocumentPartsItemMeasuresItemSequencesItem {
12484        type Error = super::error::ConversionError;
12485        fn try_from(
12486            value: MnxDocumentPartsItemMeasuresItemSequencesItem,
12487        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12488            Ok(Self {
12489                content: value.content?,
12490                orient: value.orient?,
12491                staff: value.staff?,
12492                voice: value.voice?,
12493            })
12494        }
12495    }
12496    impl ::std::convert::From<super::MnxDocumentPartsItemMeasuresItemSequencesItem>
12497    for MnxDocumentPartsItemMeasuresItemSequencesItem {
12498        fn from(value: super::MnxDocumentPartsItemMeasuresItemSequencesItem) -> Self {
12499            Self {
12500                content: Ok(value.content),
12501                orient: Ok(value.orient),
12502                staff: Ok(value.staff),
12503                voice: Ok(value.voice),
12504            }
12505        }
12506    }
12507    #[derive(Clone, Debug)]
12508    pub struct MnxDocumentScoresItem {
12509        layout: ::std::result::Result<
12510            ::std::option::Option<super::Id>,
12511            ::std::string::String,
12512        >,
12513        multimeasure_rests: ::std::result::Result<
12514            ::std::vec::Vec<super::MnxDocumentScoresItemMultimeasureRestsItem>,
12515            ::std::string::String,
12516        >,
12517        name: ::std::result::Result<::std::string::String, ::std::string::String>,
12518        pages: ::std::result::Result<
12519            ::std::vec::Vec<super::MnxDocumentScoresItemPagesItem>,
12520            ::std::string::String,
12521        >,
12522    }
12523    impl ::std::default::Default for MnxDocumentScoresItem {
12524        fn default() -> Self {
12525            Self {
12526                layout: Ok(Default::default()),
12527                multimeasure_rests: Ok(Default::default()),
12528                name: Err("no value supplied for name".to_string()),
12529                pages: Ok(Default::default()),
12530            }
12531        }
12532    }
12533    impl MnxDocumentScoresItem {
12534        pub fn layout<T>(mut self, value: T) -> Self
12535        where
12536            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
12537            T::Error: ::std::fmt::Display,
12538        {
12539            self.layout = value
12540                .try_into()
12541                .map_err(|e| {
12542                    format!("error converting supplied value for layout: {}", e)
12543                });
12544            self
12545        }
12546        pub fn multimeasure_rests<T>(mut self, value: T) -> Self
12547        where
12548            T: ::std::convert::TryInto<
12549                ::std::vec::Vec<super::MnxDocumentScoresItemMultimeasureRestsItem>,
12550            >,
12551            T::Error: ::std::fmt::Display,
12552        {
12553            self.multimeasure_rests = value
12554                .try_into()
12555                .map_err(|e| {
12556                    format!(
12557                        "error converting supplied value for multimeasure_rests: {}", e
12558                    )
12559                });
12560            self
12561        }
12562        pub fn name<T>(mut self, value: T) -> Self
12563        where
12564            T: ::std::convert::TryInto<::std::string::String>,
12565            T::Error: ::std::fmt::Display,
12566        {
12567            self.name = value
12568                .try_into()
12569                .map_err(|e| format!("error converting supplied value for name: {}", e));
12570            self
12571        }
12572        pub fn pages<T>(mut self, value: T) -> Self
12573        where
12574            T: ::std::convert::TryInto<
12575                ::std::vec::Vec<super::MnxDocumentScoresItemPagesItem>,
12576            >,
12577            T::Error: ::std::fmt::Display,
12578        {
12579            self.pages = value
12580                .try_into()
12581                .map_err(|e| {
12582                    format!("error converting supplied value for pages: {}", e)
12583                });
12584            self
12585        }
12586    }
12587    impl ::std::convert::TryFrom<MnxDocumentScoresItem>
12588    for super::MnxDocumentScoresItem {
12589        type Error = super::error::ConversionError;
12590        fn try_from(
12591            value: MnxDocumentScoresItem,
12592        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12593            Ok(Self {
12594                layout: value.layout?,
12595                multimeasure_rests: value.multimeasure_rests?,
12596                name: value.name?,
12597                pages: value.pages?,
12598            })
12599        }
12600    }
12601    impl ::std::convert::From<super::MnxDocumentScoresItem> for MnxDocumentScoresItem {
12602        fn from(value: super::MnxDocumentScoresItem) -> Self {
12603            Self {
12604                layout: Ok(value.layout),
12605                multimeasure_rests: Ok(value.multimeasure_rests),
12606                name: Ok(value.name),
12607                pages: Ok(value.pages),
12608            }
12609        }
12610    }
12611    #[derive(Clone, Debug)]
12612    pub struct MnxDocumentScoresItemMultimeasureRestsItem {
12613        duration: ::std::result::Result<i64, ::std::string::String>,
12614        label: ::std::result::Result<
12615            ::std::option::Option<super::String>,
12616            ::std::string::String,
12617        >,
12618        start: ::std::result::Result<super::MeasureNumber, ::std::string::String>,
12619    }
12620    impl ::std::default::Default for MnxDocumentScoresItemMultimeasureRestsItem {
12621        fn default() -> Self {
12622            Self {
12623                duration: Err("no value supplied for duration".to_string()),
12624                label: Ok(Default::default()),
12625                start: Err("no value supplied for start".to_string()),
12626            }
12627        }
12628    }
12629    impl MnxDocumentScoresItemMultimeasureRestsItem {
12630        pub fn duration<T>(mut self, value: T) -> Self
12631        where
12632            T: ::std::convert::TryInto<i64>,
12633            T::Error: ::std::fmt::Display,
12634        {
12635            self.duration = value
12636                .try_into()
12637                .map_err(|e| {
12638                    format!("error converting supplied value for duration: {}", e)
12639                });
12640            self
12641        }
12642        pub fn label<T>(mut self, value: T) -> Self
12643        where
12644            T: ::std::convert::TryInto<::std::option::Option<super::String>>,
12645            T::Error: ::std::fmt::Display,
12646        {
12647            self.label = value
12648                .try_into()
12649                .map_err(|e| {
12650                    format!("error converting supplied value for label: {}", e)
12651                });
12652            self
12653        }
12654        pub fn start<T>(mut self, value: T) -> Self
12655        where
12656            T: ::std::convert::TryInto<super::MeasureNumber>,
12657            T::Error: ::std::fmt::Display,
12658        {
12659            self.start = value
12660                .try_into()
12661                .map_err(|e| {
12662                    format!("error converting supplied value for start: {}", e)
12663                });
12664            self
12665        }
12666    }
12667    impl ::std::convert::TryFrom<MnxDocumentScoresItemMultimeasureRestsItem>
12668    for super::MnxDocumentScoresItemMultimeasureRestsItem {
12669        type Error = super::error::ConversionError;
12670        fn try_from(
12671            value: MnxDocumentScoresItemMultimeasureRestsItem,
12672        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12673            Ok(Self {
12674                duration: value.duration?,
12675                label: value.label?,
12676                start: value.start?,
12677            })
12678        }
12679    }
12680    impl ::std::convert::From<super::MnxDocumentScoresItemMultimeasureRestsItem>
12681    for MnxDocumentScoresItemMultimeasureRestsItem {
12682        fn from(value: super::MnxDocumentScoresItemMultimeasureRestsItem) -> Self {
12683            Self {
12684                duration: Ok(value.duration),
12685                label: Ok(value.label),
12686                start: Ok(value.start),
12687            }
12688        }
12689    }
12690    #[derive(Clone, Debug)]
12691    pub struct MnxDocumentScoresItemPagesItem {
12692        layout: ::std::result::Result<
12693            ::std::option::Option<super::Id>,
12694            ::std::string::String,
12695        >,
12696        systems: ::std::result::Result<
12697            ::std::vec::Vec<super::MnxDocumentScoresItemPagesItemSystemsItem>,
12698            ::std::string::String,
12699        >,
12700    }
12701    impl ::std::default::Default for MnxDocumentScoresItemPagesItem {
12702        fn default() -> Self {
12703            Self {
12704                layout: Ok(Default::default()),
12705                systems: Err("no value supplied for systems".to_string()),
12706            }
12707        }
12708    }
12709    impl MnxDocumentScoresItemPagesItem {
12710        pub fn layout<T>(mut self, value: T) -> Self
12711        where
12712            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
12713            T::Error: ::std::fmt::Display,
12714        {
12715            self.layout = value
12716                .try_into()
12717                .map_err(|e| {
12718                    format!("error converting supplied value for layout: {}", e)
12719                });
12720            self
12721        }
12722        pub fn systems<T>(mut self, value: T) -> Self
12723        where
12724            T: ::std::convert::TryInto<
12725                ::std::vec::Vec<super::MnxDocumentScoresItemPagesItemSystemsItem>,
12726            >,
12727            T::Error: ::std::fmt::Display,
12728        {
12729            self.systems = value
12730                .try_into()
12731                .map_err(|e| {
12732                    format!("error converting supplied value for systems: {}", e)
12733                });
12734            self
12735        }
12736    }
12737    impl ::std::convert::TryFrom<MnxDocumentScoresItemPagesItem>
12738    for super::MnxDocumentScoresItemPagesItem {
12739        type Error = super::error::ConversionError;
12740        fn try_from(
12741            value: MnxDocumentScoresItemPagesItem,
12742        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12743            Ok(Self {
12744                layout: value.layout?,
12745                systems: value.systems?,
12746            })
12747        }
12748    }
12749    impl ::std::convert::From<super::MnxDocumentScoresItemPagesItem>
12750    for MnxDocumentScoresItemPagesItem {
12751        fn from(value: super::MnxDocumentScoresItemPagesItem) -> Self {
12752            Self {
12753                layout: Ok(value.layout),
12754                systems: Ok(value.systems),
12755            }
12756        }
12757    }
12758    #[derive(Clone, Debug)]
12759    pub struct MnxDocumentScoresItemPagesItemSystemsItem {
12760        layout: ::std::result::Result<
12761            ::std::option::Option<super::Id>,
12762            ::std::string::String,
12763        >,
12764        layout_changes: ::std::result::Result<
12765            ::std::vec::Vec<
12766                super::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12767            >,
12768            ::std::string::String,
12769        >,
12770        measure: ::std::result::Result<super::MeasureNumber, ::std::string::String>,
12771    }
12772    impl ::std::default::Default for MnxDocumentScoresItemPagesItemSystemsItem {
12773        fn default() -> Self {
12774            Self {
12775                layout: Ok(Default::default()),
12776                layout_changes: Ok(Default::default()),
12777                measure: Err("no value supplied for measure".to_string()),
12778            }
12779        }
12780    }
12781    impl MnxDocumentScoresItemPagesItemSystemsItem {
12782        pub fn layout<T>(mut self, value: T) -> Self
12783        where
12784            T: ::std::convert::TryInto<::std::option::Option<super::Id>>,
12785            T::Error: ::std::fmt::Display,
12786        {
12787            self.layout = value
12788                .try_into()
12789                .map_err(|e| {
12790                    format!("error converting supplied value for layout: {}", e)
12791                });
12792            self
12793        }
12794        pub fn layout_changes<T>(mut self, value: T) -> Self
12795        where
12796            T: ::std::convert::TryInto<
12797                ::std::vec::Vec<
12798                    super::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12799                >,
12800            >,
12801            T::Error: ::std::fmt::Display,
12802        {
12803            self.layout_changes = value
12804                .try_into()
12805                .map_err(|e| {
12806                    format!("error converting supplied value for layout_changes: {}", e)
12807                });
12808            self
12809        }
12810        pub fn measure<T>(mut self, value: T) -> Self
12811        where
12812            T: ::std::convert::TryInto<super::MeasureNumber>,
12813            T::Error: ::std::fmt::Display,
12814        {
12815            self.measure = value
12816                .try_into()
12817                .map_err(|e| {
12818                    format!("error converting supplied value for measure: {}", e)
12819                });
12820            self
12821        }
12822    }
12823    impl ::std::convert::TryFrom<MnxDocumentScoresItemPagesItemSystemsItem>
12824    for super::MnxDocumentScoresItemPagesItemSystemsItem {
12825        type Error = super::error::ConversionError;
12826        fn try_from(
12827            value: MnxDocumentScoresItemPagesItemSystemsItem,
12828        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12829            Ok(Self {
12830                layout: value.layout?,
12831                layout_changes: value.layout_changes?,
12832                measure: value.measure?,
12833            })
12834        }
12835    }
12836    impl ::std::convert::From<super::MnxDocumentScoresItemPagesItemSystemsItem>
12837    for MnxDocumentScoresItemPagesItemSystemsItem {
12838        fn from(value: super::MnxDocumentScoresItemPagesItemSystemsItem) -> Self {
12839            Self {
12840                layout: Ok(value.layout),
12841                layout_changes: Ok(value.layout_changes),
12842                measure: Ok(value.measure),
12843            }
12844        }
12845    }
12846    #[derive(Clone, Debug)]
12847    pub struct MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
12848        layout: ::std::result::Result<super::Id, ::std::string::String>,
12849        location: ::std::result::Result<
12850            super::MeasureRhythmicPosition,
12851            ::std::string::String,
12852        >,
12853    }
12854    impl ::std::default::Default
12855    for MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
12856        fn default() -> Self {
12857            Self {
12858                layout: Err("no value supplied for layout".to_string()),
12859                location: Err("no value supplied for location".to_string()),
12860            }
12861        }
12862    }
12863    impl MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
12864        pub fn layout<T>(mut self, value: T) -> Self
12865        where
12866            T: ::std::convert::TryInto<super::Id>,
12867            T::Error: ::std::fmt::Display,
12868        {
12869            self.layout = value
12870                .try_into()
12871                .map_err(|e| {
12872                    format!("error converting supplied value for layout: {}", e)
12873                });
12874            self
12875        }
12876        pub fn location<T>(mut self, value: T) -> Self
12877        where
12878            T: ::std::convert::TryInto<super::MeasureRhythmicPosition>,
12879            T::Error: ::std::fmt::Display,
12880        {
12881            self.location = value
12882                .try_into()
12883                .map_err(|e| {
12884                    format!("error converting supplied value for location: {}", e)
12885                });
12886            self
12887        }
12888    }
12889    impl ::std::convert::TryFrom<
12890        MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12891    > for super::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
12892        type Error = super::error::ConversionError;
12893        fn try_from(
12894            value: MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12895        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12896            Ok(Self {
12897                layout: value.layout?,
12898                location: value.location?,
12899            })
12900        }
12901    }
12902    impl ::std::convert::From<
12903        super::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12904    > for MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem {
12905        fn from(
12906            value: super::MnxDocumentScoresItemPagesItemSystemsItemLayoutChangesItem,
12907        ) -> Self {
12908            Self {
12909                layout: Ok(value.layout),
12910                location: Ok(value.location),
12911            }
12912        }
12913    }
12914    #[derive(Clone, Debug)]
12915    pub struct NoteValue {
12916        base: ::std::result::Result<super::NoteValueBase, ::std::string::String>,
12917        dots: ::std::result::Result<
12918            ::std::option::Option<super::PositiveInteger>,
12919            ::std::string::String,
12920        >,
12921    }
12922    impl ::std::default::Default for NoteValue {
12923        fn default() -> Self {
12924            Self {
12925                base: Err("no value supplied for base".to_string()),
12926                dots: Ok(Default::default()),
12927            }
12928        }
12929    }
12930    impl NoteValue {
12931        pub fn base<T>(mut self, value: T) -> Self
12932        where
12933            T: ::std::convert::TryInto<super::NoteValueBase>,
12934            T::Error: ::std::fmt::Display,
12935        {
12936            self.base = value
12937                .try_into()
12938                .map_err(|e| format!("error converting supplied value for base: {}", e));
12939            self
12940        }
12941        pub fn dots<T>(mut self, value: T) -> Self
12942        where
12943            T: ::std::convert::TryInto<::std::option::Option<super::PositiveInteger>>,
12944            T::Error: ::std::fmt::Display,
12945        {
12946            self.dots = value
12947                .try_into()
12948                .map_err(|e| format!("error converting supplied value for dots: {}", e));
12949            self
12950        }
12951    }
12952    impl ::std::convert::TryFrom<NoteValue> for super::NoteValue {
12953        type Error = super::error::ConversionError;
12954        fn try_from(
12955            value: NoteValue,
12956        ) -> ::std::result::Result<Self, super::error::ConversionError> {
12957            Ok(Self {
12958                base: value.base?,
12959                dots: value.dots?,
12960            })
12961        }
12962    }
12963    impl ::std::convert::From<super::NoteValue> for NoteValue {
12964        fn from(value: super::NoteValue) -> Self {
12965            Self {
12966                base: Ok(value.base),
12967                dots: Ok(value.dots),
12968            }
12969        }
12970    }
12971    #[derive(Clone, Debug)]
12972    pub struct NoteValueQuantity {
12973        duration: ::std::result::Result<super::NoteValue, ::std::string::String>,
12974        multiple: ::std::result::Result<super::PositiveInteger, ::std::string::String>,
12975    }
12976    impl ::std::default::Default for NoteValueQuantity {
12977        fn default() -> Self {
12978            Self {
12979                duration: Err("no value supplied for duration".to_string()),
12980                multiple: Err("no value supplied for multiple".to_string()),
12981            }
12982        }
12983    }
12984    impl NoteValueQuantity {
12985        pub fn duration<T>(mut self, value: T) -> Self
12986        where
12987            T: ::std::convert::TryInto<super::NoteValue>,
12988            T::Error: ::std::fmt::Display,
12989        {
12990            self.duration = value
12991                .try_into()
12992                .map_err(|e| {
12993                    format!("error converting supplied value for duration: {}", e)
12994                });
12995            self
12996        }
12997        pub fn multiple<T>(mut self, value: T) -> Self
12998        where
12999            T: ::std::convert::TryInto<super::PositiveInteger>,
13000            T::Error: ::std::fmt::Display,
13001        {
13002            self.multiple = value
13003                .try_into()
13004                .map_err(|e| {
13005                    format!("error converting supplied value for multiple: {}", e)
13006                });
13007            self
13008        }
13009    }
13010    impl ::std::convert::TryFrom<NoteValueQuantity> for super::NoteValueQuantity {
13011        type Error = super::error::ConversionError;
13012        fn try_from(
13013            value: NoteValueQuantity,
13014        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13015            Ok(Self {
13016                duration: value.duration?,
13017                multiple: value.multiple?,
13018            })
13019        }
13020    }
13021    impl ::std::convert::From<super::NoteValueQuantity> for NoteValueQuantity {
13022        fn from(value: super::NoteValueQuantity) -> Self {
13023            Self {
13024                duration: Ok(value.duration),
13025                multiple: Ok(value.multiple),
13026            }
13027        }
13028    }
13029    #[derive(Clone, Debug)]
13030    pub struct RhythmicPosition {
13031        fraction: ::std::result::Result<super::Fraction, ::std::string::String>,
13032        grace_index: ::std::result::Result<
13033            ::std::option::Option<super::IntegerUnsigned>,
13034            ::std::string::String,
13035        >,
13036    }
13037    impl ::std::default::Default for RhythmicPosition {
13038        fn default() -> Self {
13039            Self {
13040                fraction: Err("no value supplied for fraction".to_string()),
13041                grace_index: Ok(Default::default()),
13042            }
13043        }
13044    }
13045    impl RhythmicPosition {
13046        pub fn fraction<T>(mut self, value: T) -> Self
13047        where
13048            T: ::std::convert::TryInto<super::Fraction>,
13049            T::Error: ::std::fmt::Display,
13050        {
13051            self.fraction = value
13052                .try_into()
13053                .map_err(|e| {
13054                    format!("error converting supplied value for fraction: {}", e)
13055                });
13056            self
13057        }
13058        pub fn grace_index<T>(mut self, value: T) -> Self
13059        where
13060            T: ::std::convert::TryInto<::std::option::Option<super::IntegerUnsigned>>,
13061            T::Error: ::std::fmt::Display,
13062        {
13063            self.grace_index = value
13064                .try_into()
13065                .map_err(|e| {
13066                    format!("error converting supplied value for grace_index: {}", e)
13067                });
13068            self
13069        }
13070    }
13071    impl ::std::convert::TryFrom<RhythmicPosition> for super::RhythmicPosition {
13072        type Error = super::error::ConversionError;
13073        fn try_from(
13074            value: RhythmicPosition,
13075        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13076            Ok(Self {
13077                fraction: value.fraction?,
13078                grace_index: value.grace_index?,
13079            })
13080        }
13081    }
13082    impl ::std::convert::From<super::RhythmicPosition> for RhythmicPosition {
13083        fn from(value: super::RhythmicPosition) -> Self {
13084            Self {
13085                fraction: Ok(value.fraction),
13086                grace_index: Ok(value.grace_index),
13087            }
13088        }
13089    }
13090    #[derive(Clone, Debug)]
13091    pub struct SequenceContentItem {
13092        subtype_0: ::std::result::Result<
13093            ::std::option::Option<super::Event>,
13094            ::std::string::String,
13095        >,
13096        subtype_1: ::std::result::Result<
13097            ::std::option::Option<super::SequenceContentItemSubtype1>,
13098            ::std::string::String,
13099        >,
13100        subtype_2: ::std::result::Result<
13101            ::std::option::Option<super::SequenceContentItemSubtype2>,
13102            ::std::string::String,
13103        >,
13104        subtype_3: ::std::result::Result<
13105            ::std::option::Option<super::SequenceContentItemSubtype3>,
13106            ::std::string::String,
13107        >,
13108    }
13109    impl ::std::default::Default for SequenceContentItem {
13110        fn default() -> Self {
13111            Self {
13112                subtype_0: Ok(Default::default()),
13113                subtype_1: Ok(Default::default()),
13114                subtype_2: Ok(Default::default()),
13115                subtype_3: Ok(Default::default()),
13116            }
13117        }
13118    }
13119    impl SequenceContentItem {
13120        pub fn subtype_0<T>(mut self, value: T) -> Self
13121        where
13122            T: ::std::convert::TryInto<::std::option::Option<super::Event>>,
13123            T::Error: ::std::fmt::Display,
13124        {
13125            self.subtype_0 = value
13126                .try_into()
13127                .map_err(|e| {
13128                    format!("error converting supplied value for subtype_0: {}", e)
13129                });
13130            self
13131        }
13132        pub fn subtype_1<T>(mut self, value: T) -> Self
13133        where
13134            T: ::std::convert::TryInto<
13135                ::std::option::Option<super::SequenceContentItemSubtype1>,
13136            >,
13137            T::Error: ::std::fmt::Display,
13138        {
13139            self.subtype_1 = value
13140                .try_into()
13141                .map_err(|e| {
13142                    format!("error converting supplied value for subtype_1: {}", e)
13143                });
13144            self
13145        }
13146        pub fn subtype_2<T>(mut self, value: T) -> Self
13147        where
13148            T: ::std::convert::TryInto<
13149                ::std::option::Option<super::SequenceContentItemSubtype2>,
13150            >,
13151            T::Error: ::std::fmt::Display,
13152        {
13153            self.subtype_2 = value
13154                .try_into()
13155                .map_err(|e| {
13156                    format!("error converting supplied value for subtype_2: {}", e)
13157                });
13158            self
13159        }
13160        pub fn subtype_3<T>(mut self, value: T) -> Self
13161        where
13162            T: ::std::convert::TryInto<
13163                ::std::option::Option<super::SequenceContentItemSubtype3>,
13164            >,
13165            T::Error: ::std::fmt::Display,
13166        {
13167            self.subtype_3 = value
13168                .try_into()
13169                .map_err(|e| {
13170                    format!("error converting supplied value for subtype_3: {}", e)
13171                });
13172            self
13173        }
13174    }
13175    impl ::std::convert::TryFrom<SequenceContentItem> for super::SequenceContentItem {
13176        type Error = super::error::ConversionError;
13177        fn try_from(
13178            value: SequenceContentItem,
13179        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13180            Ok(Self {
13181                subtype_0: value.subtype_0?,
13182                subtype_1: value.subtype_1?,
13183                subtype_2: value.subtype_2?,
13184                subtype_3: value.subtype_3?,
13185            })
13186        }
13187    }
13188    impl ::std::convert::From<super::SequenceContentItem> for SequenceContentItem {
13189        fn from(value: super::SequenceContentItem) -> Self {
13190            Self {
13191                subtype_0: Ok(value.subtype_0),
13192                subtype_1: Ok(value.subtype_1),
13193                subtype_2: Ok(value.subtype_2),
13194                subtype_3: Ok(value.subtype_3),
13195            }
13196        }
13197    }
13198    #[derive(Clone, Debug)]
13199    pub struct SequenceContentItemSubtype1 {
13200        class: ::std::result::Result<
13201            ::std::option::Option<super::StyleClass>,
13202            ::std::string::String,
13203        >,
13204        color: ::std::result::Result<
13205            ::std::option::Option<super::Color>,
13206            ::std::string::String,
13207        >,
13208        content: ::std::result::Result<
13209            ::std::vec::Vec<super::Event>,
13210            ::std::string::String,
13211        >,
13212        grace_type: ::std::result::Result<
13213            ::std::option::Option<super::SequenceContentItemSubtype1GraceType>,
13214            ::std::string::String,
13215        >,
13216        slash: ::std::result::Result<::std::option::Option<bool>, ::std::string::String>,
13217        type_: ::std::result::Result<::std::string::String, ::std::string::String>,
13218    }
13219    impl ::std::default::Default for SequenceContentItemSubtype1 {
13220        fn default() -> Self {
13221            Self {
13222                class: Ok(Default::default()),
13223                color: Ok(Default::default()),
13224                content: Err("no value supplied for content".to_string()),
13225                grace_type: Ok(Default::default()),
13226                slash: Ok(Default::default()),
13227                type_: Err("no value supplied for type_".to_string()),
13228            }
13229        }
13230    }
13231    impl SequenceContentItemSubtype1 {
13232        pub fn class<T>(mut self, value: T) -> Self
13233        where
13234            T: ::std::convert::TryInto<::std::option::Option<super::StyleClass>>,
13235            T::Error: ::std::fmt::Display,
13236        {
13237            self.class = value
13238                .try_into()
13239                .map_err(|e| {
13240                    format!("error converting supplied value for class: {}", e)
13241                });
13242            self
13243        }
13244        pub fn color<T>(mut self, value: T) -> Self
13245        where
13246            T: ::std::convert::TryInto<::std::option::Option<super::Color>>,
13247            T::Error: ::std::fmt::Display,
13248        {
13249            self.color = value
13250                .try_into()
13251                .map_err(|e| {
13252                    format!("error converting supplied value for color: {}", e)
13253                });
13254            self
13255        }
13256        pub fn content<T>(mut self, value: T) -> Self
13257        where
13258            T: ::std::convert::TryInto<::std::vec::Vec<super::Event>>,
13259            T::Error: ::std::fmt::Display,
13260        {
13261            self.content = value
13262                .try_into()
13263                .map_err(|e| {
13264                    format!("error converting supplied value for content: {}", e)
13265                });
13266            self
13267        }
13268        pub fn grace_type<T>(mut self, value: T) -> Self
13269        where
13270            T: ::std::convert::TryInto<
13271                ::std::option::Option<super::SequenceContentItemSubtype1GraceType>,
13272            >,
13273            T::Error: ::std::fmt::Display,
13274        {
13275            self.grace_type = value
13276                .try_into()
13277                .map_err(|e| {
13278                    format!("error converting supplied value for grace_type: {}", e)
13279                });
13280            self
13281        }
13282        pub fn slash<T>(mut self, value: T) -> Self
13283        where
13284            T: ::std::convert::TryInto<::std::option::Option<bool>>,
13285            T::Error: ::std::fmt::Display,
13286        {
13287            self.slash = value
13288                .try_into()
13289                .map_err(|e| {
13290                    format!("error converting supplied value for slash: {}", e)
13291                });
13292            self
13293        }
13294        pub fn type_<T>(mut self, value: T) -> Self
13295        where
13296            T: ::std::convert::TryInto<::std::string::String>,
13297            T::Error: ::std::fmt::Display,
13298        {
13299            self.type_ = value
13300                .try_into()
13301                .map_err(|e| {
13302                    format!("error converting supplied value for type_: {}", e)
13303                });
13304            self
13305        }
13306    }
13307    impl ::std::convert::TryFrom<SequenceContentItemSubtype1>
13308    for super::SequenceContentItemSubtype1 {
13309        type Error = super::error::ConversionError;
13310        fn try_from(
13311            value: SequenceContentItemSubtype1,
13312        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13313            Ok(Self {
13314                class: value.class?,
13315                color: value.color?,
13316                content: value.content?,
13317                grace_type: value.grace_type?,
13318                slash: value.slash?,
13319                type_: value.type_?,
13320            })
13321        }
13322    }
13323    impl ::std::convert::From<super::SequenceContentItemSubtype1>
13324    for SequenceContentItemSubtype1 {
13325        fn from(value: super::SequenceContentItemSubtype1) -> Self {
13326            Self {
13327                class: Ok(value.class),
13328                color: Ok(value.color),
13329                content: Ok(value.content),
13330                grace_type: Ok(value.grace_type),
13331                slash: Ok(value.slash),
13332                type_: Ok(value.type_),
13333            }
13334        }
13335    }
13336    #[derive(Clone, Debug)]
13337    pub struct SequenceContentItemSubtype2 {
13338        bracket: ::std::result::Result<
13339            ::std::option::Option<super::SequenceContentItemSubtype2Bracket>,
13340            ::std::string::String,
13341        >,
13342        content: ::std::result::Result<super::SequenceContent, ::std::string::String>,
13343        inner: ::std::result::Result<super::NoteValueQuantity, ::std::string::String>,
13344        orient: ::std::result::Result<
13345            ::std::option::Option<super::Orientation>,
13346            ::std::string::String,
13347        >,
13348        outer: ::std::result::Result<super::NoteValueQuantity, ::std::string::String>,
13349        show_number: ::std::result::Result<
13350            ::std::option::Option<super::TupletDisplaySetting>,
13351            ::std::string::String,
13352        >,
13353        show_value: ::std::result::Result<
13354            ::std::option::Option<super::TupletDisplaySetting>,
13355            ::std::string::String,
13356        >,
13357        staff: ::std::result::Result<
13358            ::std::option::Option<super::StaffNumber>,
13359            ::std::string::String,
13360        >,
13361        type_: ::std::result::Result<::std::string::String, ::std::string::String>,
13362    }
13363    impl ::std::default::Default for SequenceContentItemSubtype2 {
13364        fn default() -> Self {
13365            Self {
13366                bracket: Ok(Default::default()),
13367                content: Err("no value supplied for content".to_string()),
13368                inner: Err("no value supplied for inner".to_string()),
13369                orient: Ok(Default::default()),
13370                outer: Err("no value supplied for outer".to_string()),
13371                show_number: Ok(Default::default()),
13372                show_value: Ok(Default::default()),
13373                staff: Ok(Default::default()),
13374                type_: Err("no value supplied for type_".to_string()),
13375            }
13376        }
13377    }
13378    impl SequenceContentItemSubtype2 {
13379        pub fn bracket<T>(mut self, value: T) -> Self
13380        where
13381            T: ::std::convert::TryInto<
13382                ::std::option::Option<super::SequenceContentItemSubtype2Bracket>,
13383            >,
13384            T::Error: ::std::fmt::Display,
13385        {
13386            self.bracket = value
13387                .try_into()
13388                .map_err(|e| {
13389                    format!("error converting supplied value for bracket: {}", e)
13390                });
13391            self
13392        }
13393        pub fn content<T>(mut self, value: T) -> Self
13394        where
13395            T: ::std::convert::TryInto<super::SequenceContent>,
13396            T::Error: ::std::fmt::Display,
13397        {
13398            self.content = value
13399                .try_into()
13400                .map_err(|e| {
13401                    format!("error converting supplied value for content: {}", e)
13402                });
13403            self
13404        }
13405        pub fn inner<T>(mut self, value: T) -> Self
13406        where
13407            T: ::std::convert::TryInto<super::NoteValueQuantity>,
13408            T::Error: ::std::fmt::Display,
13409        {
13410            self.inner = value
13411                .try_into()
13412                .map_err(|e| {
13413                    format!("error converting supplied value for inner: {}", e)
13414                });
13415            self
13416        }
13417        pub fn orient<T>(mut self, value: T) -> Self
13418        where
13419            T: ::std::convert::TryInto<::std::option::Option<super::Orientation>>,
13420            T::Error: ::std::fmt::Display,
13421        {
13422            self.orient = value
13423                .try_into()
13424                .map_err(|e| {
13425                    format!("error converting supplied value for orient: {}", e)
13426                });
13427            self
13428        }
13429        pub fn outer<T>(mut self, value: T) -> Self
13430        where
13431            T: ::std::convert::TryInto<super::NoteValueQuantity>,
13432            T::Error: ::std::fmt::Display,
13433        {
13434            self.outer = value
13435                .try_into()
13436                .map_err(|e| {
13437                    format!("error converting supplied value for outer: {}", e)
13438                });
13439            self
13440        }
13441        pub fn show_number<T>(mut self, value: T) -> Self
13442        where
13443            T: ::std::convert::TryInto<
13444                ::std::option::Option<super::TupletDisplaySetting>,
13445            >,
13446            T::Error: ::std::fmt::Display,
13447        {
13448            self.show_number = value
13449                .try_into()
13450                .map_err(|e| {
13451                    format!("error converting supplied value for show_number: {}", e)
13452                });
13453            self
13454        }
13455        pub fn show_value<T>(mut self, value: T) -> Self
13456        where
13457            T: ::std::convert::TryInto<
13458                ::std::option::Option<super::TupletDisplaySetting>,
13459            >,
13460            T::Error: ::std::fmt::Display,
13461        {
13462            self.show_value = value
13463                .try_into()
13464                .map_err(|e| {
13465                    format!("error converting supplied value for show_value: {}", e)
13466                });
13467            self
13468        }
13469        pub fn staff<T>(mut self, value: T) -> Self
13470        where
13471            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
13472            T::Error: ::std::fmt::Display,
13473        {
13474            self.staff = value
13475                .try_into()
13476                .map_err(|e| {
13477                    format!("error converting supplied value for staff: {}", e)
13478                });
13479            self
13480        }
13481        pub fn type_<T>(mut self, value: T) -> Self
13482        where
13483            T: ::std::convert::TryInto<::std::string::String>,
13484            T::Error: ::std::fmt::Display,
13485        {
13486            self.type_ = value
13487                .try_into()
13488                .map_err(|e| {
13489                    format!("error converting supplied value for type_: {}", e)
13490                });
13491            self
13492        }
13493    }
13494    impl ::std::convert::TryFrom<SequenceContentItemSubtype2>
13495    for super::SequenceContentItemSubtype2 {
13496        type Error = super::error::ConversionError;
13497        fn try_from(
13498            value: SequenceContentItemSubtype2,
13499        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13500            Ok(Self {
13501                bracket: value.bracket?,
13502                content: value.content?,
13503                inner: value.inner?,
13504                orient: value.orient?,
13505                outer: value.outer?,
13506                show_number: value.show_number?,
13507                show_value: value.show_value?,
13508                staff: value.staff?,
13509                type_: value.type_?,
13510            })
13511        }
13512    }
13513    impl ::std::convert::From<super::SequenceContentItemSubtype2>
13514    for SequenceContentItemSubtype2 {
13515        fn from(value: super::SequenceContentItemSubtype2) -> Self {
13516            Self {
13517                bracket: Ok(value.bracket),
13518                content: Ok(value.content),
13519                inner: Ok(value.inner),
13520                orient: Ok(value.orient),
13521                outer: Ok(value.outer),
13522                show_number: Ok(value.show_number),
13523                show_value: Ok(value.show_value),
13524                staff: Ok(value.staff),
13525                type_: Ok(value.type_),
13526            }
13527        }
13528    }
13529    #[derive(Clone, Debug)]
13530    pub struct SequenceContentItemSubtype3 {
13531        duration: ::std::result::Result<super::Fraction, ::std::string::String>,
13532        type_: ::std::result::Result<::std::string::String, ::std::string::String>,
13533    }
13534    impl ::std::default::Default for SequenceContentItemSubtype3 {
13535        fn default() -> Self {
13536            Self {
13537                duration: Err("no value supplied for duration".to_string()),
13538                type_: Err("no value supplied for type_".to_string()),
13539            }
13540        }
13541    }
13542    impl SequenceContentItemSubtype3 {
13543        pub fn duration<T>(mut self, value: T) -> Self
13544        where
13545            T: ::std::convert::TryInto<super::Fraction>,
13546            T::Error: ::std::fmt::Display,
13547        {
13548            self.duration = value
13549                .try_into()
13550                .map_err(|e| {
13551                    format!("error converting supplied value for duration: {}", e)
13552                });
13553            self
13554        }
13555        pub fn type_<T>(mut self, value: T) -> Self
13556        where
13557            T: ::std::convert::TryInto<::std::string::String>,
13558            T::Error: ::std::fmt::Display,
13559        {
13560            self.type_ = value
13561                .try_into()
13562                .map_err(|e| {
13563                    format!("error converting supplied value for type_: {}", e)
13564                });
13565            self
13566        }
13567    }
13568    impl ::std::convert::TryFrom<SequenceContentItemSubtype3>
13569    for super::SequenceContentItemSubtype3 {
13570        type Error = super::error::ConversionError;
13571        fn try_from(
13572            value: SequenceContentItemSubtype3,
13573        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13574            Ok(Self {
13575                duration: value.duration?,
13576                type_: value.type_?,
13577            })
13578        }
13579    }
13580    impl ::std::convert::From<super::SequenceContentItemSubtype3>
13581    for SequenceContentItemSubtype3 {
13582        fn from(value: super::SequenceContentItemSubtype3) -> Self {
13583            Self {
13584                duration: Ok(value.duration),
13585                type_: Ok(value.type_),
13586            }
13587        }
13588    }
13589    #[derive(Clone, Debug)]
13590    pub struct SystemLayoutContentItemSourcesItem {
13591        label: ::std::result::Result<
13592            ::std::option::Option<super::StaffLabel>,
13593            ::std::string::String,
13594        >,
13595        labelref: ::std::result::Result<
13596            ::std::option::Option<super::StaffLabelref>,
13597            ::std::string::String,
13598        >,
13599        part: ::std::result::Result<super::Id, ::std::string::String>,
13600        staff: ::std::result::Result<
13601            ::std::option::Option<super::StaffNumber>,
13602            ::std::string::String,
13603        >,
13604        stem: ::std::result::Result<
13605            ::std::option::Option<super::StemDirection>,
13606            ::std::string::String,
13607        >,
13608        voice: ::std::result::Result<
13609            ::std::option::Option<super::VoiceName>,
13610            ::std::string::String,
13611        >,
13612    }
13613    impl ::std::default::Default for SystemLayoutContentItemSourcesItem {
13614        fn default() -> Self {
13615            Self {
13616                label: Ok(Default::default()),
13617                labelref: Ok(Default::default()),
13618                part: Err("no value supplied for part".to_string()),
13619                staff: Ok(Default::default()),
13620                stem: Ok(Default::default()),
13621                voice: Ok(Default::default()),
13622            }
13623        }
13624    }
13625    impl SystemLayoutContentItemSourcesItem {
13626        pub fn label<T>(mut self, value: T) -> Self
13627        where
13628            T: ::std::convert::TryInto<::std::option::Option<super::StaffLabel>>,
13629            T::Error: ::std::fmt::Display,
13630        {
13631            self.label = value
13632                .try_into()
13633                .map_err(|e| {
13634                    format!("error converting supplied value for label: {}", e)
13635                });
13636            self
13637        }
13638        pub fn labelref<T>(mut self, value: T) -> Self
13639        where
13640            T: ::std::convert::TryInto<::std::option::Option<super::StaffLabelref>>,
13641            T::Error: ::std::fmt::Display,
13642        {
13643            self.labelref = value
13644                .try_into()
13645                .map_err(|e| {
13646                    format!("error converting supplied value for labelref: {}", e)
13647                });
13648            self
13649        }
13650        pub fn part<T>(mut self, value: T) -> Self
13651        where
13652            T: ::std::convert::TryInto<super::Id>,
13653            T::Error: ::std::fmt::Display,
13654        {
13655            self.part = value
13656                .try_into()
13657                .map_err(|e| format!("error converting supplied value for part: {}", e));
13658            self
13659        }
13660        pub fn staff<T>(mut self, value: T) -> Self
13661        where
13662            T: ::std::convert::TryInto<::std::option::Option<super::StaffNumber>>,
13663            T::Error: ::std::fmt::Display,
13664        {
13665            self.staff = value
13666                .try_into()
13667                .map_err(|e| {
13668                    format!("error converting supplied value for staff: {}", e)
13669                });
13670            self
13671        }
13672        pub fn stem<T>(mut self, value: T) -> Self
13673        where
13674            T: ::std::convert::TryInto<::std::option::Option<super::StemDirection>>,
13675            T::Error: ::std::fmt::Display,
13676        {
13677            self.stem = value
13678                .try_into()
13679                .map_err(|e| format!("error converting supplied value for stem: {}", e));
13680            self
13681        }
13682        pub fn voice<T>(mut self, value: T) -> Self
13683        where
13684            T: ::std::convert::TryInto<::std::option::Option<super::VoiceName>>,
13685            T::Error: ::std::fmt::Display,
13686        {
13687            self.voice = value
13688                .try_into()
13689                .map_err(|e| {
13690                    format!("error converting supplied value for voice: {}", e)
13691                });
13692            self
13693        }
13694    }
13695    impl ::std::convert::TryFrom<SystemLayoutContentItemSourcesItem>
13696    for super::SystemLayoutContentItemSourcesItem {
13697        type Error = super::error::ConversionError;
13698        fn try_from(
13699            value: SystemLayoutContentItemSourcesItem,
13700        ) -> ::std::result::Result<Self, super::error::ConversionError> {
13701            Ok(Self {
13702                label: value.label?,
13703                labelref: value.labelref?,
13704                part: value.part?,
13705                staff: value.staff?,
13706                stem: value.stem?,
13707                voice: value.voice?,
13708            })
13709        }
13710    }
13711    impl ::std::convert::From<super::SystemLayoutContentItemSourcesItem>
13712    for SystemLayoutContentItemSourcesItem {
13713        fn from(value: super::SystemLayoutContentItemSourcesItem) -> Self {
13714            Self {
13715                label: Ok(value.label),
13716                labelref: Ok(value.labelref),
13717                part: Ok(value.part),
13718                staff: Ok(value.staff),
13719                stem: Ok(value.stem),
13720                voice: Ok(value.voice),
13721            }
13722        }
13723    }
13724}