// setAgentStatus sets the unit's status if it has changed since last time this method was called.
507297
func setAgentStatus(u *Uniter, agentStatus status.Status, info string, data map[string]interface{}) error {
	u.setStatusMutex.Lock()
	defer u.setStatusMutex.Unlock()
	if u.lastReportedStatus == agentStatus && u.lastReportedMessage == info {
		return nil
	}
	u.lastReportedStatus = agentStatus
	u.lastReportedMessage = info
	logger.Debugf("[AGENT-STATUS] %s: %s", agentStatus, info)
	return u.unit.SetAgentStatus(agentStatus, info, data)
}
1192922
func (s *DocumentVersionInfo) SetStatus(v string) *DocumentVersionInfo {
	s.Status = &v
	return s
}
739655
func (s *ListMembersInput) SetStatus(v string) *ListMembersInput {
	s.Status = &v
	return s
}
358039
func (s *ReplicationTask) SetStatus(v string) *ReplicationTask {
	s.Status = &v
	return s
}
593541
func (s *StackSetOperation) SetStatus(v string) *StackSetOperation {
	s.Status = &v
	return s
}
799787
func (s *CreateBotVersionOutput) SetStatus(v string) *CreateBotVersionOutput {
	s.Status = &v
	return s
}
851991
func (s *Suite) SetStatus(v string) *Suite {
	s.Status = &v
	return s
}
1364203
func (s *SecurityGroupMembership) SetStatus(v string) *SecurityGroupMembership {
	s.Status = &v
	return s
}
1368264
func (s *ListBuildsInput) SetStatus(v string) *ListBuildsInput {
	s.Status = &v
	return s
}
335052
func (c *contextUnit) AgentStatus() (status.StatusInfo, error) {
	return c.context.status.UnitAgent(c.Name())
}
643220
func (s *RefreshTrustedAdvisorCheckOutput) SetStatus(v *TrustedAdvisorCheckRefreshStatus) *RefreshTrustedAdvisorCheckOutput {
	s.Status = v
	return s
}
765000
func (s *ComplianceItemEntry) SetStatus(v string) *ComplianceItemEntry {
	s.Status = &v
	return s
}
700372
func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
	s.Status = &v
	return s
}
314423
func (s *Accelerator) SetStatus(v string) *Accelerator {
	s.Status = &v
	return s
}
1312572
func (s *StatusAPI) SetStatus(args params.SetStatus) (params.ErrorResults, error) {
	return s.SetAgentStatus(args)
}
585119
func (s *ResourceShareAssociation) SetStatus(v string) *ResourceShareAssociation {
	s.Status = &v
	return s
}
845071
func (s *VirtualServiceData) SetStatus(v *VirtualServiceStatus) *VirtualServiceData {
	s.Status = v
	return s
}