blob: 8108a7f7b2b20216ff06d9e6f3710925cfc2c111 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001/*
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.
Todd Lipcon53ae9f32009-12-07 00:42:38 +000018 *
19 * Contains some contributions under the Thrift Software License.
20 * Please see doc/old-thrift-license.txt in the Thrift distribution for
21 * details.
David Reissea2cba82009-03-30 21:35:00 +000022 */
23
Roger Meier213a6642010-10-27 12:30:11 +000024namespace c_glib TTest
David Reiss9a08dc62008-02-27 01:55:17 +000025namespace cpp thrift.test
David Reiss3b15ebc2008-03-02 06:29:19 +000026namespace java thrift.test
David Reiss8320a922007-08-14 19:59:26 +000027
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 Complex {
53 1: i16 cp_default;
54 2: required i16 cp_required;
55 3: optional i16 cp_optional;
56 4: map<i16,Simple> the_map;
57 5: required Simple req_simp;
58 6: optional Simple opt_simp;
59}
David Reissce161a92007-09-11 22:09:42 +000060
61struct ManyOpt {
62 1: optional i32 opt1;
63 2: optional i32 opt2;
64 3: optional i32 opt3;
65 4: i32 def4;
66 5: optional i32 opt5;
67 6: optional i32 opt6;
68}
David Reiss3b15ebc2008-03-02 06:29:19 +000069
70struct JavaTestHelper {
71 1: required i32 req_int;
72 2: optional i32 opt_int;
73 3: required string req_obj;
74 4: optional string opt_obj;
75 5: required binary req_bin;
76 6: optional binary opt_bin;
77}