@classmethod
def read(cls, iprot):
    """
        Read a new object from the given input protocol and return the object.

        :type iprot: thryft.protocol._input_protocol._InputProtocol
        :rtype: pastpy.gen.database.impl.dummy.dummy_database_configuration.DummyDatabaseConfiguration
        """
    init_kwds = {}
    iprot.read_struct_begin()
    while True:
        ifield_name, ifield_type, _ifield_id = iprot.read_field_begin()
        if ifield_type == 0:
            break
        elif ifield_name == 'images_per_object':
            init_kwds['images_per_object'] = iprot.read_i32()
        elif ifield_name == 'objects':
            init_kwds['objects'] = iprot.read_i32()
        iprot.read_field_end()
    iprot.read_struct_end()
    return cls(**init_kwds)
