You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dm_cluster_condition_updater.go
    path of file: ./repos/tidb-operator/pkg/controller/dmcluster
    
    the code of the file until where you have to start completion: // Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.

package dmcluster

import (
	"github.com/pingcap
    
func (u *dmClusterConditionUpdater) updateReadyCondition(dc *v1alpha1.DMCluster) {
	status := v1.ConditionFalse
	reason := ""
	message := ""

	switch {
	case !allStatefulSetsAreUpToDate(dc):
		reason = utildmcluster.StatfulSetNotUpToDate
		message = "Statefulset(s) are in progress"
	case !dc.MasterAllMembersReady():
		reason = utildmcluster.MasterUnhealthy
		message = "dm-master(s) are not healthy"
	case !dc.WorkerAllMembersReady():
		reason = utildmcluster.MasterUnhealthy
		message = "some dm-worker(s) are not up yet"
	default:
		status = v1.ConditionTrue
		reason = utildmcluster.Ready
		message = "DM cluster is fully up and running"
	}
	cond := utildmcluster.NewDMClusterCondition(v1alpha1.DMClusterReady, status, reason, message)
	utildmcluster.SetDMClusterCondition(&dc.Status, *cond)
}