blob: a608898f0ff1c06f46dbf2f856bb0bff4945b73a [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
Jake Farrellf9f01fa2012-01-27 04:48:26 +000052struct OptionalDefault {
53 1: optional i16 opt_int = 1234;
54 2: optional string opt_str = "default";
55}
56
David Reiss8320a922007-08-14 19:59:26 +000057struct 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}
David Reissce161a92007-09-11 22:09:42 +000065
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}
David Reiss3b15ebc2008-03-02 06:29:19 +000074
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}
Nobuaki Sukegawaba3fe862015-12-01 22:42:55 +090083
84struct Binaries {
85 4: binary bin;
86 5: required binary req_bin;
87 6: optional binary opt_bin;
88}