// taskNodeID formulates the node ID for a dag task
552289
func (d *dagContext) taskNodeID(taskName string) string {
	nodeName := d.taskNodeName(taskName)
	return d.wf.NodeID(nodeName)
}
560002
func (d *dcosInfo) TaskCanonicalID(ctx context.Context, task string, completed bool) (*CanonicalTaskID, error) {
	state, err := d.state(ctx)
	if err != nil {
		return nil, err
	}

	frameworksTasks := findTask(task, completed, state.Frameworks)

	var completedFrameworksTasks []Task
	if completed {
		completedFrameworksTasks = findTask(task, completed, state.CompletedFrameworks)
	}

	foundTasks := append(frameworksTasks, completedFrameworksTasks...)

	if len(foundTasks) == 0 {
		return nil, ErrTaskNotFound
	} else if len(foundTasks) > 1 {
		var taskIDs []string
		for _, task := range foundTasks {
			taskIDs = append(taskIDs, task.ID)
		}
		return nil, fmt.Errorf("found more then 1 task with name %s: %s", task, taskIDs)
	}

	t := foundTasks[0]
	containerIDs, err := t.ContainerIDs()
	if err != nil {
		return nil, err
	}

	return &CanonicalTaskID{
		ID:           t.ID,
		AgentID:      t.SlaveID,
		FrameworkID:  t.FrameworkID,
		ExecutorID:   t.ExecutorID,
		ContainerIDs: containerIDs,
	}, nil
}
418000
func (a *HighlightNodeArgs) SetNodeID(nodeID dom.NodeID) *HighlightNodeArgs {
	a.NodeID = &nodeID
	return a
}
1293495
func (a *GetContentQuadsArgs) SetNodeID(nodeID NodeID) *GetContentQuadsArgs {
	a.NodeID = &nodeID
	return a
}
1088329
func (s *TasksCancelService) NodeId(nodeId ...string) *TasksCancelService {
	s.nodeId = append(s.nodeId, nodeId...)
	return s
}
1148159
func (a *DescribeNodeArgs) SetNodeID(nodeID NodeID) *DescribeNodeArgs {
	a.NodeID = &nodeID
	return a
}
219214
func (p *PullRequestReview) GetNodeID() string {
	if p == nil || p.NodeID == nil {
		return ""
	}
	return *p.NodeID
}
382187
func (g *GistCommit) GetNodeID() string {
	if g == nil || g.NodeID == nil {
		return ""
	}
	return *g.NodeID
}
725717
func (p *ProjectCard) GetNodeID() string {
	if p == nil || p.NodeID == nil {
		return ""
	}
	return *p.NodeID
}
964001
func (r *Repository) GetNodeID() string {
	if r == nil || r.NodeID == nil {
		return ""
	}
	return *r.NodeID
}
337205
func (i *Invitation) GetNodeID() string {
	if i == nil || i.NodeID == nil {
		return ""
	}
	return *i.NodeID
}
1296234
func (s *Scheduler) taskFitNode(ctx context.Context, t *api.Task, nodeID string) *api.Task {
	nodeInfo, err := s.nodeSet.nodeInfo(nodeID)
	if err != nil {
		// node does not exist in set (it may have been deleted)
		return nil
	}
	newT := *t
	s.pipeline.SetTask(t)
	if !s.pipeline.Process(&nodeInfo) {
		// this node cannot accommodate this task
		newT.Status.Timestamp = ptypes.MustTimestampProto(time.Now())
		newT.Status.Err = s.pipeline.Explain()
		s.allTasks[t.ID] = &newT

		return &newT
	}
	newT.Status = api.TaskStatus{
		State:     api.TaskStateAssigned,
		Timestamp: ptypes.MustTimestampProto(time.Now()),
		Message:   "scheduler confirmed task can run on preassigned node",
	}
	s.allTasks[t.ID] = &newT

	if nodeInfo.addTask(&newT) {
		s.nodeSet.updateNode(nodeInfo)
	}
	return &newT
}
464526
func (b *Blob) GetNodeID() string {
	if b == nil || b.NodeID == nil {
		return ""
	}
	return *b.NodeID
}
615308
func (s *RebootNodeInput) SetNodeId(v string) *RebootNodeInput {
	s.NodeId = &v
	return s
}
1314233
func (a *App) GetNodeID() string {
	if a == nil || a.NodeID == nil {
		return ""
	}
	return *a.NodeID
}
1058101
func (a *FocusArgs) SetNodeID(nodeID NodeID) *FocusArgs {
	a.NodeID = &nodeID
	return a
}
583909
func (d *DiscussionComment) GetNodeID() string {
	if d == nil || d.NodeID == nil {
		return ""
	}
	return *d.NodeID
}