1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct ElementOrigin {
4 #[serde(rename = "type")]
5 pub r#type: ElementOriginType,
6 #[serde(rename = "element")]
7 pub element: crate::script::types::SharedReference,
8}
9#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
10pub enum ElementOriginType {
11 #[serde(rename = "element")]
12 Element,
13}
14impl ElementOrigin {
15 pub fn new(
16 r#type: impl Into<ElementOriginType>,
17 element: impl Into<crate::script::types::SharedReference>,
18 ) -> Self {
19 Self {
20 r#type: r#type.into(),
21 element: element.into(),
22 }
23 }
24}
25impl ElementOrigin {
26 pub const IDENTIFIER: &'static str = "input.ElementOrigin";
27 pub const DOMAIN_DIRECTION: &'static str = "remote";
28 pub fn identifier(&self) -> &'static str {
29 Self::IDENTIFIER
30 }
31}
32#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
33#[serde(untagged)]
34pub enum SourceActions {
35 NoneSourceActions(NoneSourceActions),
36 KeySourceActions(KeySourceActions),
37 PointerSourceActions(PointerSourceActions),
38 WheelSourceActions(WheelSourceActions),
39}
40impl From<NoneSourceActions> for SourceActions {
41 fn from(v: NoneSourceActions) -> Self {
42 SourceActions::NoneSourceActions(v)
43 }
44}
45impl TryFrom<SourceActions> for NoneSourceActions {
46 type Error = SourceActions;
47 fn try_from(e: SourceActions) -> Result<Self, Self::Error> {
48 match e {
49 SourceActions::NoneSourceActions(inner) => Ok(inner),
50 other => Err(other),
51 }
52 }
53}
54impl From<KeySourceActions> for SourceActions {
55 fn from(v: KeySourceActions) -> Self {
56 SourceActions::KeySourceActions(v)
57 }
58}
59impl TryFrom<SourceActions> for KeySourceActions {
60 type Error = SourceActions;
61 fn try_from(e: SourceActions) -> Result<Self, Self::Error> {
62 match e {
63 SourceActions::KeySourceActions(inner) => Ok(inner),
64 other => Err(other),
65 }
66 }
67}
68impl From<PointerSourceActions> for SourceActions {
69 fn from(v: PointerSourceActions) -> Self {
70 SourceActions::PointerSourceActions(v)
71 }
72}
73impl TryFrom<SourceActions> for PointerSourceActions {
74 type Error = SourceActions;
75 fn try_from(e: SourceActions) -> Result<Self, Self::Error> {
76 match e {
77 SourceActions::PointerSourceActions(inner) => Ok(inner),
78 other => Err(other),
79 }
80 }
81}
82impl From<WheelSourceActions> for SourceActions {
83 fn from(v: WheelSourceActions) -> Self {
84 SourceActions::WheelSourceActions(v)
85 }
86}
87impl TryFrom<SourceActions> for WheelSourceActions {
88 type Error = SourceActions;
89 fn try_from(e: SourceActions) -> Result<Self, Self::Error> {
90 match e {
91 SourceActions::WheelSourceActions(inner) => Ok(inner),
92 other => Err(other),
93 }
94 }
95}
96#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
97pub struct NoneSourceActions {
98 #[serde(rename = "type")]
99 pub r#type: NoneSourceActionsType,
100 #[serde(rename = "id")]
101 pub id: String,
102 #[serde(rename = "actions")]
103 #[serde(skip_serializing_if = "Vec::is_empty")]
104 pub actions: Vec<NoneSourceAction>,
105}
106#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
107pub enum NoneSourceActionsType {
108 #[serde(rename = "none")]
109 None,
110}
111impl NoneSourceActions {
112 pub fn new(
113 r#type: impl Into<NoneSourceActionsType>,
114 id: impl Into<String>,
115 actions: Vec<NoneSourceAction>,
116 ) -> Self {
117 Self {
118 r#type: r#type.into(),
119 id: id.into(),
120 actions,
121 }
122 }
123}
124impl NoneSourceActions {
125 pub const IDENTIFIER: &'static str = "input.NoneSourceActions";
126 pub const DOMAIN_DIRECTION: &'static str = "remote";
127 pub fn identifier(&self) -> &'static str {
128 Self::IDENTIFIER
129 }
130}
131#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
132pub struct NoneSourceAction(PauseAction);
133impl NoneSourceAction {
134 pub fn new(val: impl Into<PauseAction>) -> Self {
135 NoneSourceAction(val.into())
136 }
137 pub fn inner(&self) -> &PauseAction {
138 &self.0
139 }
140}
141impl NoneSourceAction {
142 pub const IDENTIFIER: &'static str = "input.NoneSourceAction";
143 pub const DOMAIN_DIRECTION: &'static str = "remote";
144 pub fn identifier(&self) -> &'static str {
145 Self::IDENTIFIER
146 }
147}
148#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
149pub struct KeySourceActions {
150 #[serde(rename = "type")]
151 pub r#type: KeySourceActionsType,
152 #[serde(rename = "id")]
153 pub id: String,
154 #[serde(rename = "actions")]
155 #[serde(skip_serializing_if = "Vec::is_empty")]
156 pub actions: Vec<KeySourceAction>,
157}
158#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
159pub enum KeySourceActionsType {
160 #[serde(rename = "key")]
161 Key,
162}
163impl KeySourceActions {
164 pub fn new(
165 r#type: impl Into<KeySourceActionsType>,
166 id: impl Into<String>,
167 actions: Vec<KeySourceAction>,
168 ) -> Self {
169 Self {
170 r#type: r#type.into(),
171 id: id.into(),
172 actions,
173 }
174 }
175}
176impl KeySourceActions {
177 pub const IDENTIFIER: &'static str = "input.KeySourceActions";
178 pub const DOMAIN_DIRECTION: &'static str = "remote";
179 pub fn identifier(&self) -> &'static str {
180 Self::IDENTIFIER
181 }
182}
183#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
184#[serde(untagged)]
185pub enum KeySourceAction {
186 PauseAction(PauseAction),
187 KeyDownAction(KeyDownAction),
188 KeyUpAction(KeyUpAction),
189}
190impl From<PauseAction> for KeySourceAction {
191 fn from(v: PauseAction) -> Self {
192 KeySourceAction::PauseAction(v)
193 }
194}
195impl TryFrom<KeySourceAction> for PauseAction {
196 type Error = KeySourceAction;
197 fn try_from(e: KeySourceAction) -> Result<Self, Self::Error> {
198 match e {
199 KeySourceAction::PauseAction(inner) => Ok(inner),
200 other => Err(other),
201 }
202 }
203}
204impl From<KeyDownAction> for KeySourceAction {
205 fn from(v: KeyDownAction) -> Self {
206 KeySourceAction::KeyDownAction(v)
207 }
208}
209impl TryFrom<KeySourceAction> for KeyDownAction {
210 type Error = KeySourceAction;
211 fn try_from(e: KeySourceAction) -> Result<Self, Self::Error> {
212 match e {
213 KeySourceAction::KeyDownAction(inner) => Ok(inner),
214 other => Err(other),
215 }
216 }
217}
218impl From<KeyUpAction> for KeySourceAction {
219 fn from(v: KeyUpAction) -> Self {
220 KeySourceAction::KeyUpAction(v)
221 }
222}
223impl TryFrom<KeySourceAction> for KeyUpAction {
224 type Error = KeySourceAction;
225 fn try_from(e: KeySourceAction) -> Result<Self, Self::Error> {
226 match e {
227 KeySourceAction::KeyUpAction(inner) => Ok(inner),
228 other => Err(other),
229 }
230 }
231}
232#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
233pub struct PointerSourceActions {
234 #[serde(rename = "type")]
235 pub r#type: PointerSourceActionsType,
236 #[serde(rename = "id")]
237 pub id: String,
238 #[serde(rename = "parameters")]
239 #[serde(skip_serializing_if = "Option::is_none")]
240 #[serde(default)]
241 pub parameters: Option<PointerParameters>,
242 #[serde(rename = "actions")]
243 #[serde(skip_serializing_if = "Vec::is_empty")]
244 pub actions: Vec<PointerSourceAction>,
245}
246#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
247pub enum PointerSourceActionsType {
248 #[serde(rename = "pointer")]
249 Pointer,
250}
251impl PointerSourceActions {
252 pub fn new(
253 r#type: impl Into<PointerSourceActionsType>,
254 id: impl Into<String>,
255 actions: Vec<PointerSourceAction>,
256 ) -> Self {
257 Self {
258 r#type: r#type.into(),
259 id: id.into(),
260 actions,
261 parameters: None,
262 }
263 }
264}
265impl PointerSourceActions {
266 pub const IDENTIFIER: &'static str = "input.PointerSourceActions";
267 pub const DOMAIN_DIRECTION: &'static str = "remote";
268 pub fn identifier(&self) -> &'static str {
269 Self::IDENTIFIER
270 }
271}
272#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
273pub enum PointerType {
274 #[serde(rename = "mouse")]
275 Mouse,
276 #[serde(rename = "pen")]
277 Pen,
278 #[serde(rename = "touch")]
279 Touch,
280}
281#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
282pub struct PointerParameters {
283 #[serde(rename = "pointerType")]
284 #[serde(skip_serializing_if = "Option::is_none")]
285 #[serde(default)]
286 pub pointer_type: Option<PointerType>,
287}
288impl PointerParameters {
289 pub const IDENTIFIER: &'static str = "input.PointerParameters";
290 pub const DOMAIN_DIRECTION: &'static str = "remote";
291 pub fn identifier(&self) -> &'static str {
292 Self::IDENTIFIER
293 }
294}
295#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
296#[serde(untagged)]
297pub enum PointerSourceAction {
298 PauseAction(PauseAction),
299 PointerDownAction(PointerDownAction),
300 PointerUpAction(PointerUpAction),
301 PointerMoveAction(PointerMoveAction),
302}
303impl From<PauseAction> for PointerSourceAction {
304 fn from(v: PauseAction) -> Self {
305 PointerSourceAction::PauseAction(v)
306 }
307}
308impl TryFrom<PointerSourceAction> for PauseAction {
309 type Error = PointerSourceAction;
310 fn try_from(e: PointerSourceAction) -> Result<Self, Self::Error> {
311 match e {
312 PointerSourceAction::PauseAction(inner) => Ok(inner),
313 other => Err(other),
314 }
315 }
316}
317impl From<PointerDownAction> for PointerSourceAction {
318 fn from(v: PointerDownAction) -> Self {
319 PointerSourceAction::PointerDownAction(v)
320 }
321}
322impl TryFrom<PointerSourceAction> for PointerDownAction {
323 type Error = PointerSourceAction;
324 fn try_from(e: PointerSourceAction) -> Result<Self, Self::Error> {
325 match e {
326 PointerSourceAction::PointerDownAction(inner) => Ok(inner),
327 other => Err(other),
328 }
329 }
330}
331impl From<PointerUpAction> for PointerSourceAction {
332 fn from(v: PointerUpAction) -> Self {
333 PointerSourceAction::PointerUpAction(v)
334 }
335}
336impl TryFrom<PointerSourceAction> for PointerUpAction {
337 type Error = PointerSourceAction;
338 fn try_from(e: PointerSourceAction) -> Result<Self, Self::Error> {
339 match e {
340 PointerSourceAction::PointerUpAction(inner) => Ok(inner),
341 other => Err(other),
342 }
343 }
344}
345impl From<PointerMoveAction> for PointerSourceAction {
346 fn from(v: PointerMoveAction) -> Self {
347 PointerSourceAction::PointerMoveAction(v)
348 }
349}
350impl TryFrom<PointerSourceAction> for PointerMoveAction {
351 type Error = PointerSourceAction;
352 fn try_from(e: PointerSourceAction) -> Result<Self, Self::Error> {
353 match e {
354 PointerSourceAction::PointerMoveAction(inner) => Ok(inner),
355 other => Err(other),
356 }
357 }
358}
359#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
360pub struct WheelSourceActions {
361 #[serde(rename = "type")]
362 pub r#type: WheelSourceActionsType,
363 #[serde(rename = "id")]
364 pub id: String,
365 #[serde(rename = "actions")]
366 #[serde(skip_serializing_if = "Vec::is_empty")]
367 pub actions: Vec<WheelSourceAction>,
368}
369#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
370pub enum WheelSourceActionsType {
371 #[serde(rename = "wheel")]
372 Wheel,
373}
374impl WheelSourceActions {
375 pub fn new(
376 r#type: impl Into<WheelSourceActionsType>,
377 id: impl Into<String>,
378 actions: Vec<WheelSourceAction>,
379 ) -> Self {
380 Self {
381 r#type: r#type.into(),
382 id: id.into(),
383 actions,
384 }
385 }
386}
387impl WheelSourceActions {
388 pub const IDENTIFIER: &'static str = "input.WheelSourceActions";
389 pub const DOMAIN_DIRECTION: &'static str = "remote";
390 pub fn identifier(&self) -> &'static str {
391 Self::IDENTIFIER
392 }
393}
394#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
395#[serde(untagged)]
396pub enum WheelSourceAction {
397 PauseAction(PauseAction),
398 WheelScrollAction(WheelScrollAction),
399}
400impl From<PauseAction> for WheelSourceAction {
401 fn from(v: PauseAction) -> Self {
402 WheelSourceAction::PauseAction(v)
403 }
404}
405impl TryFrom<WheelSourceAction> for PauseAction {
406 type Error = WheelSourceAction;
407 fn try_from(e: WheelSourceAction) -> Result<Self, Self::Error> {
408 match e {
409 WheelSourceAction::PauseAction(inner) => Ok(inner),
410 other => Err(other),
411 }
412 }
413}
414impl From<WheelScrollAction> for WheelSourceAction {
415 fn from(v: WheelScrollAction) -> Self {
416 WheelSourceAction::WheelScrollAction(v)
417 }
418}
419impl TryFrom<WheelSourceAction> for WheelScrollAction {
420 type Error = WheelSourceAction;
421 fn try_from(e: WheelSourceAction) -> Result<Self, Self::Error> {
422 match e {
423 WheelSourceAction::WheelScrollAction(inner) => Ok(inner),
424 other => Err(other),
425 }
426 }
427}
428#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
429pub struct PauseAction {
430 #[serde(rename = "type")]
431 pub r#type: PauseActionType,
432 #[serde(rename = "duration")]
433 #[serde(skip_serializing_if = "Option::is_none")]
434 #[serde(default)]
435 pub duration: Option<u64>,
436}
437#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
438pub enum PauseActionType {
439 #[serde(rename = "pause")]
440 Pause,
441}
442impl PauseAction {
443 pub fn new(r#type: impl Into<PauseActionType>) -> Self {
444 Self {
445 r#type: r#type.into(),
446 duration: None,
447 }
448 }
449}
450impl PauseAction {
451 pub const IDENTIFIER: &'static str = "input.PauseAction";
452 pub const DOMAIN_DIRECTION: &'static str = "remote";
453 pub fn identifier(&self) -> &'static str {
454 Self::IDENTIFIER
455 }
456}
457#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
458pub struct KeyDownAction {
459 #[serde(rename = "type")]
460 pub r#type: KeyDownActionType,
461 #[serde(rename = "value")]
462 pub value: String,
463}
464#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
465pub enum KeyDownActionType {
466 #[serde(rename = "keyDown")]
467 KeyDown,
468}
469impl KeyDownAction {
470 pub fn new(r#type: impl Into<KeyDownActionType>, value: impl Into<String>) -> Self {
471 Self {
472 r#type: r#type.into(),
473 value: value.into(),
474 }
475 }
476}
477impl KeyDownAction {
478 pub const IDENTIFIER: &'static str = "input.KeyDownAction";
479 pub const DOMAIN_DIRECTION: &'static str = "remote";
480 pub fn identifier(&self) -> &'static str {
481 Self::IDENTIFIER
482 }
483}
484#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
485pub struct KeyUpAction {
486 #[serde(rename = "type")]
487 pub r#type: KeyUpActionType,
488 #[serde(rename = "value")]
489 pub value: String,
490}
491#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
492pub enum KeyUpActionType {
493 #[serde(rename = "keyUp")]
494 KeyUp,
495}
496impl KeyUpAction {
497 pub fn new(r#type: impl Into<KeyUpActionType>, value: impl Into<String>) -> Self {
498 Self {
499 r#type: r#type.into(),
500 value: value.into(),
501 }
502 }
503}
504impl KeyUpAction {
505 pub const IDENTIFIER: &'static str = "input.KeyUpAction";
506 pub const DOMAIN_DIRECTION: &'static str = "remote";
507 pub fn identifier(&self) -> &'static str {
508 Self::IDENTIFIER
509 }
510}
511#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
512pub struct PointerUpAction {
513 #[serde(rename = "type")]
514 pub r#type: PointerUpActionType,
515 #[serde(rename = "button")]
516 pub button: u64,
517}
518#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
519pub enum PointerUpActionType {
520 #[serde(rename = "pointerUp")]
521 PointerUp,
522}
523impl PointerUpAction {
524 pub fn new(r#type: impl Into<PointerUpActionType>, button: impl Into<u64>) -> Self {
525 Self {
526 r#type: r#type.into(),
527 button: button.into(),
528 }
529 }
530}
531impl PointerUpAction {
532 pub const IDENTIFIER: &'static str = "input.PointerUpAction";
533 pub const DOMAIN_DIRECTION: &'static str = "remote";
534 pub fn identifier(&self) -> &'static str {
535 Self::IDENTIFIER
536 }
537}
538#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
539pub struct PointerDownAction {
540 #[serde(rename = "type")]
541 pub r#type: PointerDownActionType,
542 #[serde(rename = "button")]
543 pub button: u64,
544 #[serde(flatten)]
545 #[serde(default)]
546 pub pointer_common_properties: PointerCommonProperties,
547}
548#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
549pub enum PointerDownActionType {
550 #[serde(rename = "pointerDown")]
551 PointerDown,
552}
553impl PointerDownAction {
554 pub fn new(
555 r#type: impl Into<PointerDownActionType>,
556 button: impl Into<u64>,
557 pointer_common_properties: impl Into<PointerCommonProperties>,
558 ) -> Self {
559 Self {
560 r#type: r#type.into(),
561 button: button.into(),
562 pointer_common_properties: pointer_common_properties.into(),
563 }
564 }
565}
566impl PointerDownAction {
567 pub const IDENTIFIER: &'static str = "input.PointerDownAction";
568 pub const DOMAIN_DIRECTION: &'static str = "remote";
569 pub fn identifier(&self) -> &'static str {
570 Self::IDENTIFIER
571 }
572}
573#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
574pub struct PointerMoveAction {
575 #[serde(rename = "type")]
576 pub r#type: PointerMoveActionType,
577 #[serde(rename = "x")]
578 pub x: f64,
579 #[serde(rename = "y")]
580 pub y: f64,
581 #[serde(rename = "duration")]
582 #[serde(skip_serializing_if = "Option::is_none")]
583 #[serde(default)]
584 pub duration: Option<u64>,
585 #[serde(rename = "origin")]
586 #[serde(skip_serializing_if = "Option::is_none")]
587 #[serde(default)]
588 pub origin: Option<Origin>,
589 #[serde(flatten)]
590 #[serde(default)]
591 pub pointer_common_properties: PointerCommonProperties,
592}
593#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
594pub enum PointerMoveActionType {
595 #[serde(rename = "pointerMove")]
596 PointerMove,
597}
598impl PointerMoveAction {
599 pub fn new(
600 r#type: impl Into<PointerMoveActionType>,
601 x: impl Into<f64>,
602 y: impl Into<f64>,
603 pointer_common_properties: impl Into<PointerCommonProperties>,
604 ) -> Self {
605 Self {
606 r#type: r#type.into(),
607 x: x.into(),
608 y: y.into(),
609 pointer_common_properties: pointer_common_properties.into(),
610 duration: None,
611 origin: None,
612 }
613 }
614}
615impl PointerMoveAction {
616 pub const IDENTIFIER: &'static str = "input.PointerMoveAction";
617 pub const DOMAIN_DIRECTION: &'static str = "remote";
618 pub fn identifier(&self) -> &'static str {
619 Self::IDENTIFIER
620 }
621}
622#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
623pub struct WheelScrollAction {
624 #[serde(rename = "type")]
625 pub r#type: WheelScrollActionType,
626 #[serde(rename = "x")]
627 pub x: i64,
628 #[serde(rename = "y")]
629 pub y: i64,
630 #[serde(rename = "deltaX")]
631 pub delta_x: i64,
632 #[serde(rename = "deltaY")]
633 pub delta_y: i64,
634 #[serde(rename = "duration")]
635 #[serde(skip_serializing_if = "Option::is_none")]
636 #[serde(default)]
637 pub duration: Option<u64>,
638 #[serde(rename = "origin")]
639 #[serde(skip_serializing_if = "Option::is_none")]
640 #[serde(default)]
641 pub origin: Option<Origin>,
642}
643#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
644pub enum WheelScrollActionType {
645 #[serde(rename = "scroll")]
646 Scroll,
647}
648impl WheelScrollAction {
649 pub const IDENTIFIER: &'static str = "input.WheelScrollAction";
650 pub const DOMAIN_DIRECTION: &'static str = "remote";
651 pub fn identifier(&self) -> &'static str {
652 Self::IDENTIFIER
653 }
654}
655#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
656pub struct PointerCommonProperties {
657 #[serde(rename = "width")]
658 #[serde(skip_serializing_if = "Option::is_none")]
659 #[serde(default = "default_pointer_common_properties_width")]
660 pub width: Option<u64>,
661 #[serde(rename = "height")]
662 #[serde(skip_serializing_if = "Option::is_none")]
663 #[serde(default = "default_pointer_common_properties_height")]
664 pub height: Option<u64>,
665 #[serde(rename = "pressure")]
666 #[serde(skip_serializing_if = "Option::is_none")]
667 #[serde(default = "default_pointer_common_properties_pressure")]
668 pub pressure: Option<f64>,
669 #[serde(rename = "tangentialPressure")]
670 #[serde(skip_serializing_if = "Option::is_none")]
671 #[serde(default = "default_pointer_common_properties_tangential_pressure")]
672 pub tangential_pressure: Option<f64>,
673 #[serde(rename = "twist")]
674 #[serde(skip_serializing_if = "Option::is_none")]
675 #[serde(default = "default_pointer_common_properties_twist")]
676 pub twist: Option<u64>,
677 #[serde(rename = "altitudeAngle")]
678 #[serde(skip_serializing_if = "Option::is_none")]
679 #[serde(default = "default_pointer_common_properties_altitude_angle")]
680 pub altitude_angle: Option<f64>,
681 #[serde(rename = "azimuthAngle")]
682 #[serde(skip_serializing_if = "Option::is_none")]
683 #[serde(default = "default_pointer_common_properties_azimuth_angle")]
684 pub azimuth_angle: Option<f64>,
685}
686fn default_pointer_common_properties_width() -> Option<u64> {
687 Some(1u64)
688}
689fn default_pointer_common_properties_height() -> Option<u64> {
690 Some(1u64)
691}
692fn default_pointer_common_properties_pressure() -> Option<f64> {
693 Some(0f64)
694}
695fn default_pointer_common_properties_tangential_pressure() -> Option<f64> {
696 Some(0f64)
697}
698fn default_pointer_common_properties_twist() -> Option<u64> {
699 Some(0u64)
700}
701fn default_pointer_common_properties_altitude_angle() -> Option<f64> {
702 Some(0f64)
703}
704fn default_pointer_common_properties_azimuth_angle() -> Option<f64> {
705 Some(0f64)
706}
707impl PointerCommonProperties {
708 pub const IDENTIFIER: &'static str = "input.PointerCommonProperties";
709 pub const DOMAIN_DIRECTION: &'static str = "remote";
710 pub fn identifier(&self) -> &'static str {
711 Self::IDENTIFIER
712 }
713}
714#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
715pub enum Origin {
716 #[serde(rename = "viewport")]
717 Viewport,
718 #[serde(rename = "pointer")]
719 Pointer,
720}