def deserialize(cls, value: serialization_model, inflator: Inflator) -> Pool: return Pool( inflator.inflate_all(Printing, value['printings']), ( Deck.deserialize(_value, inflator) for _value in value.get('decks', ()) ), )
def deserialize(cls, value: serialization_model, inflator: Inflator) -> Cube: return cls( cubeables = itertools.chain( inflator.inflate_all(Printing, value['printings']), ( Trap.deserialize(trap, inflator) for trap in value.get('traps', ()) ), ( Ticket.deserialize(ticket, inflator) for ticket in value.get('tickets', ()) ), ( Purple.deserialize(purple, inflator) for purple in value.get('purples', ()) ), ) )
def deserialize(cls, value: serialization_model, inflator: Inflator) -> 'Serializeable': return cls( ConstrainedNode.deserialize(value['before'], inflator), inflator.inflate_all(Printing, value['after']), )
def deserialize(cls, value: serialization_model, inflator: Inflator) -> CardboardTicket: return cls( inflator.inflate_all(Cardboard, value['options']), value['name'], )
def deserialize(cls, value: serialization_model, inflator: Inflator) -> Ticket: return cls( inflator.inflate_all(Printing, value['options']), value['name'], )
def deserialize(cls, value: serialization_model, inflator: Inflator) -> CardboardSet: return cls(inflator.inflate_all(Cardboard, value['cardboards']))
def deserialize(cls, value: serialization_model, inflator: Inflator) -> PrintingSet: return cls(inflator.inflate_all(Printing, value['printings']))