def METHOD_NAME(self):
    """
    This function serialize the object to dict.
    Returns:
        Dict of elements contained into the object.
    """
    return {
        'entity_id' : self.getEntity_id(),
        'description' : self.getDescription(),
        'sub_packages' : self.getSub_packages(),
        'id': self.getUuid(),
        'pk_id': self.getId(),
        'commands':{
            'postCommandSuccess': {
                'command': self.getPostCommandSuccess_command(),
                'name': self.getPostCommandSuccess_name()
            },
            'installInit':{
                'command': self.getInstallInit_command(),
                'name': self.getInstallInit_name()
            },
            "postCommandFailure": {
                "command": self.getPostCommandFailure_command(),
                "name": self.getPostCommandFailure_name(),
            },
            "command": {
                "command": self.getCommand_command(),
                "name": self.getCommand_name(),
            },
            "preCommand": {
                "command": self.getPreCommand_command(),
                "name": self.getPreCommand_name()
            }
        },
        'name': self.getLabel(),
        'targetos': self.getOs(),
        'reboot': self.getReboot(),
        'version': self.getVersion(),
        'inventory': {
            'associateinventory': self.getInventory_associateinventory(),
            'licenses': self.getInventory_licenses(),
            "queries": {
                "Qversion": self.getQversion(),
                "Qvendor": self.getQvendor(),
                "boolcnd": self.getBoolcnd(),
                "Qsoftware": self.getQsoftware()
            },
            "metagenerator": self.getMetaGenerator()
        },
        "pkgs_share_id": self.getpkgs_share_id(),
        "edition_status": self.getedition_status(),
        "conf_json": self.getconf_json(),
        "size": self.getsize()
    }