-
Notifications
You must be signed in to change notification settings - Fork 16
/
weather_api_generated.rs
2143 lines (2082 loc) · 79.2 KB
/
weather_api_generated.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// automatically generated by the FlatBuffers compiler, do not modify
// @generated
use core::mem;
use core::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};
#[allow(unused_imports, dead_code)]
pub mod openmeteo_sdk {
use core::mem;
use core::cmp::Ordering;
extern crate flatbuffers;
use self::flatbuffers::{EndianScalar, Follow};
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_UNIT: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_UNIT: u8 = 40;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_UNIT: [Unit; 41] = [
Unit::undefined,
Unit::celsius,
Unit::centimetre,
Unit::cubic_metre_per_cubic_metre,
Unit::cubic_metre_per_second,
Unit::degree_direction,
Unit::dimensionless_integer,
Unit::dimensionless,
Unit::european_air_quality_index,
Unit::fahrenheit,
Unit::feet,
Unit::fraction,
Unit::gdd_celsius,
Unit::geopotential_metre,
Unit::grains_per_cubic_metre,
Unit::gram_per_kilogram,
Unit::hectopascal,
Unit::hours,
Unit::inch,
Unit::iso8601,
Unit::joule_per_kilogram,
Unit::kelvin,
Unit::kilopascal,
Unit::kilogram_per_square_metre,
Unit::kilometres_per_hour,
Unit::knots,
Unit::megajoule_per_square_metre,
Unit::metre_per_second_not_unit_converted,
Unit::metre_per_second,
Unit::metre,
Unit::micrograms_per_cubic_metre,
Unit::miles_per_hour,
Unit::millimetre,
Unit::pascal,
Unit::per_second,
Unit::percentage,
Unit::seconds,
Unit::unix_time,
Unit::us_air_quality_index,
Unit::watt_per_square_metre,
Unit::wmo_code,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct Unit(pub u8);
#[allow(non_upper_case_globals)]
impl Unit {
pub const undefined: Self = Self(0);
pub const celsius: Self = Self(1);
pub const centimetre: Self = Self(2);
pub const cubic_metre_per_cubic_metre: Self = Self(3);
pub const cubic_metre_per_second: Self = Self(4);
pub const degree_direction: Self = Self(5);
pub const dimensionless_integer: Self = Self(6);
pub const dimensionless: Self = Self(7);
pub const european_air_quality_index: Self = Self(8);
pub const fahrenheit: Self = Self(9);
pub const feet: Self = Self(10);
pub const fraction: Self = Self(11);
pub const gdd_celsius: Self = Self(12);
pub const geopotential_metre: Self = Self(13);
pub const grains_per_cubic_metre: Self = Self(14);
pub const gram_per_kilogram: Self = Self(15);
pub const hectopascal: Self = Self(16);
pub const hours: Self = Self(17);
pub const inch: Self = Self(18);
pub const iso8601: Self = Self(19);
pub const joule_per_kilogram: Self = Self(20);
pub const kelvin: Self = Self(21);
pub const kilopascal: Self = Self(22);
pub const kilogram_per_square_metre: Self = Self(23);
pub const kilometres_per_hour: Self = Self(24);
pub const knots: Self = Self(25);
pub const megajoule_per_square_metre: Self = Self(26);
pub const metre_per_second_not_unit_converted: Self = Self(27);
pub const metre_per_second: Self = Self(28);
pub const metre: Self = Self(29);
pub const micrograms_per_cubic_metre: Self = Self(30);
pub const miles_per_hour: Self = Self(31);
pub const millimetre: Self = Self(32);
pub const pascal: Self = Self(33);
pub const per_second: Self = Self(34);
pub const percentage: Self = Self(35);
pub const seconds: Self = Self(36);
pub const unix_time: Self = Self(37);
pub const us_air_quality_index: Self = Self(38);
pub const watt_per_square_metre: Self = Self(39);
pub const wmo_code: Self = Self(40);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 40;
pub const ENUM_VALUES: &'static [Self] = &[
Self::undefined,
Self::celsius,
Self::centimetre,
Self::cubic_metre_per_cubic_metre,
Self::cubic_metre_per_second,
Self::degree_direction,
Self::dimensionless_integer,
Self::dimensionless,
Self::european_air_quality_index,
Self::fahrenheit,
Self::feet,
Self::fraction,
Self::gdd_celsius,
Self::geopotential_metre,
Self::grains_per_cubic_metre,
Self::gram_per_kilogram,
Self::hectopascal,
Self::hours,
Self::inch,
Self::iso8601,
Self::joule_per_kilogram,
Self::kelvin,
Self::kilopascal,
Self::kilogram_per_square_metre,
Self::kilometres_per_hour,
Self::knots,
Self::megajoule_per_square_metre,
Self::metre_per_second_not_unit_converted,
Self::metre_per_second,
Self::metre,
Self::micrograms_per_cubic_metre,
Self::miles_per_hour,
Self::millimetre,
Self::pascal,
Self::per_second,
Self::percentage,
Self::seconds,
Self::unix_time,
Self::us_air_quality_index,
Self::watt_per_square_metre,
Self::wmo_code,
];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::undefined => Some("undefined"),
Self::celsius => Some("celsius"),
Self::centimetre => Some("centimetre"),
Self::cubic_metre_per_cubic_metre => Some("cubic_metre_per_cubic_metre"),
Self::cubic_metre_per_second => Some("cubic_metre_per_second"),
Self::degree_direction => Some("degree_direction"),
Self::dimensionless_integer => Some("dimensionless_integer"),
Self::dimensionless => Some("dimensionless"),
Self::european_air_quality_index => Some("european_air_quality_index"),
Self::fahrenheit => Some("fahrenheit"),
Self::feet => Some("feet"),
Self::fraction => Some("fraction"),
Self::gdd_celsius => Some("gdd_celsius"),
Self::geopotential_metre => Some("geopotential_metre"),
Self::grains_per_cubic_metre => Some("grains_per_cubic_metre"),
Self::gram_per_kilogram => Some("gram_per_kilogram"),
Self::hectopascal => Some("hectopascal"),
Self::hours => Some("hours"),
Self::inch => Some("inch"),
Self::iso8601 => Some("iso8601"),
Self::joule_per_kilogram => Some("joule_per_kilogram"),
Self::kelvin => Some("kelvin"),
Self::kilopascal => Some("kilopascal"),
Self::kilogram_per_square_metre => Some("kilogram_per_square_metre"),
Self::kilometres_per_hour => Some("kilometres_per_hour"),
Self::knots => Some("knots"),
Self::megajoule_per_square_metre => Some("megajoule_per_square_metre"),
Self::metre_per_second_not_unit_converted => Some("metre_per_second_not_unit_converted"),
Self::metre_per_second => Some("metre_per_second"),
Self::metre => Some("metre"),
Self::micrograms_per_cubic_metre => Some("micrograms_per_cubic_metre"),
Self::miles_per_hour => Some("miles_per_hour"),
Self::millimetre => Some("millimetre"),
Self::pascal => Some("pascal"),
Self::per_second => Some("per_second"),
Self::percentage => Some("percentage"),
Self::seconds => Some("seconds"),
Self::unix_time => Some("unix_time"),
Self::us_air_quality_index => Some("us_air_quality_index"),
Self::watt_per_square_metre => Some("watt_per_square_metre"),
Self::wmo_code => Some("wmo_code"),
_ => None,
}
}
}
impl core::fmt::Debug for Unit {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Unit {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for Unit {
type Output = Unit;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for Unit {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Unit {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Unit {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_MODEL: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_MODEL: u8 = 82;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_MODEL: [Model; 83] = [
Model::undefined,
Model::best_match,
Model::gfs_seamless,
Model::gfs_global,
Model::gfs_hrrr,
Model::meteofrance_seamless,
Model::meteofrance_arpege_seamless,
Model::meteofrance_arpege_world,
Model::meteofrance_arpege_europe,
Model::meteofrance_arome_seamless,
Model::meteofrance_arome_france,
Model::meteofrance_arome_france_hd,
Model::jma_seamless,
Model::jma_msm,
Model::jms_gsm,
Model::jma_gsm,
Model::gem_seamless,
Model::gem_global,
Model::gem_regional,
Model::gem_hrdps_continental,
Model::icon_seamless,
Model::icon_global,
Model::icon_eu,
Model::icon_d2,
Model::ecmwf_ifs04,
Model::metno_nordic,
Model::era5_seamless,
Model::era5,
Model::cerra,
Model::era5_land,
Model::ecmwf_ifs,
Model::gwam,
Model::ewam,
Model::glofas_seamless_v3,
Model::glofas_forecast_v3,
Model::glofas_consolidated_v3,
Model::glofas_seamless_v4,
Model::glofas_forecast_v4,
Model::glofas_consolidated_v4,
Model::gfs025,
Model::gfs05,
Model::CMCC_CM2_VHR4,
Model::FGOALS_f3_H_highresSST,
Model::FGOALS_f3_H,
Model::HiRAM_SIT_HR,
Model::MRI_AGCM3_2_S,
Model::EC_Earth3P_HR,
Model::MPI_ESM1_2_XR,
Model::NICAM16_8S,
Model::cams_europe,
Model::cams_global,
Model::cfsv2,
Model::era5_ocean,
Model::cma_grapes_global,
Model::bom_access_global,
Model::bom_access_global_ensemble,
Model::arpae_cosmo_seamless,
Model::arpae_cosmo_2i,
Model::arpae_cosmo_2i_ruc,
Model::arpae_cosmo_5m,
Model::ecmwf_ifs025,
Model::ecmwf_aifs025,
Model::gfs013,
Model::gfs_graphcast025,
Model::ecmwf_wam025,
Model::meteofrance_wave,
Model::meteofrance_currents,
Model::ecmwf_wam025_ensemble,
Model::ncep_gfswave025,
Model::ncep_gefswave025,
Model::knmi_seamless,
Model::knmi_harmonie_arome_europe,
Model::knmi_harmonie_arome_netherlands,
Model::dmi_seamless,
Model::dmi_harmonie_arome_europe,
Model::metno_seamless,
Model::era5_ensemble,
Model::ecmwf_ifs_analysis,
Model::ecmwf_ifs_long_window,
Model::ecmwf_ifs_analysis_long_window,
Model::ukmo_global_deterministic_10km,
Model::ukmo_uk_deterministic_2km,
Model::ukmo_seamless,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct Model(pub u8);
#[allow(non_upper_case_globals)]
impl Model {
pub const undefined: Self = Self(0);
pub const best_match: Self = Self(1);
pub const gfs_seamless: Self = Self(2);
pub const gfs_global: Self = Self(3);
pub const gfs_hrrr: Self = Self(4);
pub const meteofrance_seamless: Self = Self(5);
pub const meteofrance_arpege_seamless: Self = Self(6);
pub const meteofrance_arpege_world: Self = Self(7);
pub const meteofrance_arpege_europe: Self = Self(8);
pub const meteofrance_arome_seamless: Self = Self(9);
pub const meteofrance_arome_france: Self = Self(10);
pub const meteofrance_arome_france_hd: Self = Self(11);
pub const jma_seamless: Self = Self(12);
pub const jma_msm: Self = Self(13);
pub const jms_gsm: Self = Self(14);
pub const jma_gsm: Self = Self(15);
pub const gem_seamless: Self = Self(16);
pub const gem_global: Self = Self(17);
pub const gem_regional: Self = Self(18);
pub const gem_hrdps_continental: Self = Self(19);
pub const icon_seamless: Self = Self(20);
pub const icon_global: Self = Self(21);
pub const icon_eu: Self = Self(22);
pub const icon_d2: Self = Self(23);
pub const ecmwf_ifs04: Self = Self(24);
pub const metno_nordic: Self = Self(25);
pub const era5_seamless: Self = Self(26);
pub const era5: Self = Self(27);
pub const cerra: Self = Self(28);
pub const era5_land: Self = Self(29);
pub const ecmwf_ifs: Self = Self(30);
pub const gwam: Self = Self(31);
pub const ewam: Self = Self(32);
pub const glofas_seamless_v3: Self = Self(33);
pub const glofas_forecast_v3: Self = Self(34);
pub const glofas_consolidated_v3: Self = Self(35);
pub const glofas_seamless_v4: Self = Self(36);
pub const glofas_forecast_v4: Self = Self(37);
pub const glofas_consolidated_v4: Self = Self(38);
pub const gfs025: Self = Self(39);
pub const gfs05: Self = Self(40);
pub const CMCC_CM2_VHR4: Self = Self(41);
pub const FGOALS_f3_H_highresSST: Self = Self(42);
pub const FGOALS_f3_H: Self = Self(43);
pub const HiRAM_SIT_HR: Self = Self(44);
pub const MRI_AGCM3_2_S: Self = Self(45);
pub const EC_Earth3P_HR: Self = Self(46);
pub const MPI_ESM1_2_XR: Self = Self(47);
pub const NICAM16_8S: Self = Self(48);
pub const cams_europe: Self = Self(49);
pub const cams_global: Self = Self(50);
pub const cfsv2: Self = Self(51);
pub const era5_ocean: Self = Self(52);
pub const cma_grapes_global: Self = Self(53);
pub const bom_access_global: Self = Self(54);
pub const bom_access_global_ensemble: Self = Self(55);
pub const arpae_cosmo_seamless: Self = Self(56);
pub const arpae_cosmo_2i: Self = Self(57);
pub const arpae_cosmo_2i_ruc: Self = Self(58);
pub const arpae_cosmo_5m: Self = Self(59);
pub const ecmwf_ifs025: Self = Self(60);
pub const ecmwf_aifs025: Self = Self(61);
pub const gfs013: Self = Self(62);
pub const gfs_graphcast025: Self = Self(63);
pub const ecmwf_wam025: Self = Self(64);
pub const meteofrance_wave: Self = Self(65);
pub const meteofrance_currents: Self = Self(66);
pub const ecmwf_wam025_ensemble: Self = Self(67);
pub const ncep_gfswave025: Self = Self(68);
pub const ncep_gefswave025: Self = Self(69);
pub const knmi_seamless: Self = Self(70);
pub const knmi_harmonie_arome_europe: Self = Self(71);
pub const knmi_harmonie_arome_netherlands: Self = Self(72);
pub const dmi_seamless: Self = Self(73);
pub const dmi_harmonie_arome_europe: Self = Self(74);
pub const metno_seamless: Self = Self(75);
pub const era5_ensemble: Self = Self(76);
pub const ecmwf_ifs_analysis: Self = Self(77);
pub const ecmwf_ifs_long_window: Self = Self(78);
pub const ecmwf_ifs_analysis_long_window: Self = Self(79);
pub const ukmo_global_deterministic_10km: Self = Self(80);
pub const ukmo_uk_deterministic_2km: Self = Self(81);
pub const ukmo_seamless: Self = Self(82);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 82;
pub const ENUM_VALUES: &'static [Self] = &[
Self::undefined,
Self::best_match,
Self::gfs_seamless,
Self::gfs_global,
Self::gfs_hrrr,
Self::meteofrance_seamless,
Self::meteofrance_arpege_seamless,
Self::meteofrance_arpege_world,
Self::meteofrance_arpege_europe,
Self::meteofrance_arome_seamless,
Self::meteofrance_arome_france,
Self::meteofrance_arome_france_hd,
Self::jma_seamless,
Self::jma_msm,
Self::jms_gsm,
Self::jma_gsm,
Self::gem_seamless,
Self::gem_global,
Self::gem_regional,
Self::gem_hrdps_continental,
Self::icon_seamless,
Self::icon_global,
Self::icon_eu,
Self::icon_d2,
Self::ecmwf_ifs04,
Self::metno_nordic,
Self::era5_seamless,
Self::era5,
Self::cerra,
Self::era5_land,
Self::ecmwf_ifs,
Self::gwam,
Self::ewam,
Self::glofas_seamless_v3,
Self::glofas_forecast_v3,
Self::glofas_consolidated_v3,
Self::glofas_seamless_v4,
Self::glofas_forecast_v4,
Self::glofas_consolidated_v4,
Self::gfs025,
Self::gfs05,
Self::CMCC_CM2_VHR4,
Self::FGOALS_f3_H_highresSST,
Self::FGOALS_f3_H,
Self::HiRAM_SIT_HR,
Self::MRI_AGCM3_2_S,
Self::EC_Earth3P_HR,
Self::MPI_ESM1_2_XR,
Self::NICAM16_8S,
Self::cams_europe,
Self::cams_global,
Self::cfsv2,
Self::era5_ocean,
Self::cma_grapes_global,
Self::bom_access_global,
Self::bom_access_global_ensemble,
Self::arpae_cosmo_seamless,
Self::arpae_cosmo_2i,
Self::arpae_cosmo_2i_ruc,
Self::arpae_cosmo_5m,
Self::ecmwf_ifs025,
Self::ecmwf_aifs025,
Self::gfs013,
Self::gfs_graphcast025,
Self::ecmwf_wam025,
Self::meteofrance_wave,
Self::meteofrance_currents,
Self::ecmwf_wam025_ensemble,
Self::ncep_gfswave025,
Self::ncep_gefswave025,
Self::knmi_seamless,
Self::knmi_harmonie_arome_europe,
Self::knmi_harmonie_arome_netherlands,
Self::dmi_seamless,
Self::dmi_harmonie_arome_europe,
Self::metno_seamless,
Self::era5_ensemble,
Self::ecmwf_ifs_analysis,
Self::ecmwf_ifs_long_window,
Self::ecmwf_ifs_analysis_long_window,
Self::ukmo_global_deterministic_10km,
Self::ukmo_uk_deterministic_2km,
Self::ukmo_seamless,
];
/// Returns the variant's name or "" if unknown.
pub fn variant_name(self) -> Option<&'static str> {
match self {
Self::undefined => Some("undefined"),
Self::best_match => Some("best_match"),
Self::gfs_seamless => Some("gfs_seamless"),
Self::gfs_global => Some("gfs_global"),
Self::gfs_hrrr => Some("gfs_hrrr"),
Self::meteofrance_seamless => Some("meteofrance_seamless"),
Self::meteofrance_arpege_seamless => Some("meteofrance_arpege_seamless"),
Self::meteofrance_arpege_world => Some("meteofrance_arpege_world"),
Self::meteofrance_arpege_europe => Some("meteofrance_arpege_europe"),
Self::meteofrance_arome_seamless => Some("meteofrance_arome_seamless"),
Self::meteofrance_arome_france => Some("meteofrance_arome_france"),
Self::meteofrance_arome_france_hd => Some("meteofrance_arome_france_hd"),
Self::jma_seamless => Some("jma_seamless"),
Self::jma_msm => Some("jma_msm"),
Self::jms_gsm => Some("jms_gsm"),
Self::jma_gsm => Some("jma_gsm"),
Self::gem_seamless => Some("gem_seamless"),
Self::gem_global => Some("gem_global"),
Self::gem_regional => Some("gem_regional"),
Self::gem_hrdps_continental => Some("gem_hrdps_continental"),
Self::icon_seamless => Some("icon_seamless"),
Self::icon_global => Some("icon_global"),
Self::icon_eu => Some("icon_eu"),
Self::icon_d2 => Some("icon_d2"),
Self::ecmwf_ifs04 => Some("ecmwf_ifs04"),
Self::metno_nordic => Some("metno_nordic"),
Self::era5_seamless => Some("era5_seamless"),
Self::era5 => Some("era5"),
Self::cerra => Some("cerra"),
Self::era5_land => Some("era5_land"),
Self::ecmwf_ifs => Some("ecmwf_ifs"),
Self::gwam => Some("gwam"),
Self::ewam => Some("ewam"),
Self::glofas_seamless_v3 => Some("glofas_seamless_v3"),
Self::glofas_forecast_v3 => Some("glofas_forecast_v3"),
Self::glofas_consolidated_v3 => Some("glofas_consolidated_v3"),
Self::glofas_seamless_v4 => Some("glofas_seamless_v4"),
Self::glofas_forecast_v4 => Some("glofas_forecast_v4"),
Self::glofas_consolidated_v4 => Some("glofas_consolidated_v4"),
Self::gfs025 => Some("gfs025"),
Self::gfs05 => Some("gfs05"),
Self::CMCC_CM2_VHR4 => Some("CMCC_CM2_VHR4"),
Self::FGOALS_f3_H_highresSST => Some("FGOALS_f3_H_highresSST"),
Self::FGOALS_f3_H => Some("FGOALS_f3_H"),
Self::HiRAM_SIT_HR => Some("HiRAM_SIT_HR"),
Self::MRI_AGCM3_2_S => Some("MRI_AGCM3_2_S"),
Self::EC_Earth3P_HR => Some("EC_Earth3P_HR"),
Self::MPI_ESM1_2_XR => Some("MPI_ESM1_2_XR"),
Self::NICAM16_8S => Some("NICAM16_8S"),
Self::cams_europe => Some("cams_europe"),
Self::cams_global => Some("cams_global"),
Self::cfsv2 => Some("cfsv2"),
Self::era5_ocean => Some("era5_ocean"),
Self::cma_grapes_global => Some("cma_grapes_global"),
Self::bom_access_global => Some("bom_access_global"),
Self::bom_access_global_ensemble => Some("bom_access_global_ensemble"),
Self::arpae_cosmo_seamless => Some("arpae_cosmo_seamless"),
Self::arpae_cosmo_2i => Some("arpae_cosmo_2i"),
Self::arpae_cosmo_2i_ruc => Some("arpae_cosmo_2i_ruc"),
Self::arpae_cosmo_5m => Some("arpae_cosmo_5m"),
Self::ecmwf_ifs025 => Some("ecmwf_ifs025"),
Self::ecmwf_aifs025 => Some("ecmwf_aifs025"),
Self::gfs013 => Some("gfs013"),
Self::gfs_graphcast025 => Some("gfs_graphcast025"),
Self::ecmwf_wam025 => Some("ecmwf_wam025"),
Self::meteofrance_wave => Some("meteofrance_wave"),
Self::meteofrance_currents => Some("meteofrance_currents"),
Self::ecmwf_wam025_ensemble => Some("ecmwf_wam025_ensemble"),
Self::ncep_gfswave025 => Some("ncep_gfswave025"),
Self::ncep_gefswave025 => Some("ncep_gefswave025"),
Self::knmi_seamless => Some("knmi_seamless"),
Self::knmi_harmonie_arome_europe => Some("knmi_harmonie_arome_europe"),
Self::knmi_harmonie_arome_netherlands => Some("knmi_harmonie_arome_netherlands"),
Self::dmi_seamless => Some("dmi_seamless"),
Self::dmi_harmonie_arome_europe => Some("dmi_harmonie_arome_europe"),
Self::metno_seamless => Some("metno_seamless"),
Self::era5_ensemble => Some("era5_ensemble"),
Self::ecmwf_ifs_analysis => Some("ecmwf_ifs_analysis"),
Self::ecmwf_ifs_long_window => Some("ecmwf_ifs_long_window"),
Self::ecmwf_ifs_analysis_long_window => Some("ecmwf_ifs_analysis_long_window"),
Self::ukmo_global_deterministic_10km => Some("ukmo_global_deterministic_10km"),
Self::ukmo_uk_deterministic_2km => Some("ukmo_uk_deterministic_2km"),
Self::ukmo_seamless => Some("ukmo_seamless"),
_ => None,
}
}
}
impl core::fmt::Debug for Model {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
if let Some(name) = self.variant_name() {
f.write_str(name)
} else {
f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
}
}
}
impl<'a> flatbuffers::Follow<'a> for Model {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
Self(b)
}
}
impl flatbuffers::Push for Model {
type Output = Model;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
flatbuffers::emplace_scalar::<u8>(dst, self.0);
}
}
impl flatbuffers::EndianScalar for Model {
type Scalar = u8;
#[inline]
fn to_little_endian(self) -> u8 {
self.0.to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u8) -> Self {
let b = u8::from_le(v);
Self(b)
}
}
impl<'a> flatbuffers::Verifiable for Model {
#[inline]
fn run_verifier(
v: &mut flatbuffers::Verifier, pos: usize
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
use self::flatbuffers::Verifiable;
u8::run_verifier(v, pos)
}
}
impl flatbuffers::SimpleToVerifyInSlice for Model {}
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MIN_VARIABLE: u8 = 0;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
pub const ENUM_MAX_VARIABLE: u8 = 111;
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
#[allow(non_camel_case_types)]
pub const ENUM_VALUES_VARIABLE: [Variable; 112] = [
Variable::undefined,
Variable::apparent_temperature,
Variable::cape,
Variable::cloud_cover,
Variable::cloud_cover_high,
Variable::cloud_cover_low,
Variable::cloud_cover_mid,
Variable::daylight_duration,
Variable::dew_point,
Variable::diffuse_radiation,
Variable::diffuse_radiation_instant,
Variable::direct_normal_irradiance,
Variable::direct_normal_irradiance_instant,
Variable::direct_radiation,
Variable::direct_radiation_instant,
Variable::et0_fao_evapotranspiration,
Variable::evapotranspiration,
Variable::freezing_level_height,
Variable::growing_degree_days,
Variable::is_day,
Variable::latent_heat_flux,
Variable::leaf_wetness_probability,
Variable::lifted_index,
Variable::lightning_potential,
Variable::precipitation,
Variable::precipitation_hours,
Variable::precipitation_probability,
Variable::pressure_msl,
Variable::rain,
Variable::relative_humidity,
Variable::runoff,
Variable::sensible_heat_flux,
Variable::shortwave_radiation,
Variable::shortwave_radiation_instant,
Variable::showers,
Variable::snow_depth,
Variable::snow_height,
Variable::snowfall,
Variable::snowfall_height,
Variable::snowfall_water_equivalent,
Variable::sunrise,
Variable::sunset,
Variable::soil_moisture,
Variable::soil_moisture_index,
Variable::soil_temperature,
Variable::surface_pressure,
Variable::surface_temperature,
Variable::temperature,
Variable::terrestrial_radiation,
Variable::terrestrial_radiation_instant,
Variable::total_column_integrated_water_vapour,
Variable::updraft,
Variable::uv_index,
Variable::uv_index_clear_sky,
Variable::vapour_pressure_deficit,
Variable::visibility,
Variable::weather_code,
Variable::wind_direction,
Variable::wind_gusts,
Variable::wind_speed,
Variable::vertical_velocity,
Variable::geopotential_height,
Variable::wet_bulb_temperature,
Variable::river_discharge,
Variable::wave_height,
Variable::wave_period,
Variable::wave_direction,
Variable::wind_wave_height,
Variable::wind_wave_period,
Variable::wind_wave_peak_period,
Variable::wind_wave_direction,
Variable::swell_wave_height,
Variable::swell_wave_period,
Variable::swell_wave_peak_period,
Variable::swell_wave_direction,
Variable::pm10,
Variable::pm2p5,
Variable::dust,
Variable::aerosol_optical_depth,
Variable::carbon_monoxide,
Variable::nitrogen_dioxide,
Variable::ammonia,
Variable::ozone,
Variable::sulphur_dioxide,
Variable::alder_pollen,
Variable::birch_pollen,
Variable::grass_pollen,
Variable::mugwort_pollen,
Variable::olive_pollen,
Variable::ragweed_pollen,
Variable::european_aqi,
Variable::european_aqi_pm2p5,
Variable::european_aqi_pm10,
Variable::european_aqi_nitrogen_dioxide,
Variable::european_aqi_ozone,
Variable::european_aqi_sulphur_dioxide,
Variable::us_aqi,
Variable::us_aqi_pm2p5,
Variable::us_aqi_pm10,
Variable::us_aqi_nitrogen_dioxide,
Variable::us_aqi_ozone,
Variable::us_aqi_sulphur_dioxide,
Variable::us_aqi_carbon_monoxide,
Variable::sunshine_duration,
Variable::convective_inhibition,
Variable::shortwave_radiation_clear_sky,
Variable::global_tilted_irradiance,
Variable::global_tilted_irradiance_instant,
Variable::ocean_current_velocity,
Variable::ocean_current_direction,
Variable::cloud_base,
Variable::cloud_top,
];
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
#[repr(transparent)]
pub struct Variable(pub u8);
#[allow(non_upper_case_globals)]
impl Variable {
pub const undefined: Self = Self(0);
pub const apparent_temperature: Self = Self(1);
pub const cape: Self = Self(2);
pub const cloud_cover: Self = Self(3);
pub const cloud_cover_high: Self = Self(4);
pub const cloud_cover_low: Self = Self(5);
pub const cloud_cover_mid: Self = Self(6);
pub const daylight_duration: Self = Self(7);
pub const dew_point: Self = Self(8);
pub const diffuse_radiation: Self = Self(9);
pub const diffuse_radiation_instant: Self = Self(10);
pub const direct_normal_irradiance: Self = Self(11);
pub const direct_normal_irradiance_instant: Self = Self(12);
pub const direct_radiation: Self = Self(13);
pub const direct_radiation_instant: Self = Self(14);
pub const et0_fao_evapotranspiration: Self = Self(15);
pub const evapotranspiration: Self = Self(16);
pub const freezing_level_height: Self = Self(17);
pub const growing_degree_days: Self = Self(18);
pub const is_day: Self = Self(19);
pub const latent_heat_flux: Self = Self(20);
pub const leaf_wetness_probability: Self = Self(21);
pub const lifted_index: Self = Self(22);
pub const lightning_potential: Self = Self(23);
pub const precipitation: Self = Self(24);
pub const precipitation_hours: Self = Self(25);
pub const precipitation_probability: Self = Self(26);
pub const pressure_msl: Self = Self(27);
pub const rain: Self = Self(28);
pub const relative_humidity: Self = Self(29);
pub const runoff: Self = Self(30);
pub const sensible_heat_flux: Self = Self(31);
pub const shortwave_radiation: Self = Self(32);
pub const shortwave_radiation_instant: Self = Self(33);
pub const showers: Self = Self(34);
pub const snow_depth: Self = Self(35);
pub const snow_height: Self = Self(36);
pub const snowfall: Self = Self(37);
pub const snowfall_height: Self = Self(38);
pub const snowfall_water_equivalent: Self = Self(39);
pub const sunrise: Self = Self(40);
pub const sunset: Self = Self(41);
pub const soil_moisture: Self = Self(42);
pub const soil_moisture_index: Self = Self(43);
pub const soil_temperature: Self = Self(44);
pub const surface_pressure: Self = Self(45);
pub const surface_temperature: Self = Self(46);
pub const temperature: Self = Self(47);
pub const terrestrial_radiation: Self = Self(48);
pub const terrestrial_radiation_instant: Self = Self(49);
pub const total_column_integrated_water_vapour: Self = Self(50);
pub const updraft: Self = Self(51);
pub const uv_index: Self = Self(52);
pub const uv_index_clear_sky: Self = Self(53);
pub const vapour_pressure_deficit: Self = Self(54);
pub const visibility: Self = Self(55);
pub const weather_code: Self = Self(56);
pub const wind_direction: Self = Self(57);
pub const wind_gusts: Self = Self(58);
pub const wind_speed: Self = Self(59);
pub const vertical_velocity: Self = Self(60);
pub const geopotential_height: Self = Self(61);
pub const wet_bulb_temperature: Self = Self(62);
pub const river_discharge: Self = Self(63);
pub const wave_height: Self = Self(64);
pub const wave_period: Self = Self(65);
pub const wave_direction: Self = Self(66);
pub const wind_wave_height: Self = Self(67);
pub const wind_wave_period: Self = Self(68);
pub const wind_wave_peak_period: Self = Self(69);
pub const wind_wave_direction: Self = Self(70);
pub const swell_wave_height: Self = Self(71);
pub const swell_wave_period: Self = Self(72);
pub const swell_wave_peak_period: Self = Self(73);
pub const swell_wave_direction: Self = Self(74);
pub const pm10: Self = Self(75);
pub const pm2p5: Self = Self(76);
pub const dust: Self = Self(77);
pub const aerosol_optical_depth: Self = Self(78);
pub const carbon_monoxide: Self = Self(79);
pub const nitrogen_dioxide: Self = Self(80);
pub const ammonia: Self = Self(81);
pub const ozone: Self = Self(82);
pub const sulphur_dioxide: Self = Self(83);
pub const alder_pollen: Self = Self(84);
pub const birch_pollen: Self = Self(85);
pub const grass_pollen: Self = Self(86);
pub const mugwort_pollen: Self = Self(87);
pub const olive_pollen: Self = Self(88);
pub const ragweed_pollen: Self = Self(89);
pub const european_aqi: Self = Self(90);
pub const european_aqi_pm2p5: Self = Self(91);
pub const european_aqi_pm10: Self = Self(92);
pub const european_aqi_nitrogen_dioxide: Self = Self(93);
pub const european_aqi_ozone: Self = Self(94);
pub const european_aqi_sulphur_dioxide: Self = Self(95);
pub const us_aqi: Self = Self(96);
pub const us_aqi_pm2p5: Self = Self(97);
pub const us_aqi_pm10: Self = Self(98);
pub const us_aqi_nitrogen_dioxide: Self = Self(99);
pub const us_aqi_ozone: Self = Self(100);
pub const us_aqi_sulphur_dioxide: Self = Self(101);
pub const us_aqi_carbon_monoxide: Self = Self(102);
pub const sunshine_duration: Self = Self(103);
pub const convective_inhibition: Self = Self(104);
pub const shortwave_radiation_clear_sky: Self = Self(105);
pub const global_tilted_irradiance: Self = Self(106);
pub const global_tilted_irradiance_instant: Self = Self(107);
pub const ocean_current_velocity: Self = Self(108);
pub const ocean_current_direction: Self = Self(109);
pub const cloud_base: Self = Self(110);
pub const cloud_top: Self = Self(111);
pub const ENUM_MIN: u8 = 0;
pub const ENUM_MAX: u8 = 111;
pub const ENUM_VALUES: &'static [Self] = &[
Self::undefined,
Self::apparent_temperature,
Self::cape,
Self::cloud_cover,
Self::cloud_cover_high,
Self::cloud_cover_low,
Self::cloud_cover_mid,
Self::daylight_duration,
Self::dew_point,
Self::diffuse_radiation,
Self::diffuse_radiation_instant,
Self::direct_normal_irradiance,
Self::direct_normal_irradiance_instant,
Self::direct_radiation,
Self::direct_radiation_instant,
Self::et0_fao_evapotranspiration,
Self::evapotranspiration,
Self::freezing_level_height,
Self::growing_degree_days,
Self::is_day,
Self::latent_heat_flux,
Self::leaf_wetness_probability,
Self::lifted_index,
Self::lightning_potential,
Self::precipitation,
Self::precipitation_hours,
Self::precipitation_probability,
Self::pressure_msl,
Self::rain,
Self::relative_humidity,
Self::runoff,
Self::sensible_heat_flux,
Self::shortwave_radiation,
Self::shortwave_radiation_instant,
Self::showers,
Self::snow_depth,
Self::snow_height,
Self::snowfall,
Self::snowfall_height,
Self::snowfall_water_equivalent,
Self::sunrise,
Self::sunset,
Self::soil_moisture,
Self::soil_moisture_index,
Self::soil_temperature,
Self::surface_pressure,
Self::surface_temperature,
Self::temperature,
Self::terrestrial_radiation,
Self::terrestrial_radiation_instant,
Self::total_column_integrated_water_vapour,
Self::updraft,
Self::uv_index,
Self::uv_index_clear_sky,
Self::vapour_pressure_deficit,
Self::visibility,
Self::weather_code,
Self::wind_direction,
Self::wind_gusts,
Self::wind_speed,
Self::vertical_velocity,
Self::geopotential_height,
Self::wet_bulb_temperature,
Self::river_discharge,
Self::wave_height,
Self::wave_period,
Self::wave_direction,
Self::wind_wave_height,
Self::wind_wave_period,
Self::wind_wave_peak_period,
Self::wind_wave_direction,
Self::swell_wave_height,
Self::swell_wave_period,
Self::swell_wave_peak_period,
Self::swell_wave_direction,
Self::pm10,
Self::pm2p5,
Self::dust,
Self::aerosol_optical_depth,
Self::carbon_monoxide,
Self::nitrogen_dioxide,
Self::ammonia,
Self::ozone,
Self::sulphur_dioxide,
Self::alder_pollen,
Self::birch_pollen,
Self::grass_pollen,
Self::mugwort_pollen,