// GroupFn add a function to be called in every group message.
433975
func (bot *TgBot) GroupFn(f func(TgBot, Message, int, string)) *TgBot {
	bot.addToConditionalFuncs(GroupConditionalCall{f})
	return bot
}
834908
func (g *Group) PrintFunc(f func(*Group)) *Statement {
	s := PrintFunc(f)
	g.items = append(g.items, s)
	return s
}
1315638
func ToGroupMode(fluxMode functions.GroupMode) GroupMode {
	switch fluxMode {
	case functions.GroupModeNone:
		return GroupModeDefault
	case functions.GroupModeBy:
		return GroupModeBy
	case functions.GroupModeExcept:
		return GroupModeExcept
	default:
		panic(fmt.Sprint("unknown group mode: ", fluxMode))
	}
}
1080482
func Fn(name string, paramNames ...string) *Func {
	return &Func{
		Name:       name,
		ParamNames: paramNames,
	}
}
419572
func (g *Group) SwitchFunc(f func(*Group)) *Statement {
	s := SwitchFunc(f)
	g.items = append(g.items, s)
	return s
}
428104
func (s *Group) SetGroupArn(v string) *Group {
	s.GroupArn = &v
	return s
}
752129
func (bot *TgBot) DocumentFn(f func(TgBot, Message, Document, string)) *TgBot {
	bot.addToConditionalFuncs(DocumentConditionalCall{f})
	return bot
}
1047289
func (g *Group) PrintlnFunc(f func(*Group)) *Statement {
	s := PrintlnFunc(f)
	g.items = append(g.items, s)
	return s
}
222533
func (s *GetGroupInput) SetGroupARN(v string) *GetGroupInput {
	s.GroupARN = &v
	return s
}
395533
func GroupVersionsForGroup(group string) []unversioned.GroupVersion {
	ret := []unversioned.GroupVersion{}
	for _, v := range RegisteredGroupVersions {
		if v.Group == group {
			ret = append(ret, v)
		}
	}
	return ret
}
1051059
func (bot *TgBot) RegexFn(path string, f func(TgBot, Message, []string, map[string]string) *string) *TgBot {
	r := regexp.MustCompile(path)

	bot.addToConditionalFuncs(TextConditionalCall{RegexCommand{r, f}})
	return bot
}
829173
func (f Firewall) globalGroupName() string {
	return fmt.Sprintf("juju-%s-global", f.environ.Config().UUID())
}
255543
func PanicFunc(err error, f fn, message string, args ...interface{}) {
	if err != nil {
		f()
		logger.Printf(message+"\n", args...)
		panic(err)
	}
}
1255841
func (bot *TgBot) AnyMsgFn(f func(TgBot, Message)) *TgBot {
	bot.addToConditionalFuncs(CustomCall{AlwaysReturnTrue, f})
	return bot
}
951175
func (g *Group) DefsFunc(f func(*Group)) *Statement {
	s := DefsFunc(f)
	g.items = append(g.items, s)
	return s
}
518782
func (m *Method) FQMN() string {
	components := []string{}
	components = append(components, m.Service.FQSN())
	components = append(components, m.GetName())
	return strings.Join(components, ".")
}
586536
func (m *Message) FQMN() string {
	components := []string{""}
	if m.File.Package != nil {
		components = append(components, m.File.GetPackage())
	}
	components = append(components, m.Outers...)
	components = append(components, m.GetName())
	return strings.Join(components, ".")
}