func buildDocumentInfo(
	agentMessage AgentMessage,
	sessionId string,
	parsedMessagePayload AgentTaskPayload,
	instanceId string) contracts.DocumentInfo {

	// DocumentID is a unique name for file system
	// For Session, DocumentID = SessionID
	return contracts.DocumentInfo{
		CommandID:      sessionId,
		CreatedDate:    time.Unix(int64(agentMessage.CreatedDate), 0).String(),
		DocumentID:     sessionId,
		InstanceID:     instanceId,
		MessageID:      sessionId,
		RunID:          times.ToIsoDashUTC(times.DefaultClock.Now()),
		DocumentName:   parsedMessagePayload.DocumentName,
		DocumentStatus: contracts.ResultStatusInProgress,
		RunAsUser:      parsedMessagePayload.RunAsUser,
	}
}
// buildDocumentInfo builds new DocumentInfo object
buildDocumentInfo builds new DocumentInfo object
// buildDocumentInfo builds new DocumentInfo object
func buildDocumentInfo(
	agentMessage AgentMessage,
	sessionId string,
	parsedMessagePayload AgentTaskPayload,
	instanceId string) contracts.DocumentInfo {
	return contracts.DocumentInfo{
		CommandID:      sessionId,
		CreatedDate:    time.Unix(int64(agentMessage.CreatedDate), 0).String(),
		DocumentID:     sessionId,
		InstanceID:     instanceId,
		MessageID:      sessionId,
		RunID:          times.ToIsoDashUTC(times.DefaultClock.Now()),
		DocumentName:   parsedMessagePayload.DocumentName,
		DocumentStatus: contracts.ResultStatusInProgress,
		RunAsUser:      parsedMessagePayload.RunAsUser,
	}
}
func buildDocumentInfo ( agentMessage AgentMessage , sessionId string , parsedMessagePayload AgentTaskPayload , instanceId string ) contracts . DocumentInfo { return contracts . DocumentInfo { CommandID : sessionId , CreatedDate : time . Unix ( int64 ( agentMessage . CreatedDate ) , 0 ) . String ( ) , DocumentID : sessionId , InstanceID : instanceId , MessageID : sessionId , RunID : times . ToIsoDashUTC ( times . DefaultClock . Now ( ) ) , DocumentName : parsedMessagePayload . DocumentName , DocumentStatus : contracts . ResultStatusInProgress , RunAsUser : parsedMessagePayload . RunAsUser , } }
buildDocumentInfo builds new DocumentInfo object
buildDocumentInfo builds new DocumentInfo object
// DocumentID is a unique name for file system // For Session, DocumentID = SessionID