func (ds DeploymentStatusMembers) MemberStatusByPVCName(pvcName string) (MemberStatus, ServerGroup, bool) {
	if result, found := ds.Single.ElementByPVCName(pvcName); found {
		return result, ServerGroupSingle, true
	}
	if result, found := ds.Agents.ElementByPVCName(pvcName); found {
		return result, ServerGroupAgents, true
	}
	if result, found := ds.DBServers.ElementByPVCName(pvcName); found {
		return result, ServerGroupDBServers, true
	}
	return MemberStatus{}, 0, false
}
MemberStatusByPVCName returns a reference to the element in the given set of lists that has the given PVC name.
If no such element exists, nil is returned.
package v2alpha1
import (
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
)
type DeploymentStatusMembers struct {
	Single       MemberStatusList `json:"single,omitempty"`
	Agents       MemberStatusList `json:"agents,omitempty"`
	DBServers    MemberStatusList `json:"dbservers,omitempty"`
	Coordinators MemberStatusList `json:"coordinators,omitempty"`
	SyncMasters  MemberStatusList `json:"syncmasters,omitempty"`
	SyncWorkers  MemberStatusList `json:"syncworkers,omitempty"`
}
func (ds DeploymentStatusMembers) Equal(other DeploymentStatusMembers) bool {
	return ds.Single.Equal(other.Single) &&
		ds.Agents.Equal(other.Agents) &&
		ds.DBServers.Equal(other.DBServers) &&
		ds.Coordinators.Equal(other.Coordinators) &&
		ds.SyncMasters.Equal(other.SyncMasters) &&
		ds.SyncWorkers.Equal(other.SyncWorkers)
}
func (ds DeploymentStatusMembers) ContainsID(id string) bool {
	return ds.Single.ContainsID(id) ||
		ds.Agents.ContainsID(id) ||
		ds.DBServers.ContainsID(id) ||
		ds.Coordinators.ContainsID(id) ||
		ds.SyncMasters.ContainsID(id) ||
		ds.SyncWorkers.ContainsID(id)
}
func (ds DeploymentStatusMembers) ElementByID(id string) (MemberStatus, ServerGroup, bool) {
	if result, found := ds.Single.ElementByID(id); found {
		return result, ServerGroupSingle, true
	}
	if result, found := ds.Agents.ElementByID(id); found {
		return result, ServerGroupAgents, true
	}
	if result, found := ds.DBServers.ElementByID(id); found {
		return result, ServerGroupDBServers, true
	}
	if result, found := ds.Coordinators.ElementByID(id); found {
		return result, ServerGroupCoordinators, true
	}
	if result, found := ds.SyncMasters.ElementByID(id); found {
		return result, ServerGroupSyncMasters, true
	}
	if result, found := ds.SyncWorkers.ElementByID(id); found {
		return result, ServerGroupSyncWorkers, true
	}
	return MemberStatus{}, 0, false
}
func (ds DeploymentStatusMembers) ForeachServerGroup(cb func(group ServerGroup, list MemberStatusList) error) error {
	return ds.ForeachServerInGroups(cb, AllServerGroups...)
}
func (ds DeploymentStatusMembers) ForeachServerInGroups(cb func(group ServerGroup, list MemberStatusList) error, groups ...ServerGroup) error {
	for _, group := range groups {
		if err := ds.ForServerGroup(cb, group); err != nil {
			return err
		}
	}
	return nil
}
func (ds DeploymentStatusMembers) ForServerGroup(cb func(group ServerGroup, list MemberStatusList) error, group ServerGroup) error {
	switch group {
	case ServerGroupSingle:
		if err := cb(ServerGroupSingle, ds.Single); err != nil {
			return errors.WithStack(err)
		}
	case ServerGroupAgents:
		if err := cb(ServerGroupAgents, ds.Agents); err != nil {
			return errors.WithStack(err)
		}
	case ServerGroupDBServers:
		if err := cb(ServerGroupDBServers, ds.DBServers); err != nil {
			return errors.WithStack(err)
		}
	case ServerGroupCoordinators:
		if err := cb(ServerGroupCoordinators, ds.Coordinators); err != nil {
			return errors.WithStack(err)
		}
	case ServerGroupSyncMasters:
		if err := cb(ServerGroupSyncMasters, ds.SyncMasters); err != nil {
			return errors.WithStack(err)
		}
	case ServerGroupSyncWorkers:
		if err := cb(ServerGroupSyncWorkers, ds.SyncWorkers); err != nil {
			return errors.WithStack(err)
		}
	}
	return nil
}
func (ds DeploymentStatusMembers) MemberStatusByPodName(podName string) (MemberStatus, ServerGroup, bool) {
	if result, found := ds.Single.ElementByPodName(podName); found {
		return result, ServerGroupSingle, true
	}
	if result, found := ds.Agents.ElementByPodName(podName); found {
		return result, ServerGroupAgents, true
	}
	if result, found := ds.DBServers.ElementByPodName(podName); found {
		return result, ServerGroupDBServers, true
	}
	if result, found := ds.Coordinators.ElementByPodName(podName); found {
		return result, ServerGroupCoordinators, true
	}
	if result, found := ds.SyncMasters.ElementByPodName(podName); found {
		return result, ServerGroupSyncMasters, true
	}
	if result, found := ds.SyncWorkers.ElementByPodName(podName); found {
		return result, ServerGroupSyncWorkers, true
	}
	return MemberStatus{}, 0, false
}