1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *
19 * Contains some contributions under the Thrift Software License.
20 * Please see doc/old-thrift-license.txt in the Thrift distribution for
21 * details.
22 */
23
24namespace c_glib TTest
25namespace cpp thrift.test
26namespace java thrift.test
27
28struct OldSchool {
29  1: i16    im_int;
30  2: string im_str;
31  3: list<map<i32,string>> im_big;
32}
33
34struct Simple {
35  1: /* :) */ i16 im_default;
36  2: required i16 im_required;
37  3: optional i16 im_optional;
38}
39
40struct Tricky1 {
41  1: /* :) */ i16 im_default;
42}
43
44struct Tricky2 {
45  1: optional i16 im_optional;
46}
47
48struct Tricky3 {
49  1: required i16 im_required;
50}
51
52struct OptionalDefault {
53  1: optional i16 opt_int = 1234;
54  2: optional string opt_str = "default";
55}
56
57struct Complex {
58  1:          i16 cp_default;
59  2: required i16 cp_required;
60  3: optional i16 cp_optional;
61  4:          map<i16,Simple> the_map;
62  5: required Simple req_simp;
63  6: optional Simple opt_simp;
64}
65
66struct ManyOpt {
67  1: optional i32 opt1;
68  2: optional i32 opt2;
69  3: optional i32 opt3;
70  4:          i32 def4;
71  5: optional i32 opt5;
72  6: optional i32 opt6;
73}
74
75struct JavaTestHelper {
76  1: required i32    req_int;
77  2: optional i32    opt_int;
78  3: required string req_obj;
79  4: optional string opt_obj;
80  5: required binary req_bin;
81  6: optional binary opt_bin;
82}
83
84struct Binaries {
85  4: binary bin;
86  5: required binary req_bin;
87  6: optional binary opt_bin;
88}
89