/* * Thrifty * * Copyright (c) Microsoft Corporation * * All rights reserved. * * Licensed 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 * * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING * WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, * FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. * * See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. */ namespace java com.microsoft.thrifty.compiler.testcases typedef string EmailAddress const list EMPTY_INT_LIST = [] const set EMPTY_DOUBLE_SET = [] const map> DUMB_CONSTANT = { "foo": [1, 2, 3], "bar": [4, 5, 6] } struct Email { 1: required EmailAddress From, 2: optional list To, 3: optional list CC, 4: optional list BCC, 5: optional string Subject, 6: optional string Body, 7: required list Attachments = [] } struct Wtf { 1: required map data = {"foo@bar.com": 0, "baz@quux.com": ReceiptStatus.READ} 2: required list>> crazy = [{"ben@thrifty.org": [1, 2]}] } struct NestedLists { 1: required list>> ints = [[[4], [5]], [[], []]] } union Attachment { 1: binary data, 2: string url } enum ReceiptStatus { UNSENT, SENT, READ }