1<?hh // strict
2/**
3 * Autogenerated by Thrift
4 *
5 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6 *  @generated
7 */
8class module_CONSTANTS implements \IThriftConstants {
9  /**
10   * Original thrift constant:-
11   * i32 myInt
12   */
13  const int myInt = 1337;
14
15  /**
16   * Original thrift constant:-
17   * string name
18   */
19  const string name = "Mark Zuckerberg";
20
21  /**
22   * Original thrift constant:-
23   * string multi_line_string
24   */
25  const string multi_line_string = "This
26is a
27multi line string.
28";
29
30  /**
31   * Original thrift constant:-
32   * list<map<string, i32>> states
33   */
34  <<__Memoize>>
35  public static function states()[]: \ConstVector<\ConstMap<string, int>>{
36    return ImmVector {
37      ImmMap {
38        "San Diego" => 3211000,
39        "Sacramento" => 479600,
40        "SF" => 837400,
41      },
42      ImmMap {
43        "New York" => 8406000,
44        "Albany" => 98400,
45      },
46    };
47  }
48
49  /**
50   * Original thrift constant:-
51   * double x
52   */
53  const float x = 1.0;
54
55  /**
56   * Original thrift constant:-
57   * double y
58   */
59  const float y = 1000000.0;
60
61  /**
62   * Original thrift constant:-
63   * double z
64   */
65  const float z = 1e+09;
66
67  /**
68   * Original thrift constant:-
69   * double zeroDoubleValue
70   */
71  const float zeroDoubleValue = 0.0;
72
73  /**
74   * Original thrift constant:-
75   * double longDoubleValue
76   */
77  const float longDoubleValue = 2.59961e-05;
78
79  /**
80   * Original thrift constant:-
81   * enum module.Company my_company
82   */
83  const Company my_company = Company::FACEBOOK;
84
85  /**
86   * Original thrift constant:-
87   * string foo
88   */
89  const string foo = "foo";
90
91  /**
92   * Original thrift constant:-
93   * i32 bar
94   */
95  const int bar = 42;
96
97  /**
98   * Original thrift constant:-
99   * map<string, string> mymap
100   */
101  <<__Memoize>>
102  public static function mymap()[]: \ConstMap<string, string>{
103    return ImmMap {
104      "keys" => "values",
105    };
106  }
107
108  /**
109   * Original thrift constant:-
110   * struct module.Internship instagram
111   */
112  <<__Memoize>>
113  public static function instagram()[]: Internship{
114    return Internship::fromShape(
115      shape(
116        "weeks" => 12,
117        "title" => "Software Engineer",
118        "employer" => Company::INSTAGRAM,
119        "compensation" => 1200.0,
120        "school" => "Monters University",
121      )
122    );
123  }
124
125  /**
126   * Original thrift constant:-
127   * struct module.Internship partial_const
128   */
129  <<__Memoize>>
130  public static function partial_const()[]: Internship{
131    return Internship::fromShape(
132      shape(
133        "weeks" => 8,
134        "title" => "Some Job",
135      )
136    );
137  }
138
139  /**
140   * Original thrift constant:-
141   * list<struct module.Range> kRanges
142   */
143  <<__Memoize>>
144  public static function kRanges()[]: \ConstVector<Range>{
145    return ImmVector {
146      Range::fromShape(
147        shape(
148          "min" => 1,
149          "max" => 2,
150        )
151      ),
152      Range::fromShape(
153        shape(
154          "min" => 5,
155          "max" => 6,
156        )
157      ),
158    };
159  }
160
161  /**
162   * Original thrift constant:-
163   * list<struct module.Internship> internList
164   */
165  <<__Memoize>>
166  public static function internList()[]: \ConstVector<Internship>{
167    return ImmVector {
168      Internship::fromShape(
169        shape(
170          "weeks" => 12,
171          "title" => "Software Engineer",
172          "employer" => Company::INSTAGRAM,
173          "compensation" => 1200.0,
174          "school" => "Monters University",
175        )
176      ),
177      Internship::fromShape(
178        shape(
179          "weeks" => 10,
180          "title" => "Sales Intern",
181          "employer" => Company::FACEBOOK,
182          "compensation" => 1000.0,
183        )
184      ),
185    };
186  }
187
188  /**
189   * Original thrift constant:-
190   * struct module.struct1 pod_0
191   */
192  <<__Memoize>>
193  public static function pod_0()[]: struct1{
194    return struct1::fromShape(
195      shape(
196      )
197    );
198  }
199
200  /**
201   * Original thrift constant:-
202   * struct module.struct1 pod_s_0
203   */
204  <<__Memoize>>
205  public static function pod_s_0()[]: struct1{
206    return struct1::fromShape(
207      shape(
208      )
209    );
210  }
211
212  /**
213   * Original thrift constant:-
214   * struct module.struct1 pod_1
215   */
216  <<__Memoize>>
217  public static function pod_1()[]: struct1{
218    return struct1::fromShape(
219      shape(
220        "a" => 10,
221        "b" => "foo",
222      )
223    );
224  }
225
226  /**
227   * Original thrift constant:-
228   * struct module.struct1 pod_s_1
229   */
230  <<__Memoize>>
231  public static function pod_s_1()[]: struct1{
232    return struct1::fromShape(
233      shape(
234        "a" => 10,
235        "b" => "foo",
236      )
237    );
238  }
239
240  /**
241   * Original thrift constant:-
242   * struct module.struct2 pod_2
243   */
244  <<__Memoize>>
245  public static function pod_2()[]: struct2{
246    return struct2::fromShape(
247      shape(
248        "a" => 98,
249        "b" => "gaz",
250        "c" => struct1::fromShape(
251          shape(
252            "a" => 12,
253            "b" => "bar",
254          )
255        ),
256        "d" => Vector {
257          11,
258          22,
259          33,
260        },
261      )
262    );
263  }
264
265  /**
266   * Original thrift constant:-
267   * struct module.struct2 pod_trailing_commas
268   */
269  <<__Memoize>>
270  public static function pod_trailing_commas()[]: struct2{
271    return struct2::fromShape(
272      shape(
273        "a" => 98,
274        "b" => "gaz",
275        "c" => struct1::fromShape(
276          shape(
277            "a" => 12,
278            "b" => "bar",
279          )
280        ),
281        "d" => Vector {
282          11,
283          22,
284          33,
285        },
286      )
287    );
288  }
289
290  /**
291   * Original thrift constant:-
292   * struct module.struct2 pod_s_2
293   */
294  <<__Memoize>>
295  public static function pod_s_2()[]: struct2{
296    return struct2::fromShape(
297      shape(
298        "a" => 98,
299        "b" => "gaz",
300        "c" => struct1::fromShape(
301          shape(
302            "a" => 12,
303            "b" => "bar",
304          )
305        ),
306        "d" => Vector {
307          11,
308          22,
309          33,
310        },
311      )
312    );
313  }
314
315  /**
316   * Original thrift constant:-
317   * struct module.struct3 pod_3
318   */
319  <<__Memoize>>
320  public static function pod_3()[]: struct3{
321    return struct3::fromShape(
322      shape(
323        "a" => "abc",
324        "b" => 456,
325        "c" => struct2::fromShape(
326          shape(
327            "a" => 888,
328            "c" => struct1::fromShape(
329              shape(
330                "b" => "gaz",
331              )
332            ),
333            "d" => Vector {
334              1,
335              2,
336              3,
337            },
338          )
339        ),
340      )
341    );
342  }
343
344  /**
345   * Original thrift constant:-
346   * struct module.struct3 pod_s_3
347   */
348  <<__Memoize>>
349  public static function pod_s_3()[]: struct3{
350    return struct3::fromShape(
351      shape(
352        "a" => "abc",
353        "b" => 456,
354        "c" => struct2::fromShape(
355          shape(
356            "a" => 888,
357            "c" => struct1::fromShape(
358              shape(
359                "b" => "gaz",
360              )
361            ),
362            "d" => Vector {
363              1,
364              2,
365              3,
366            },
367          )
368        ),
369      )
370    );
371  }
372
373  /**
374   * Original thrift constant:-
375   * struct module.struct4 pod_4
376   */
377  <<__Memoize>>
378  public static function pod_4()[]: struct4{
379    return struct4::fromShape(
380      shape(
381        "a" => 1234,
382        "b" => 0.333,
383        "c" => 25,
384      )
385    );
386  }
387
388  /**
389   * Original thrift constant:-
390   * struct module.union1 u_1_1
391   */
392  <<__Memoize>>
393  public static function u_1_1()[]: union1{
394    return union1::fromShape(
395      shape(
396        "i" => 97,
397      )
398    );
399  }
400
401  /**
402   * Original thrift constant:-
403   * struct module.union1 u_1_2
404   */
405  <<__Memoize>>
406  public static function u_1_2()[]: union1{
407    return union1::fromShape(
408      shape(
409        "d" => 5.6,
410      )
411    );
412  }
413
414  /**
415   * Original thrift constant:-
416   * struct module.union1 u_1_3
417   */
418  <<__Memoize>>
419  public static function u_1_3()[]: union1{
420    return union1::fromShape(
421      shape(
422      )
423    );
424  }
425
426  /**
427   * Original thrift constant:-
428   * struct module.union2 u_2_1
429   */
430  <<__Memoize>>
431  public static function u_2_1()[]: union2{
432    return union2::fromShape(
433      shape(
434        "i" => 51,
435      )
436    );
437  }
438
439  /**
440   * Original thrift constant:-
441   * struct module.union2 u_2_2
442   */
443  <<__Memoize>>
444  public static function u_2_2()[]: union2{
445    return union2::fromShape(
446      shape(
447        "d" => 6.7,
448      )
449    );
450  }
451
452  /**
453   * Original thrift constant:-
454   * struct module.union2 u_2_3
455   */
456  <<__Memoize>>
457  public static function u_2_3()[]: union2{
458    return union2::fromShape(
459      shape(
460        "s" => struct1::fromShape(
461          shape(
462            "a" => 8,
463            "b" => "abacabb",
464          )
465        ),
466      )
467    );
468  }
469
470  /**
471   * Original thrift constant:-
472   * struct module.union2 u_2_4
473   */
474  <<__Memoize>>
475  public static function u_2_4()[]: union2{
476    return union2::fromShape(
477      shape(
478        "u" => union1::fromShape(
479          shape(
480            "i" => 43,
481          )
482        ),
483      )
484    );
485  }
486
487  /**
488   * Original thrift constant:-
489   * struct module.union2 u_2_5
490   */
491  <<__Memoize>>
492  public static function u_2_5()[]: union2{
493    return union2::fromShape(
494      shape(
495        "u" => union1::fromShape(
496          shape(
497            "d" => 9.8,
498          )
499        ),
500      )
501    );
502  }
503
504  /**
505   * Original thrift constant:-
506   * struct module.union2 u_2_6
507   */
508  <<__Memoize>>
509  public static function u_2_6()[]: union2{
510    return union2::fromShape(
511      shape(
512        "u" => union1::fromShape(
513          shape(
514          )
515        ),
516      )
517    );
518  }
519
520  /**
521   * Original thrift constant:-
522   * string apostrophe
523   */
524  const string apostrophe = "'";
525
526  /**
527   * Original thrift constant:-
528   * string tripleApostrophe
529   */
530  const string tripleApostrophe = "'''";
531
532  /**
533   * Original thrift constant:-
534   * string quotationMark
535   */
536  const string quotationMark = "\"";
537
538  /**
539   * Original thrift constant:-
540   * string backslash
541   */
542  const string backslash = "\\";
543
544  /**
545   * Original thrift constant:-
546   * string escaped_a
547   */
548  const string escaped_a = "\x61";
549
550  /**
551   * Original thrift constant:-
552   * map<string, i32> char2ascii
553   */
554  <<__Memoize>>
555  public static function char2ascii()[]: \ConstMap<string, int>{
556    return ImmMap {
557      "'" => 39,
558      "\"" => 34,
559      "\\" => 92,
560      "\x61" => 97,
561    };
562  }
563
564  /**
565   * Original thrift constant:-
566   * list<string> escaped_strings
567   */
568  <<__Memoize>>
569  public static function escaped_strings()[]: \ConstVector<string>{
570    return ImmVector {
571      "\x61",
572      "\xab",
573      "\x6a",
574      "\xa6",
575      "\x61yyy",
576      "\xabyyy",
577      "\x6ayyy",
578      "\xa6yyy",
579      "zzz\x61",
580      "zzz\xab",
581      "zzz\x6a",
582      "zzz\xa6",
583      "zzz\x61yyy",
584      "zzz\xabyyy",
585      "zzz\x6ayyy",
586      "zzz\xa6yyy",
587    };
588  }
589
590  /**
591   * Original thrift constant:-
592   * bool false_c
593   */
594  const bool false_c = false;
595
596  /**
597   * Original thrift constant:-
598   * bool true_c
599   */
600  const bool true_c = true;
601
602  /**
603   * Original thrift constant:-
604   * byte zero_byte
605   */
606  const int zero_byte = 0;
607
608  /**
609   * Original thrift constant:-
610   * i16 zero16
611   */
612  const int zero16 = 0;
613
614  /**
615   * Original thrift constant:-
616   * i32 zero32
617   */
618  const int zero32 = 0;
619
620  /**
621   * Original thrift constant:-
622   * i64 zero64
623   */
624  const int zero64 = 0;
625
626  /**
627   * Original thrift constant:-
628   * double zero_dot_zero
629   */
630  const float zero_dot_zero = 0.0;
631
632  /**
633   * Original thrift constant:-
634   * string empty_string
635   */
636  const string empty_string = "";
637
638  /**
639   * Original thrift constant:-
640   * list<i32> empty_int_list
641   */
642  <<__Memoize>>
643  public static function empty_int_list()[]: \ConstVector<int>{
644    return ImmVector {
645    };
646  }
647
648  /**
649   * Original thrift constant:-
650   * list<string> empty_string_list
651   */
652  <<__Memoize>>
653  public static function empty_string_list()[]: \ConstVector<string>{
654    return ImmVector {
655    };
656  }
657
658  /**
659   * Original thrift constant:-
660   * set<i32> empty_int_set
661   */
662  <<__Memoize>>
663  public static function empty_int_set()[]: \ConstSet<int>{
664    return ImmSet {
665    };
666  }
667
668  /**
669   * Original thrift constant:-
670   * set<string> empty_string_set
671   */
672  <<__Memoize>>
673  public static function empty_string_set()[]: \ConstSet<string>{
674    return ImmSet {
675    };
676  }
677
678  /**
679   * Original thrift constant:-
680   * map<i32, i32> empty_int_int_map
681   */
682  <<__Memoize>>
683  public static function empty_int_int_map()[]: \ConstMap<int, int>{
684    return ImmMap {
685    };
686  }
687
688  /**
689   * Original thrift constant:-
690   * map<i32, string> empty_int_string_map
691   */
692  <<__Memoize>>
693  public static function empty_int_string_map()[]: \ConstMap<int, string>{
694    return ImmMap {
695    };
696  }
697
698  /**
699   * Original thrift constant:-
700   * map<string, i32> empty_string_int_map
701   */
702  <<__Memoize>>
703  public static function empty_string_int_map()[]: \ConstMap<string, int>{
704    return ImmMap {
705    };
706  }
707
708  /**
709   * Original thrift constant:-
710   * map<string, string> empty_string_string_map
711   */
712  <<__Memoize>>
713  public static function empty_string_string_map()[]: \ConstMap<string, string>{
714    return ImmMap {
715    };
716  }
717
718
719  public static function getAllStructuredAnnotations()[]: dict<string, dict<string, \IThriftStruct>> {
720    return dict[
721    ];
722  }
723}
724
725