1/* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17namespace java.swift test.fixtures.shapes 18namespace hack test.fixtures 19 20enum Enum { 21 ENUM = 1, 22} 23 24union Union { 25 1: i64 intValue; 26 5: string stringValue; 27} 28 29struct A { 30 1: string a; 31} 32 33struct B { 34 1: A just_an_A; 35 2: set<i32> set_of_i32; 36 3: list<i32> list_of_i32; 37 4: list<string> list_of_string; 38 5: map<string, i32> map_of_string_to_i32; 39 6: map<string, A> map_of_string_to_A; 40 7: map<string, list<i32>> map_of_string_to_list_of_i32; 41 8: map<string, list<A>> map_of_string_to_list_of_A; 42 9: map<string, set<i32>> map_of_string_to_set_of_i32; 43 10: map<string, map<string, i32>> map_of_string_to_map_of_string_to_i32; 44 11: map<string, map<string, A>> map_of_string_to_map_of_string_to_A; 45 12: list<set<i32>> list_of_set_of_i32; 46 13: list<map<string, list<A>>> list_of_map_of_string_to_list_of_A; 47 14: list<map<string, A>> list_of_map_of_string_to_A; 48 15: list<B> list_of_self; 49 16: map<string, B> map_of_string_to_self; 50 17: Enum just_an_enum; 51 18: Union just_a_union; 52 53 51: optional A optional_just_an_A; 54 52: optional set<i32> optional_set_of_i32; 55 53: optional list<i32> optional_list_of_i32; 56 54: optional list<string> optional_list_of_string; 57 55: optional map<string, i32> optional_map_of_string_to_i32; 58 56: optional map<string, A> optional_map_of_string_to_A; 59 57: optional map<string, list<i32>> optional_map_of_string_to_list_of_i32; 60 58: optional map<string, list<A>> optional_map_of_string_to_list_of_A; 61 59: optional map<string, set<i32>> optional_map_of_string_to_set_of_i32; 62 60: optional Enum optional_enum; 63 64 70: required Enum required_enum_with_default = ENUM; 65 66 80: string string_with_default_value = "de_fault_in_our_stars"; 67 81: i32 i32_with_default_value = 1729; 68 82: double double_with_default_value = 3.1415926; 69 83: Enum enum_with_default_value = ENUM; 70 84: A A_with_default_value = {"a": "bc"}; 71 85: set<i32> set_of_i32_with_default_value = [3, 7, 31, 127]; 72 86: map<i32, string> map_of_i32_to_string_with_default_value = { 73 1: "fish", 74 2: "fish", 75 }; 76 87: list<string> list_of_string_with_default_value = [ 77 "red fish", 78 "blue fish", 79 ]; 80 88: map<string, list<i32>> map_of_string_to_list_of_i32_with_default_value = { 81 "Jenny": [8, 6, 7, 5, 3, 0, 9], 82 }; 83} 84