blob: 67e6f5879e1cbbc6092974ae9ffa6da97c5bb1bc [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
David Reiss9a08dc62008-02-27 01:55:17 +000024namespace cpp thrift.test
David Reiss3b15ebc2008-03-02 06:29:19 +000025namespace java thrift.test
David Reiss8320a922007-08-14 19:59:26 +000026
27struct OldSchool {
28 1: i16 im_int;
29 2: string im_str;
30 3: list<map<i32,string>> im_big;
31}
32
33struct Simple {
34 1: /* :) */ i16 im_default;
35 2: required i16 im_required;
36 3: optional i16 im_optional;
37}
38
39struct Tricky1 {
40 1: /* :) */ i16 im_default;
41}
42
43struct Tricky2 {
44 1: optional i16 im_optional;
45}
46
47struct Tricky3 {
48 1: required i16 im_required;
49}
50
51struct Complex {
52 1: i16 cp_default;
53 2: required i16 cp_required;
54 3: optional i16 cp_optional;
55 4: map<i16,Simple> the_map;
56 5: required Simple req_simp;
57 6: optional Simple opt_simp;
58}
David Reissce161a92007-09-11 22:09:42 +000059
60struct ManyOpt {
61 1: optional i32 opt1;
62 2: optional i32 opt2;
63 3: optional i32 opt3;
64 4: i32 def4;
65 5: optional i32 opt5;
66 6: optional i32 opt6;
67}
David Reiss3b15ebc2008-03-02 06:29:19 +000068
69struct JavaTestHelper {
70 1: required i32 req_int;
71 2: optional i32 opt_int;
72 3: required string req_obj;
73 4: optional string opt_obj;
74 5: required binary req_bin;
75 6: optional binary opt_bin;
76}