2009-03-30 21:35:00 +00:00
|
|
|
/*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2009-12-07 00:42:38 +00:00
|
|
|
*
|
|
|
|
* Contains some contributions under the Thrift Software License.
|
|
|
|
* Please see doc/old-thrift-license.txt in the Thrift distribution for
|
|
|
|
* details.
|
2009-03-30 21:35:00 +00:00
|
|
|
*/
|
|
|
|
|
2010-10-27 12:30:11 +00:00
|
|
|
namespace c_glib TTest
|
2008-02-27 01:55:25 +00:00
|
|
|
namespace java thrift.test
|
2008-02-27 01:55:17 +00:00
|
|
|
namespace cpp thrift.test
|
2008-03-27 21:42:16 +00:00
|
|
|
namespace rb Thrift.Test
|
2008-03-27 21:42:39 +00:00
|
|
|
namespace perl ThriftTest
|
2008-03-27 21:41:37 +00:00
|
|
|
namespace csharp Thrift.Test
|
2010-02-15 03:24:55 +00:00
|
|
|
namespace js ThriftTest
|
2010-08-30 17:09:58 +00:00
|
|
|
namespace st ThriftTest
|
2010-09-27 04:43:39 +00:00
|
|
|
namespace py ThriftTest
|
2010-10-08 17:46:06 +00:00
|
|
|
namespace py.twisted ThriftTest
|
2014-05-02 21:37:39 +00:00
|
|
|
namespace go thrifttest
|
2011-03-02 18:13:30 +00:00
|
|
|
namespace php ThriftTest
|
2011-10-18 14:35:26 +00:00
|
|
|
namespace delphi Thrift.Test
|
2011-12-06 01:07:17 +00:00
|
|
|
namespace cocoa ThriftTest
|
2014-04-04 22:45:42 +00:00
|
|
|
namespace lua ThriftTest
|
2013-05-16 19:26:20 +00:00
|
|
|
|
|
|
|
// Presence of namespaces and sub-namespaces for which there is
|
|
|
|
// no generator should compile with warnings only
|
|
|
|
namespace noexist ThriftTest
|
|
|
|
namespace cpp.noexist ThriftTest
|
|
|
|
|
2010-09-02 16:41:45 +00:00
|
|
|
namespace * thrift.test
|
2006-08-15 00:21:31 +00:00
|
|
|
|
2009-11-19 17:26:38 +00:00
|
|
|
/**
|
|
|
|
* Docstring!
|
|
|
|
*/
|
2006-05-30 09:24:40 +00:00
|
|
|
enum Numberz
|
|
|
|
{
|
|
|
|
ONE = 1,
|
|
|
|
TWO,
|
|
|
|
THREE,
|
|
|
|
FIVE = 5,
|
|
|
|
SIX,
|
|
|
|
EIGHT = 8
|
|
|
|
}
|
|
|
|
|
2010-09-12 14:38:36 +00:00
|
|
|
const Numberz myNumberz = Numberz.ONE;
|
|
|
|
// the following is expected to fail:
|
|
|
|
// const Numberz urNumberz = ONE;
|
|
|
|
|
2006-06-30 18:28:50 +00:00
|
|
|
typedef i64 UserId
|
2006-05-30 09:24:40 +00:00
|
|
|
|
2007-02-21 05:17:48 +00:00
|
|
|
struct Bonk
|
|
|
|
{
|
|
|
|
1: string message,
|
|
|
|
2: i32 type
|
|
|
|
}
|
|
|
|
|
2013-07-25 22:23:00 +00:00
|
|
|
typedef map<string,Bonk> MapType
|
|
|
|
|
2009-03-24 16:04:36 +00:00
|
|
|
struct Bools {
|
|
|
|
1: bool im_true,
|
|
|
|
2: bool im_false,
|
|
|
|
}
|
|
|
|
|
2006-05-30 09:24:40 +00:00
|
|
|
struct Xtruct
|
|
|
|
{
|
2006-10-25 19:03:32 +00:00
|
|
|
1: string string_thing,
|
|
|
|
4: byte byte_thing,
|
|
|
|
9: i32 i32_thing,
|
|
|
|
11: i64 i64_thing
|
2006-05-30 09:24:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Xtruct2
|
|
|
|
{
|
2015-10-20 21:13:02 +00:00
|
|
|
1: i8 byte_thing, // used to be byte, hence the name
|
2006-10-25 19:03:32 +00:00
|
|
|
2: Xtruct struct_thing,
|
|
|
|
3: i32 i32_thing
|
2006-05-30 09:24:40 +00:00
|
|
|
}
|
|
|
|
|
2009-03-30 20:46:47 +00:00
|
|
|
struct Xtruct3
|
|
|
|
{
|
|
|
|
1: string string_thing,
|
|
|
|
4: i32 changed,
|
|
|
|
9: i32 i32_thing,
|
|
|
|
11: i64 i64_thing
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-05-30 09:24:40 +00:00
|
|
|
struct Insanity
|
|
|
|
{
|
2006-10-25 19:03:32 +00:00
|
|
|
1: map<Numberz, UserId> userMap,
|
|
|
|
2: list<Xtruct> xtructs
|
2006-05-30 09:24:40 +00:00
|
|
|
}
|
|
|
|
|
2009-01-29 01:51:08 +00:00
|
|
|
struct CrazyNesting {
|
|
|
|
1: string string_field,
|
|
|
|
2: optional set<Insanity> set_field,
|
2010-10-06 20:00:03 +00:00
|
|
|
3: required list< map<set<i32>,map<i32,set<list<map<Insanity,string>>>>>> list_field,
|
|
|
|
4: binary binary_field
|
2009-01-29 01:51:08 +00:00
|
|
|
}
|
|
|
|
|
2006-08-15 21:29:39 +00:00
|
|
|
exception Xception {
|
2006-10-25 19:03:32 +00:00
|
|
|
1: i32 errorCode,
|
|
|
|
2: string message
|
2006-08-14 23:30:37 +00:00
|
|
|
}
|
|
|
|
|
2006-08-15 21:29:39 +00:00
|
|
|
exception Xception2 {
|
2006-10-25 19:03:32 +00:00
|
|
|
1: i32 errorCode,
|
|
|
|
2: Xtruct struct_thing
|
2006-08-14 23:30:37 +00:00
|
|
|
}
|
2007-08-16 01:26:31 +00:00
|
|
|
|
2006-09-01 22:19:06 +00:00
|
|
|
struct EmptyStruct {}
|
|
|
|
|
2006-08-14 23:30:37 +00:00
|
|
|
struct OneField {
|
2006-10-25 19:03:32 +00:00
|
|
|
1: EmptyStruct field
|
2006-08-14 23:30:37 +00:00
|
|
|
}
|
2006-08-11 23:03:42 +00:00
|
|
|
|
2006-05-30 09:24:40 +00:00
|
|
|
service ThriftTest
|
|
|
|
{
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints "testVoid()" and returns nothing.
|
|
|
|
*/
|
2006-08-14 23:30:37 +00:00
|
|
|
void testVoid(),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testString("%s")' with thing as '%s'
|
|
|
|
* @param string thing - the string to print
|
|
|
|
* @return string - returns the string 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
string testString(1: string thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2015-09-21 04:53:25 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testBool("%s")' where '%s' with thing as 'true' or 'false'
|
|
|
|
* @param bool thing - the bool data to print
|
|
|
|
* @return bool - returns the bool 'thing'
|
|
|
|
*/
|
|
|
|
bool testBool(1: bool thing),
|
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testByte("%d")' with thing as '%d'
|
2015-10-20 21:13:02 +00:00
|
|
|
* The types i8 and byte are synonyms, use of i8 is encouraged, byte still exists for the sake of compatibility.
|
|
|
|
* @param byte thing - the i8/byte to print
|
|
|
|
* @return i8 - returns the i8/byte 'thing'
|
2012-05-02 22:56:47 +00:00
|
|
|
*/
|
2015-10-20 21:13:02 +00:00
|
|
|
i8 testByte(1: byte thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testI32("%d")' with thing as '%d'
|
|
|
|
* @param i32 thing - the i32 to print
|
|
|
|
* @return i32 - returns the i32 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
i32 testI32(1: i32 thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testI64("%d")' with thing as '%d'
|
|
|
|
* @param i64 thing - the i64 to print
|
|
|
|
* @return i64 - returns the i64 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
i64 testI64(1: i64 thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testDouble("%f")' with thing as '%f'
|
|
|
|
* @param double thing - the double to print
|
|
|
|
* @return double - returns the double 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
double testDouble(1: double thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2014-12-13 22:39:45 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testBinary("%s")' where '%s' is a hex-formatted string of thing's data
|
|
|
|
* @param binary thing - the binary data to print
|
|
|
|
* @return binary - returns the binary 'thing'
|
|
|
|
*/
|
|
|
|
binary testBinary(1: binary thing),
|
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
2014-11-24 09:55:31 +00:00
|
|
|
* Prints 'testStruct("{%s}")' where thing has been formatted into a string of comma separated values
|
2012-05-02 22:56:47 +00:00
|
|
|
* @param Xtruct thing - the Xtruct to print
|
|
|
|
* @return Xtruct - returns the Xtruct 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
Xtruct testStruct(1: Xtruct thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testNest("{%s}")' where thing has been formatted into a string of the nested struct
|
|
|
|
* @param Xtruct2 thing - the Xtruct2 to print
|
|
|
|
* @return Xtruct2 - returns the Xtruct2 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
Xtruct2 testNest(1: Xtruct2 thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testMap("{%s")' where thing has been formatted into a string of 'key => value' pairs
|
2014-11-24 09:55:31 +00:00
|
|
|
* separated by commas and new lines
|
2012-05-02 22:56:47 +00:00
|
|
|
* @param map<i32,i32> thing - the map<i32,i32> to print
|
|
|
|
* @return map<i32,i32> - returns the map<i32,i32> 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
map<i32,i32> testMap(1: map<i32,i32> thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testStringMap("{%s}")' where thing has been formatted into a string of 'key => value' pairs
|
2014-11-24 09:55:31 +00:00
|
|
|
* separated by commas and new lines
|
2012-05-02 22:56:47 +00:00
|
|
|
* @param map<string,string> thing - the map<string,string> to print
|
|
|
|
* @return map<string,string> - returns the map<string,string> 'thing'
|
|
|
|
*/
|
2011-06-14 19:38:27 +00:00
|
|
|
map<string,string> testStringMap(1: map<string,string> thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testSet("{%s}")' where thing has been formatted into a string of values
|
2014-11-24 09:55:31 +00:00
|
|
|
* separated by commas and new lines
|
2012-05-02 22:56:47 +00:00
|
|
|
* @param set<i32> thing - the set<i32> to print
|
|
|
|
* @return set<i32> - returns the set<i32> 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
set<i32> testSet(1: set<i32> thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testList("{%s}")' where thing has been formatted into a string of values
|
2014-11-24 09:55:31 +00:00
|
|
|
* separated by commas and new lines
|
2012-05-02 22:56:47 +00:00
|
|
|
* @param list<i32> thing - the list<i32> to print
|
|
|
|
* @return list<i32> - returns the list<i32> 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
list<i32> testList(1: list<i32> thing),
|
2014-10-03 18:22:28 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testEnum("%d")' where thing has been formatted into it's numeric value
|
|
|
|
* @param Numberz thing - the Numberz to print
|
|
|
|
* @return Numberz - returns the Numberz 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
Numberz testEnum(1: Numberz thing),
|
2012-05-02 22:56:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prints 'testTypedef("%d")' with thing as '%d'
|
|
|
|
* @param UserId thing - the UserId to print
|
|
|
|
* @return UserId - returns the UserId 'thing'
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
UserId testTypedef(1: UserId thing),
|
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testMapMap("%d")' with hello as '%d'
|
|
|
|
* @param i32 hello - the i32 to print
|
|
|
|
* @return map<i32,map<i32,i32>> - returns a dictionary with these values:
|
|
|
|
* {-4 => {-4 => -4, -3 => -3, -2 => -2, -1 => -1, }, 4 => {1 => 1, 2 => 2, 3 => 3, 4 => 4, }, }
|
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
map<i32,map<i32,i32>> testMapMap(1: i32 hello),
|
2006-05-30 09:24:40 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* So you think you've got this all worked, out eh?
|
|
|
|
*
|
|
|
|
* Creates a the returned map with these values and prints it out:
|
2014-10-03 18:22:28 +00:00
|
|
|
* { 1 => { 2 => argument,
|
|
|
|
* 3 => argument,
|
2012-05-02 22:56:47 +00:00
|
|
|
* },
|
|
|
|
* 2 => { 6 => <empty Insanity struct>, },
|
|
|
|
* }
|
2014-10-03 18:22:28 +00:00
|
|
|
* @return map<UserId, map<Numberz,Insanity>> - a map with the above values
|
2012-05-02 22:56:47 +00:00
|
|
|
*/
|
2006-10-25 19:03:32 +00:00
|
|
|
map<UserId, map<Numberz,Insanity>> testInsanity(1: Insanity argument),
|
2006-08-14 23:30:37 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testMulti()'
|
2014-10-03 18:22:28 +00:00
|
|
|
* @param byte arg0 -
|
|
|
|
* @param i32 arg1 -
|
|
|
|
* @param i64 arg2 -
|
|
|
|
* @param map<i16, string> arg3 -
|
|
|
|
* @param Numberz arg4 -
|
|
|
|
* @param UserId arg5 -
|
2012-05-02 22:56:47 +00:00
|
|
|
* @return Xtruct - returns an Xtruct with string_thing = "Hello2, byte_thing = arg0, i32_thing = arg1
|
|
|
|
* and i64_thing = arg2
|
|
|
|
*/
|
2009-04-02 19:24:02 +00:00
|
|
|
Xtruct testMulti(1: byte arg0, 2: i32 arg1, 3: i64 arg2, 4: map<i16, string> arg3, 5: Numberz arg4, 6: UserId arg5),
|
2006-08-14 23:30:37 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Print 'testException(%s)' with arg as '%s'
|
|
|
|
* @param string arg - a string indication what type of exception to throw
|
|
|
|
* if arg == "Xception" throw Xception with errorCode = 1001 and message = arg
|
|
|
|
* elsen if arg == "TException" throw TException
|
|
|
|
* else do not throw anything
|
|
|
|
*/
|
2009-04-02 19:24:02 +00:00
|
|
|
void testException(1: string arg) throws(1: Xception err1),
|
2006-08-14 23:30:37 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Print 'testMultiException(%s, %s)' with arg0 as '%s' and arg1 as '%s'
|
|
|
|
* @param string arg - a string indication what type of exception to throw
|
|
|
|
* if arg0 == "Xception" throw Xception with errorCode = 1001 and message = "This is an Xception"
|
2015-09-28 17:16:53 +00:00
|
|
|
* elsen if arg0 == "Xception2" throw Xception2 with errorCode = 2002 and struct_thing.string_thing = "This is an Xception2"
|
2012-05-02 22:56:47 +00:00
|
|
|
* else do not throw anything
|
|
|
|
* @return Xtruct - an Xtruct with string_thing = arg1
|
|
|
|
*/
|
2009-04-02 19:24:02 +00:00
|
|
|
Xtruct testMultiException(1: string arg0, 2: string arg1) throws(1: Xception err1, 2: Xception2 err2)
|
2008-02-18 02:11:44 +00:00
|
|
|
|
2012-05-02 22:56:47 +00:00
|
|
|
/**
|
|
|
|
* Print 'testOneway(%d): Sleeping...' with secondsToSleep as '%d'
|
|
|
|
* sleep 'secondsToSleep'
|
|
|
|
* Print 'testOneway(%d): done sleeping!' with secondsToSleep as '%d'
|
|
|
|
* @param i32 secondsToSleep - the number of seconds to sleep
|
|
|
|
*/
|
2009-03-24 20:02:22 +00:00
|
|
|
oneway void testOneway(1:i32 secondsToSleep)
|
2006-05-30 09:24:40 +00:00
|
|
|
}
|
2006-09-02 23:56:49 +00:00
|
|
|
|
|
|
|
service SecondService
|
|
|
|
{
|
|
|
|
void blahBlah()
|
2013-08-28 12:03:34 +00:00
|
|
|
/**
|
|
|
|
* Prints 'testString("%s")' with thing as '%s'
|
|
|
|
* @param string thing - the string to print
|
|
|
|
* @return string - returns the string 'thing'
|
|
|
|
*/
|
|
|
|
string secondtestString(1: string thing),
|
2006-09-02 23:56:49 +00:00
|
|
|
}
|
2008-02-15 01:10:23 +00:00
|
|
|
|
|
|
|
struct VersioningTestV1 {
|
|
|
|
1: i32 begin_in_both,
|
2009-03-24 22:48:40 +00:00
|
|
|
3: string old_string,
|
2008-02-15 01:10:23 +00:00
|
|
|
12: i32 end_in_both
|
|
|
|
}
|
|
|
|
|
|
|
|
struct VersioningTestV2 {
|
|
|
|
1: i32 begin_in_both,
|
|
|
|
|
|
|
|
2: i32 newint,
|
|
|
|
3: byte newbyte,
|
|
|
|
4: i16 newshort,
|
|
|
|
5: i64 newlong,
|
|
|
|
6: double newdouble
|
|
|
|
7: Bonk newstruct,
|
|
|
|
8: list<i32> newlist,
|
|
|
|
9: set<i32> newset,
|
|
|
|
10: map<i32, i32> newmap,
|
|
|
|
11: string newstring,
|
|
|
|
12: i32 end_in_both
|
2008-02-27 01:55:17 +00:00
|
|
|
}
|
2008-04-07 23:45:00 +00:00
|
|
|
|
|
|
|
struct ListTypeVersioningV1 {
|
|
|
|
1: list<i32> myints;
|
|
|
|
2: string hello;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ListTypeVersioningV2 {
|
|
|
|
1: list<string> strings;
|
|
|
|
2: string hello;
|
2009-01-29 01:51:08 +00:00
|
|
|
}
|
2010-10-19 23:00:27 +00:00
|
|
|
|
|
|
|
struct GuessProtocolStruct {
|
|
|
|
7: map<string,string> map_field,
|
|
|
|
}
|
2011-03-15 17:16:09 +00:00
|
|
|
|
|
|
|
struct LargeDeltas {
|
|
|
|
1: Bools b1,
|
|
|
|
10: Bools b10,
|
|
|
|
100: Bools b100,
|
|
|
|
500: bool check_true,
|
|
|
|
1000: Bools b1000,
|
|
|
|
1500: bool check_false,
|
|
|
|
2000: VersioningTestV2 vertwo2000,
|
|
|
|
2500: set<string> a_set2500,
|
|
|
|
3000: VersioningTestV2 vertwo3000,
|
|
|
|
4000: list<i32> big_numbers
|
|
|
|
}
|
2011-09-11 18:16:21 +00:00
|
|
|
|
|
|
|
struct NestedListsI32x2 {
|
|
|
|
1: list<list<i32>> integerlist
|
|
|
|
}
|
|
|
|
struct NestedListsI32x3 {
|
|
|
|
1: list<list<list<i32>>> integerlist
|
|
|
|
}
|
|
|
|
struct NestedMixedx2 {
|
|
|
|
1: list<set<i32>> int_set_list
|
|
|
|
2: map<i32,set<string>> map_int_strset
|
|
|
|
3: list<map<i32,set<string>>> map_int_strset_list
|
|
|
|
}
|
|
|
|
struct ListBonks {
|
|
|
|
1: list<Bonk> bonk
|
|
|
|
}
|
|
|
|
struct NestedListsBonk {
|
|
|
|
1: list<list<list<Bonk>>> bonk
|
|
|
|
}
|
2011-10-13 21:32:52 +00:00
|
|
|
|
|
|
|
struct BoolTest {
|
|
|
|
1: optional bool b = true;
|
|
|
|
2: optional string s = "true";
|
|
|
|
}
|
2011-12-27 22:26:59 +00:00
|
|
|
|
|
|
|
struct StructA {
|
|
|
|
1: required string s;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct StructB {
|
|
|
|
1: optional StructA aa;
|
|
|
|
2: required StructA ab;
|
2013-05-16 19:26:20 +00:00
|
|
|
}
|