1# 2# Autogenerated by Thrift 3# 4# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 5# @generated 6# 7 8# pyre-unsafe 9 10import typing as __T # sometimes `t` is used as a field name 11 12from thrift import Thrift 13from thrift.protocol.TProtocol import TProtocolBase 14 15__property__ = property # sometimes `property` is used as a field name 16 17import simple.dependent.ttypes 18 19UTF8STRINGS: bool 20 21 22class AnEnum(int): 23 ONE: __T.ClassVar[AnEnum] 24 TWO: __T.ClassVar[AnEnum] 25 THREE: __T.ClassVar[AnEnum] 26 FOUR: __T.ClassVar[AnEnum] 27 28 _VALUES_TO_NAMES: __T.ClassVar[__T.Dict[AnEnum, str]] 29 _NAMES_TO_VALUES: __T.ClassVar[__T.Dict[str, AnEnum]] 30 31 32class SimpleException(Thrift.TException): 33 thrift_spec: __T.Tuple[__T.Optional[__T.Tuple[int, int, str, __T.Any, __T.Optional[int], int]]] 34 thrift_field_annotations: __T.Dict[int, __T.Dict[str, str]] 35 thrift_struct_annotations: __T.Dict[str, str] 36 37 def __init__( 38 self, 39 err_code: __T.Optional[int] = ... 40 ) -> None: 41 ... 42 43 @__property__ 44 def err_code(self) -> int: ... 45 @err_code.setter 46 def err_code(self, value: __T.Optional[int]) -> None: ... 47 48 49 def isUnion(self) -> bool: ... 50 def checkRequired(self) -> None: ... 51 def read(self, iprot: TProtocolBase) -> None: ... 52 @__T.overload 53 def readFromJson(self, json: __T.Dict[str, __T.Any], is_text: bool = ..., **kwargs: __T.Any) -> None: ... 54 @__T.overload 55 def readFromJson(self, json: str, is_text: bool = ..., **kwargs: __T.Any) -> None: ... 56 def write(self, oprot: TProtocolBase) -> None: ... 57 def __eq__(self, other: __T.Any) -> bool: ... 58 def __ne__(self, other: __T.Any) -> bool: ... 59 60 61class MessageException(Thrift.TException): 62 thrift_spec: __T.Tuple[__T.Optional[__T.Tuple[int, int, str, __T.Any, __T.Optional[int], int]]] 63 thrift_field_annotations: __T.Dict[int, __T.Dict[str, str]] 64 thrift_struct_annotations: __T.Dict[str, str] 65 66 def __init__( 67 self, 68 message: __T.Optional[str] = ..., 69 err_code: __T.Optional[int] = ... 70 ) -> None: 71 ... 72 73 @__property__ 74 def message(self) -> str: ... 75 @message.setter 76 def message(self, value: __T.Optional[str]) -> None: ... 77 @__property__ 78 def err_code(self) -> int: ... 79 @err_code.setter 80 def err_code(self, value: __T.Optional[int]) -> None: ... 81 82 83 def isUnion(self) -> bool: ... 84 def checkRequired(self) -> None: ... 85 def read(self, iprot: TProtocolBase) -> None: ... 86 @__T.overload 87 def readFromJson(self, json: __T.Dict[str, __T.Any], is_text: bool = ..., **kwargs: __T.Any) -> None: ... 88 @__T.overload 89 def readFromJson(self, json: str, is_text: bool = ..., **kwargs: __T.Any) -> None: ... 90 def write(self, oprot: TProtocolBase) -> None: ... 91 def __eq__(self, other: __T.Any) -> bool: ... 92 def __ne__(self, other: __T.Any) -> bool: ... 93 94 95class SimpleStruct: 96 thrift_spec: __T.Tuple[__T.Optional[__T.Tuple[int, int, str, __T.Any, __T.Optional[int], int]]] 97 thrift_field_annotations: __T.Dict[int, __T.Dict[str, str]] 98 thrift_struct_annotations: __T.Dict[str, str] 99 100 def __init__( 101 self, 102 is_on: __T.Optional[bool] = ..., 103 tiny_int: int = ..., 104 small_int: __T.Optional[int] = ..., 105 nice_sized_int: __T.Optional[int] = ..., 106 big_int: __T.Optional[int] = ..., 107 coarse_real: float = ..., 108 precise_real: __T.Optional[float] = ..., 109 a_str: __T.Optional[str] = ..., 110 a_bytes: __T.Optional[bytes] = ... 111 ) -> None: 112 ... 113 114 @__property__ 115 def is_on(self) -> bool: ... 116 @is_on.setter 117 def is_on(self, value: __T.Optional[bool]) -> None: ... 118 @__property__ 119 def tiny_int(self) -> int: ... 120 @tiny_int.setter 121 def tiny_int(self, value: int) -> None: ... 122 @__property__ 123 def small_int(self) -> __T.Optional[int]: ... 124 @small_int.setter 125 def small_int(self, value: __T.Optional[int]) -> None: ... 126 @__property__ 127 def nice_sized_int(self) -> __T.Optional[int]: ... 128 @nice_sized_int.setter 129 def nice_sized_int(self, value: __T.Optional[int]) -> None: ... 130 @__property__ 131 def big_int(self) -> int: ... 132 @big_int.setter 133 def big_int(self, value: __T.Optional[int]) -> None: ... 134 @__property__ 135 def coarse_real(self) -> float: ... 136 @coarse_real.setter 137 def coarse_real(self, value: float) -> None: ... 138 @__property__ 139 def precise_real(self) -> float: ... 140 @precise_real.setter 141 def precise_real(self, value: __T.Optional[float]) -> None: ... 142 @__property__ 143 def a_str(self) -> str: ... 144 @a_str.setter 145 def a_str(self, value: __T.Optional[str]) -> None: ... 146 @__property__ 147 def a_bytes(self) -> __T.Optional[bytes]: ... 148 @a_bytes.setter 149 def a_bytes(self, value: __T.Optional[bytes]) -> None: ... 150 151 152 def isUnion(self) -> bool: ... 153 def checkRequired(self) -> None: ... 154 def read(self, iprot: TProtocolBase) -> None: ... 155 @__T.overload 156 def readFromJson(self, json: __T.Dict[str, __T.Any], is_text: bool = ..., **kwargs: __T.Any) -> None: ... 157 @__T.overload 158 def readFromJson(self, json: str, is_text: bool = ..., **kwargs: __T.Any) -> None: ... 159 def write(self, oprot: TProtocolBase) -> None: ... 160 def __eq__(self, other: __T.Any) -> bool: ... 161 def __ne__(self, other: __T.Any) -> bool: ... 162 163 164class ComplexStruct: 165 thrift_spec: __T.Tuple[__T.Optional[__T.Tuple[int, int, str, __T.Any, __T.Optional[int], int]]] 166 thrift_field_annotations: __T.Dict[int, __T.Dict[str, str]] 167 thrift_struct_annotations: __T.Dict[str, str] 168 169 def __init__( 170 self, 171 structOne: __T.Optional[SimpleStruct] = ..., 172 structTwo: __T.Optional[SimpleStruct] = ..., 173 an_integer: __T.Optional[int] = ..., 174 name: __T.Optional[str] = ..., 175 an_enum: __T.Optional[AnEnum] = ..., 176 values: __T.Optional[__T.List[int]] = ..., 177 structs: __T.Optional[__T.List[SimpleStruct]] = ..., 178 amap: __T.Optional[__T.Dict[str, str]] = ..., 179 aset: __T.Optional[__T.Set[str]] = ..., 180 item: __T.Optional[simple.dependent.ttypes.Item] = ..., 181 from_PY_RESERVED_KEYWORD: __T.Optional[int] = ... 182 ) -> None: 183 ... 184 185 @__property__ 186 def structOne(self) -> SimpleStruct: ... 187 @structOne.setter 188 def structOne(self, value: __T.Optional[SimpleStruct]) -> None: ... 189 @__property__ 190 def structTwo(self) -> __T.Optional[SimpleStruct]: ... 191 @structTwo.setter 192 def structTwo(self, value: __T.Optional[SimpleStruct]) -> None: ... 193 @__property__ 194 def an_integer(self) -> int: ... 195 @an_integer.setter 196 def an_integer(self, value: __T.Optional[int]) -> None: ... 197 @__property__ 198 def name(self) -> str: ... 199 @name.setter 200 def name(self, value: __T.Optional[str]) -> None: ... 201 @__property__ 202 def an_enum(self) -> AnEnum: ... 203 @an_enum.setter 204 def an_enum(self, value: __T.Optional[AnEnum]) -> None: ... 205 @__property__ 206 def values(self) -> __T.List[int]: ... 207 @values.setter 208 def values(self, value: __T.Optional[__T.List[int]]) -> None: ... 209 @__property__ 210 def structs(self) -> __T.List[SimpleStruct]: ... 211 @structs.setter 212 def structs(self, value: __T.Optional[__T.List[SimpleStruct]]) -> None: ... 213 @__property__ 214 def amap(self) -> __T.Dict[str, str]: ... 215 @amap.setter 216 def amap(self, value: __T.Optional[__T.Dict[str, str]]) -> None: ... 217 @__property__ 218 def aset(self) -> __T.Set[str]: ... 219 @aset.setter 220 def aset(self, value: __T.Optional[__T.Set[str]]) -> None: ... 221 @__property__ 222 def item(self) -> simple.dependent.ttypes.Item: ... 223 @item.setter 224 def item(self, value: __T.Optional[simple.dependent.ttypes.Item]) -> None: ... 225 @__property__ 226 def from_PY_RESERVED_KEYWORD(self) -> int: ... 227 @from_PY_RESERVED_KEYWORD.setter 228 def from_PY_RESERVED_KEYWORD(self, value: __T.Optional[int]) -> None: ... 229 230 231 def isUnion(self) -> bool: ... 232 def checkRequired(self) -> None: ... 233 def read(self, iprot: TProtocolBase) -> None: ... 234 @__T.overload 235 def readFromJson(self, json: __T.Dict[str, __T.Any], is_text: bool = ..., **kwargs: __T.Any) -> None: ... 236 @__T.overload 237 def readFromJson(self, json: str, is_text: bool = ..., **kwargs: __T.Any) -> None: ... 238 def write(self, oprot: TProtocolBase) -> None: ... 239 def __eq__(self, other: __T.Any) -> bool: ... 240 def __ne__(self, other: __T.Any) -> bool: ... 241 242 243class UnionStruct: 244 thrift_spec: __T.Tuple[__T.Optional[__T.Tuple[int, int, str, __T.Any, __T.Optional[int], int]]] 245 thrift_field_annotations: __T.Dict[int, __T.Dict[str, str]] 246 thrift_struct_annotations: __T.Dict[str, str] 247 248 def __init__( 249 self, 250 is_a_bool: __T.Optional[bool] = ..., 251 some_string_goes_here: __T.Optional[str] = ..., 252 perhaps_a_big_int: __T.Optional[int] = ... 253 ) -> None: 254 ... 255 256 @__property__ 257 def is_a_bool(self) -> bool: ... 258 @is_a_bool.setter 259 def is_a_bool(self, value: __T.Optional[bool]) -> None: ... 260 @__property__ 261 def some_string_goes_here(self) -> str: ... 262 @some_string_goes_here.setter 263 def some_string_goes_here(self, value: __T.Optional[str]) -> None: ... 264 @__property__ 265 def perhaps_a_big_int(self) -> int: ... 266 @perhaps_a_big_int.setter 267 def perhaps_a_big_int(self, value: __T.Optional[int]) -> None: ... 268 269 def getType(self) -> int: ... 270 271 def get_is_a_bool(self) -> bool: ... 272 def set_is_a_bool(self, value: bool) -> None: ... 273 def get_some_string_goes_here(self) -> str: ... 274 def set_some_string_goes_here(self, value: str) -> None: ... 275 def get_perhaps_a_big_int(self) -> int: ... 276 def set_perhaps_a_big_int(self, value: int) -> None: ... 277 278 __EMPTY__: int = ... 279 IS_A_BOOL: int = ... 280 SOME_STRING_GOES_HERE: int = ... 281 PERHAPS_A_BIG_INT: int = ... 282 283 def isUnion(self) -> bool: ... 284 def checkRequired(self) -> None: ... 285 def read(self, iprot: TProtocolBase) -> None: ... 286 @__T.overload 287 def readFromJson(self, json: __T.Dict[str, __T.Any], is_text: bool = ..., **kwargs: __T.Any) -> None: ... 288 @__T.overload 289 def readFromJson(self, json: str, is_text: bool = ..., **kwargs: __T.Any) -> None: ... 290 def write(self, oprot: TProtocolBase) -> None: ... 291 def __eq__(self, other: __T.Any) -> bool: ... 292 def __ne__(self, other: __T.Any) -> bool: ... 293 294 295ListOfSimpleStructs = __T.List[SimpleStruct] 296