// NewSuggesterCategoryQuery creates a new SuggesterCategoryQuery.
503865
func NewSuggesterCategoryQuery(name string, values ...string) *SuggesterCategoryQuery {
	q := &SuggesterCategoryQuery{
		name:   name,
		values: make([]string, 0),
	}
	if len(values) > 0 {
		q.values = append(q.values, values...)
	}
	return q
}
597529
func NewSearchInContentArgs(scriptID runtime.ScriptID, query string) *SearchInContentArgs {
	args := new(SearchInContentArgs)
	args.ScriptID = scriptID
	args.Query = query
	return args
}
816529
func filterCategory(flags []cli.Flag, category string) (ret []cli.Flag) {
	for _, f := range flags {
		if flagCategories[f.GetName()] == category {
			ret = append(ret, f)
		}
	}
	return
}
1214307
func (c *Client) Suggest(indices ...string) *SuggestService {
	builder := NewSuggestService(c)
	builder.Indices(indices...)
	return builder
}
787491
func (h *SMTPAPIHeader) AddCategories(categories []string) {
	for i := 0; i < len(categories); i++ {
		h.AddCategory(categories[i])
	}
}
715678
func NewSampleQueryBuilderWithKind(kind string) *SampleQueryBuilder {
	q := datastore.NewQuery(kind)
	bldr := &SampleQueryBuilder{q: q}
	bldr.ID = &SampleQueryProperty{
		bldr: bldr,
		name: "__key__",
	}
	bldr.FooUrl = &SampleQueryProperty{
		bldr: bldr,
		name: "FooURL",
	}
	bldr.StartAt = &SampleQueryProperty{
		bldr: bldr,
		name: "Start",
	}
	bldr.LimitProperty = &SampleQueryProperty{
		bldr: bldr,
		name: "Limit",
	}
	bldr.CreatedAt = &SampleQueryProperty{
		bldr: bldr,
		name: "CreatedAt",
	}

	if plugger, ok := interface{}(bldr).(qbgutils.Plugger); ok {
		bldr.plugin = plugger.Plugin()
		bldr.plugin.Init("Sample")
	}

	return bldr
}
1328224
func (s *DashPackage) SetSuggestedPresentationDelaySeconds(v int64) *DashPackage {
	s.SuggestedPresentationDelaySeconds = &v
	return s
}
726434
func (s *CreatePresetInput) SetCategory(v string) *CreatePresetInput {
	s.Category = &v
	return s
}
628331
func NewSuggesterCategoryMapping(name string) *SuggesterCategoryMapping {
	return &SuggesterCategoryMapping{
		name:          name,
		defaultValues: make([]string, 0),
	}
}
144505
func (s *DescribeSuggestersOutput) SetSuggesters(v []*SuggesterStatus) *DescribeSuggestersOutput {
	s.Suggesters = v
	return s
}
997210
func (s *DeleteSuggesterOutput) SetSuggester(v *SuggesterStatus) *DeleteSuggesterOutput {
	s.Suggester = v
	return s
}
1329732
func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel {
	s.Suggestions = v
	return s
}
1344515
func (m Manager) EventCategory(ctx context.Context, event types.BaseEvent) (string, error) {
	// Most of the event details are included in the Event.FullFormattedMessage, but the category
	// is only available via the EventManager description.eventInfo property.  The value of this
	// property is static, so we fetch and once and cache.
	eventCategory, err := m.eventCategoryMap(ctx)
	if err != nil {
		return "", err
	}

	switch e := event.(type) {
	case *types.EventEx:
		if e.Severity == "" {
			return "info", nil
		}
		return e.Severity, nil
	}

	class := reflect.TypeOf(event).Elem().Name()

	return eventCategory[class], nil
}
1096784
func NewSrvURLKey(u *url.URL) SrvURLKey {
	return SrvURLKey{scheme: u.Scheme, host: u.Host}
}
699797
func (model *Model) SpellCheckSuggestions(input string, n int) []string {
	model.RLock()
	suggestions := model.suggestPotential(input, true)
	model.RUnlock()
	return bestn(input, suggestions, n)
}
536124
func NewTermSuggester(name string) TermSuggester {
	return TermSuggester{
		name:           name,
		contextQueries: make([]SuggesterContextQuery, 0),
	}
}
338247
func NewSearchRequestBuilder(version int, interval tsdb.Interval) *SearchRequestBuilder {
	builder := &SearchRequestBuilder{
		version:     version,
		interval:    interval,
		sort:        make(map[string]interface{}),
		customProps: make(map[string]interface{}),
		aggBuilders: make([]AggBuilder, 0),
	}
	return builder
}