func deserializeAgentTaskPayload(log logger.T, agentMessage AgentMessage) (agentTaskPayload AgentTaskPayload, err error) {
	if agentMessage.MessageType != InteractiveShellMessage {
		err = errors.New("AgentMessage is not of type interactive_shell")
		return
	}
	whatstring := string(agentMessage.Payload)
	log.Debug(whatstring)

	var mgsPayload MGSPayload
	if err = json.Unmarshal(agentMessage.Payload, &mgsPayload); err != nil {
		log.Errorf("Could not deserialize rawMessage: %s", string(agentMessage.Payload))
	}

	// workaround to unmarshal the real payload (should be fixed from the service side)
	if err = json.Unmarshal([]byte(mgsPayload.Payload), &agentTaskPayload); err != nil {
		log.Errorf("Could not deserialize AgentTask payload rawMessage: %s", string(mgsPayload.Payload))
	}
	return
}
// deserializeAgentTaskPayload parses agent task message payloads received.
deserializeAgentTaskPayload parses agent task message payloads received.
// deserializeAgentTaskPayload parses agent task message payloads received .
func deserializeAgentTaskPayload(log logger.T, agentMessage AgentMessage) (agentTaskPayload AgentTaskPayload, err error) {
	if agentMessage.MessageType != InteractiveShellMessage {
		err = errors.New("AgentMessage is not of type interactive_shell")
		return
	}
	whatstring := string(agentMessage.Payload)
	log.Debug(whatstring)
	var mgsPayload MGSPayload
	if err = json.Unmarshal(agentMessage.Payload, &mgsPayload); err != nil {
		log.Errorf("Could not deserialize rawMessage: %s", string(agentMessage.Payload))
	}
	if err = json.Unmarshal([]byte(mgsPayload.Payload), &agentTaskPayload); err != nil {
		log.Errorf("Could not deserialize AgentTask payload rawMessage: %s", string(mgsPayload.Payload))
	}
	return
}
func deserializeAgentTaskPayload ( log logger . T , agentMessage AgentMessage ) ( agentTaskPayload AgentTaskPayload , err error ) { if agentMessage . MessageType != InteractiveShellMessage { err = errors . New ( " " ) return } whatstring := string ( agentMessage . Payload ) log . Debug ( whatstring ) var mgsPayload MGSPayload if err = json . Unmarshal ( agentMessage . Payload , & mgsPayload ) ; err != nil { log . Errorf ( " " , string ( agentMessage . Payload ) ) } if err = json . Unmarshal ( [ ] byte ( mgsPayload . Payload ) , & agentTaskPayload ) ; err != nil { log . Errorf ( " " , string ( mgsPayload . Payload ) ) } return }
deserializeAgentTaskPayload parses agent task message payloads received.
deserializeAgentTaskPayload parses agent task message payloads received .
// workaround to unmarshal the real payload (should be fixed from the service side)