class Sub(model.Model): s = model.String(thrift_id=1) def __eq__(self, other): if self and other: return self.s == other.s else: return not self and not other
class A(model.RootObjectModel): s = model.String(thrift_id=1) i = model.Integer(thrift_id=2) f = model.Float(thrift_id=3) bt = model.Boolean(thrift_id=4) bf = model.Boolean(thrift_id=5) def __eq__(self, other): return self.s == other.s and self.i == other.i and self.f == other.f
class Parent(model.RootObjectModel): s = model.String(thrift_id=1) b = model.Object(Sub, thrift_id=2) def __eq__(self, other): return self.s == other.s and self.b == other.b
class Company(model.RootObjectModel): name = model.String(thrift_id=1) url = model.String(thrift_id=2) employees = model.List(model.Object(Employee), thrift_id=3)
class Employee(model.Model): first_name = model.String(thrift_id=1) last_name = model.String(thrift_id=2) email_addresses = model.List(model.String(), thrift_id=3) address = model.Object(Address, thrift_id=4)
class Address(model.Model): street = model.String(thrift_id=1) number = model.Integer(thrift_id=2) postal_code = model.Integer(thrift_id=3) city = model.String(thrift_id=4)
class BarModel(model.Model): baz = model.String(thrift_id=1)
class B(model.RootObjectModel): s = model.String(thrift_id=1)
class Simple(base): i = model.Integer() s = model.String() b = model.Boolean()