blob: 3f60321f74eaa8ddfc2e0921aac03f68c86f3354 [file] [log] [blame]
Jens Geyer7757ce72013-07-18 22:48:40 +02001#
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
20include "ThriftTest.thrift"
Jens Geyerd1257de2013-07-31 13:03:26 +020021include "NamespacedTest.thrift"
Jens Geyer7757ce72013-07-18 22:48:40 +020022
Jens Geyer11430df2013-07-26 00:23:00 +020023const ThriftTest.UserId USERID = 42
Jens Geyerd1257de2013-07-31 13:03:26 +020024const NamespacedTest.UserId USERID1 = 41
Jens Geyer11430df2013-07-26 00:23:00 +020025const ThriftTest.MapType MAPCONSTANT = {'hello':{}, 'goodnight':{}}
26
Jens Geyerd1257de2013-07-31 13:03:26 +020027const i32 TWO = NamespacedTest.Stuff.TWO
28const i32 THREE = NamespacedTest.THREE
29
Jens Geyer7757ce72013-07-18 22:48:40 +020030struct testStruct {
31 1: list<ThriftTest.Numberz> listNumbers
32}
33
34struct TestStruct2 {
35 1: testStruct blah,
Jens Geyerd1257de2013-07-31 13:03:26 +020036 2: ThriftTest.UserId id,
37 3: NamespacedTest.Stuff stuff,
Jens Geyer7757ce72013-07-18 22:48:40 +020038}
39
40service testService extends ThriftTest.SecondService {
41 ThriftTest.CrazyNesting getCrazyNesting(
42 1: ThriftTest.StructA a,
43 2: ThriftTest.Numberz numbers
44 ) throws(1: ThriftTest.Xception err1),
45
46 void getSomeValue_DO_NOT_CALL(),
47}
48
49service ExtendedService extends testService {
50 void extendedMethod(),
Jens Geyerd1257de2013-07-31 13:03:26 +020051 NamespacedTest.StuffStruct extendedMethod2(),
Jens Geyer7757ce72013-07-18 22:48:40 +020052}
Jens Geyerd1257de2013-07-31 13:03:26 +020053
54service Extended2Service extends NamespacedTest.NamespacedService {
55 void extendedMethod3(),
56}
57
Jens Geyer656a1732013-08-03 10:22:39 +020058typedef map<ThriftTest.UserId, map<NamespacedTest.UserId, list<TestStruct2> > > ComplexMapType
59
60struct ComplexMapStruct {
61 1: ComplexMapType complex,
62}
63
64service ComplexMapService {
65 ComplexMapStruct transformMap(1: ComplexMapStruct input),
66}
67