blob: f7d1fd6a1e676ee1c2b7f651d38c9713e6e18b4a [file] [log] [blame]
Gavin McDonald0b75e1a2010-10-28 02:12:01 +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.
18 */
19
20namespace cpp thrift.test
21namespace java thrift.test
22
23struct OldSchool {
24 1: i16 im_int;
25 2: string im_str;
26 3: list<map<i32,string>> im_big;
27}
28
29struct Simple {
30 1: /* :) */ i16 im_default;
31 2: required i16 im_required;
32 3: optional i16 im_optional;
33}
34
35struct Tricky1 {
36 1: /* :) */ i16 im_default;
37}
38
39struct Tricky2 {
40 1: optional i16 im_optional;
41}
42
43struct Tricky3 {
44 1: required i16 im_required;
45}
46
47struct Complex {
48 1: i16 cp_default;
49 2: required i16 cp_required;
50 3: optional i16 cp_optional;
51 4: map<i16,Simple> the_map;
52 5: required Simple req_simp;
53 6: optional Simple opt_simp;
54}
55
56struct ManyOpt {
57 1: optional i32 opt1;
58 2: optional i32 opt2;
59 3: optional i32 opt3;
60 4: i32 def4;
61 5: optional i32 opt5;
62 6: optional i32 opt6;
63}
64
65struct JavaTestHelper {
66 1: required i32 req_int;
67 2: optional i32 opt_int;
68 3: required string req_obj;
69 4: optional string opt_obj;
70 5: required binary req_bin;
71 6: optional binary opt_bin;
72}