syft.core.node.common.action.get_object_action

Classes

GetObjectAction(id_at_location, address, ...)

This kind of action is used when a Node wants to get an object located on another Node.

GetObjectResponseMessage(obj, address[, msg_id])

GetObjectResponseMessages are the type of messages that are sent in reponse to a GetObjectAction.

class syft.core.node.common.action.get_object_action.GetObjectResponseMessage(obj, address, msg_id=None)[source]

Bases: syft.core.common.message.ImmediateSyftMessageWithoutReply

GetObjectResponseMessages are the type of messages that are sent in reponse to a GetObjectAction. They contain the object that was asked for.

obj

the object being sent back to the asker.

static get_protobuf_schema()[source]

Return the type of protobuf object which stores a class of this type

As a part of serialization and deserialization, we need the ability to lookup the protobuf object type directly from the object type. This static method allows us to do this.

Importantly, this method is also used to create the reverse lookup ability within the metaclass of Serializable. In the metaclass, it calls this method and then it takes whatever type is returned from this method and adds an attribute to it with the type of this class attached to it. See the MetaSerializable class for details.

Returns

the type of protobuf object which corresponds to this class.

Return type

GeneratedProtocolMessageType

class syft.core.node.common.action.get_object_action.GetObjectAction(id_at_location, address, reply_to, msg_id=None, delete_obj=True)[source]

Bases: syft.core.node.common.action.common.ImmediateActionWithReply

This kind of action is used when a Node wants to get an object located on another Node.

The Node receiving this action first check that the asker does have the permission to fetch the object he asked for. If it’s the case, a GetObjectResponseMessage containing the object is sent back to the asker.

id_at_location

the pointer id of the object asked for.

static get_protobuf_schema()[source]

Return the type of protobuf object which stores a class of this type

As a part of serialization and deserialization, we need the ability to lookup the protobuf object type directly from the object type. This static method allows us to do this.

Importantly, this method is also used to create the reverse lookup ability within the metaclass of Serializable. In the metaclass, it calls this method and then it takes whatever type is returned from this method and adds an attribute to it with the type of this class attached to it. See the MetaSerializable class for details.

Returns

the type of protobuf object which corresponds to this class.

Return type

GeneratedProtocolMessageType