/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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 * * 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. */ include "thrift/annotation/cpp.thrift" namespace py3 python_test @cpp.Type{name = "folly::IOBuf"} typedef binary IOBuf struct Foo { 1: i32 value; } struct OtherFoo { 1: i32 value; } enum Bar { UNKNOWN = 0, ONE = 1, TWO = 2, } enum OtherBar { UNKNOWN = 0, ONE = 1, TWO = 2, } enum Color { red = 0, blue = 1, green = 2, } struct Lists { 3: list boolList; 14: list byteList; 15: list i16List; 9: list i32List; 26: list i64List; 5: list doubleList; 35: list floatList; 8: list stringList; 97: list binaryList; 93: list iobufList; 2: list structList; 47: list colorList; } struct Sets { # @lint-ignore THRIFTCHECKS 3: set boolSet; 14: set byteSet; 15: set i16Set; 9: set i32Set; 26: set i64Set; # @lint-ignore THRIFTCHECKS 5: set doubleSet; # @lint-ignore THRIFTCHECKS 35: set floatSet; 8: set stringSet; 97: set binarySet; 93: set iobufSet; # @lint-ignore THRIFTCHECKS 2: set structSet; 47: set colorSet; } struct Maps { # @lint-ignore THRIFTCHECKS 3: map boolMap; 14: map byteMap; 15: map i16Map; 9: map i32Map; 26: map i64Map; # @lint-ignore THRIFTCHECKS 5: map doubleMap; # @lint-ignore THRIFTCHECKS 35: map floatMap; 8: map stringMap; 97: map binaryMap; 93: map iobufMap; # @lint-ignore THRIFTCHECKS 2: map structMap; 47: map colorMap; }