/* * 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/python.thrift" namespace py3 python_test enum Kind { None = 0, REGULAR = 8, LINK = 10, DIR = 4, FIFO = 1, CHAR = 2, BLOCK = 6, SOCK = 12, } enum BadMembers { @python.Name{name = "name_"} name = 1, @python.Name{name = "value_"} value = 2, } enum Color { red = 0, blue = 1, green = 2, } @python.Flags{} enum Perm { read = 4, write = 2, execute = 1, } struct ColorGroups { 1: list color_list; 2: set color_set; 3: map color_map; } struct OptionalColorGroups { 1: optional list color_list; 2: optional set color_set; 3: optional map color_map; } struct File { 1: string name; 2: Perm permissions; 3: Kind type = Kind.REGULAR; } struct OptionalFile { 1: optional string name; 3: optional i32 type; }