/* --- List functions --- */
// NewList creates a new List. Lists are ordered.
519331
func NewList(host *Host, name string) (*List, error) {
	l := &List{host, pq.QuoteIdentifier(name)} // name is the name of the table
	if _, err := l.host.db.Exec(fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (id SERIAL PRIMARY KEY, %s %s)", l.table, listCol, defaultStringType)); err != nil {
		if !strings.HasSuffix(err.Error(), "already exists") {
			return nil, err
		}
	}
	if Verbose {
		log.Println("Created table " + l.table + " in database " + host.dbname)
	}
	return l, nil
}
254487
func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
	s := new(ListTemplateResult)
	s.TemplateIds = TemplateIds
	return s
}
386468
func (s String) List() []string {
	res := make(sortableSliceOfString, 0, len(s))
	for key := range s {
		res = append(res, key)
	}
	sort.Sort(res)
	return []string(res)
}
991675
func (s *Set) List() []interface{} {
	result := make([]interface{}, len(s.m))
	for i, k := range s.listCode() {
		result[i] = s.m[k]
	}

	return result
}
1063183
func NewListOptsRef(values *[]string, validator ValidatorFctType) *ListOpts {
	return &ListOpts{
		values:    values,
		validator: validator,
	}
}
853871
func (s *SyncedSet) List() *[]interface{} {
	s.RLock()
	defer s.RUnlock()
	i := 0
	l := make([]interface{}, s.Len())
	for k := range s.set {
		l[i] = k
		i++
	}
	return &l
}
371050
func (s *VMGroupService) NewListInstanceGroupsParams() *ListInstanceGroupsParams {
	p := &ListInstanceGroupsParams{}
	p.p = make(map[string]interface{})
	return p
}
1055288
func (c oauthClient) CreateList(title string) (wl.List, error) {
	if title == "" {
		return wl.List{}, fmt.Errorf("title must be non-empty")
	}

	url := fmt.Sprintf("%s/lists", c.apiURL)
	body := []byte(fmt.Sprintf(`{"title":"%s"}`, title))

	req, err := c.newPostRequest(url, body)
	if err != nil {
		return wl.List{}, err
	}

	resp, err := c.do(req)
	if err != nil {
		return wl.List{}, err
	}

	if resp.StatusCode != http.StatusCreated {
		return wl.List{}, fmt.Errorf("Unexpected response code %d - expected %d", resp.StatusCode, http.StatusCreated)
	}

	list := wl.List{}
	err = json.NewDecoder(resp.Body).Decode(&list)
	if err != nil {
		return wl.List{}, err
	}
	return list, nil
}
79045
func (s *NuageVSPService) NewListNuageVspDevicesParams() *ListNuageVspDevicesParams {
	p := &ListNuageVspDevicesParams{}
	p.p = make(map[string]interface{})
	return p
}
331687
func (s *GuestOSService) NewListOsTypesParams() *ListOsTypesParams {
	p := &ListOsTypesParams{}
	p.p = make(map[string]interface{})
	return p
}
153645
func (r *UnitsService) List() *UnitsListCall {
	c := &UnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
817880
func NewOptionList(permissibleOptions []string, defaultOptions string) (*OptionList, error) {
	permissible := make(map[string]struct{})
	ol := &OptionList{
		allOptions:  permissibleOptions,
		permissible: permissible,
		typeName:    "OptionList",
	}

	for _, o := range permissibleOptions {
		ol.permissible[o] = struct{}{}
	}

	if err := ol.Set(defaultOptions); err != nil {
		return nil, errwrap.Wrap(errors.New("problem setting defaults"), err)
	}

	return ol, nil
}
661439
func NewUseList(UseType node.Node, Uses []node.Node) *UseList {
	return &UseList{
		FreeFloating: nil,
		UseType:      UseType,
		Uses:         Uses,
	}
}
854377
func List(args ...cty.Value) (cty.Value, error) {
	return ListFunc.Call(args)
}
263375
func NewListPolicy(order ListOrderType, flags int) *ListPolicy {
	return &ListPolicy{
		attributes: order,
		flags:      flags,
	}
}
55570
func (c *FakeExamples) List(opts v1.ListOptions) (result *crv1.ExampleList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(examplesResource, examplesKind, c.ns, opts), &crv1.ExampleList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &crv1.ExampleList{ListMeta: obj.(*crv1.ExampleList).ListMeta}
	for _, item := range obj.(*crv1.ExampleList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
1307131
func (s *PlansService) List(ctx context.Context, opt *PlansListOpts) (*plan.PlanList, error) {
	planList := &plan.PlanList{}
	return planList, s.client.List(ctx, plansUrl, opt, planList)
}