func (g ServerGroup) IsStateless() bool {
	switch g {
	case ServerGroupCoordinators, ServerGroupSyncMasters, ServerGroupSyncWorkers:
		return true
	default:
		return false
	}
}
IsStateless returns true when the groups runs servers without a persistent volume.
package v2alpha1
import (
	"encoding/json"
	"time"
)
type ServerGroup int
func (g *ServerGroup) UnmarshalJSON(bytes []byte) error {
	if bytes == nil {
		*g = ServerGroupUnknown
		return nil
	}
	{
		var s int
		if err := json.Unmarshal(bytes, &s); err == nil {
			*g = ServerGroupFromRole(ServerGroup(s).AsRole())
			return nil
		}
	}
	var s string
	if err := json.Unmarshal(bytes, &s); err != nil {
		return err
	}
	*g = ServerGroupFromRole(s)
	return nil
}
func (g ServerGroup) MarshalJSON() ([]byte, error) {
	return json.Marshal(g.AsRole())
}
const (
	ServerGroupUnknown        ServerGroup = 0
	ServerGroupSingle         ServerGroup = 1
	ServerGroupAgents         ServerGroup = 2
	ServerGroupDBServers      ServerGroup = 3
	ServerGroupCoordinators   ServerGroup = 4
	ServerGroupSyncMasters    ServerGroup = 5
	ServerGroupSyncWorkers    ServerGroup = 6
	ServerGroupImageDiscovery ServerGroup = -1
	ServerGroupSingleString         = "single"
	ServerGroupAgentsString         = "agent"
	ServerGroupDBServersString      = "dbserver"
	ServerGroupCoordinatorsString   = "coordinator"
	ServerGroupSyncMastersString    = "syncmaster"
	ServerGroupSyncWorkersString    = "syncworker"
	ServerGroupImageDiscoveryString = "imagediscovery"
	ServerGroupSingleAbbreviatedString         = "sngl"
	ServerGroupAgentsAbbreviatedString         = "agnt"
	ServerGroupDBServersAbbreviatedString      = "prmr"
	ServerGroupCoordinatorsAbbreviatedString   = "crdn"
	ServerGroupSyncMastersAbbreviatedString    = "syma"
	ServerGroupSyncWorkersAbbreviatedString    = "sywo"
	ServerGroupImageDiscoveryAbbreviatedString = "id"
)
var (
	AllServerGroups = []ServerGroup{
		ServerGroupAgents,
		ServerGroupSingle,
		ServerGroupDBServers,
		ServerGroupCoordinators,
		ServerGroupSyncMasters,
		ServerGroupSyncWorkers,
	}
)
func (g ServerGroup) AsRole() string {
	switch g {
	case ServerGroupSingle:
		return ServerGroupSingleString
	case ServerGroupAgents:
		return ServerGroupAgentsString
	case ServerGroupDBServers:
		return ServerGroupDBServersString
	case ServerGroupCoordinators:
		return ServerGroupCoordinatorsString
	case ServerGroupSyncMasters:
		return ServerGroupSyncMastersString
	case ServerGroupSyncWorkers:
		return ServerGroupSyncWorkersString
	default:
		return "?"
	}
}
func (g ServerGroup) AsRoleAbbreviated() string {
	switch g {
	case ServerGroupSingle:
		return ServerGroupSingleAbbreviatedString
	case ServerGroupAgents:
		return ServerGroupAgentsAbbreviatedString
	case ServerGroupDBServers:
		return ServerGroupDBServersAbbreviatedString
	case ServerGroupCoordinators:
		return ServerGroupCoordinatorsAbbreviatedString
	case ServerGroupSyncMasters:
		return ServerGroupSyncMastersAbbreviatedString
	case ServerGroupSyncWorkers:
		return ServerGroupSyncWorkersAbbreviatedString
	default:
		return "?"
	}
}
func (g ServerGroup) DefaultTerminationGracePeriod() time.Duration {
	switch g {
	case ServerGroupSingle:
		return time.Minute
	case ServerGroupAgents:
		return time.Minute
	case ServerGroupDBServers:
		return time.Hour
	default:
		return time.Second * 30
	}
}