// ListRequest returns itself
517426
func (ls *ListVirtualMachines) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
286706
func List(baseURL string, resourceType string) (*jsh.Document, *http.Response, error) {
	request, err := ListRequest(baseURL, resourceType)
	if err != nil {
		return nil, nil, err
	}

	return Do(request, jsh.ListMode)
}
345477
func (d *DataBagService) List() (data *DataBagListResult, err error) {
	path := fmt.Sprintf("data")
	err = d.client.magicRequestDecoder("GET", path, nil, &data)
	return
}
1180881
func (*Instances) List(c context.Context, req *instances.ListRequest) (*instances.ListResponse, error) {
	if req.GetPrefix() == "" {
		return nil, status.Errorf(codes.InvalidArgument, "prefix is required")
	}
	rsp := &instances.ListResponse{}
	// TODO(smut): Handle page tokens.
	if req.GetPageToken() != "" {
		return rsp, nil
	}
	q := datastore.NewQuery(model.VMKind).Eq("prefix", req.Prefix)
	if err := datastore.Run(c, q, func(vm *model.VM, f datastore.CursorCB) error {
		rsp.Instances = append(rsp.Instances, toInstance(vm))
		return nil
	}); err != nil {
		return nil, errors.Annotate(err, "failed to fetch instances").Err()
	}
	return rsp, nil
}
811432
func (ls *ListVolumes) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
402034
func (c *Client) List(ctx context.Context, url string, opts interface{}, payload interface{}) error {
	u, err := addOptions(url, opts)
	if err != nil {
		return err
	}

	req, err := c.NewRequest("GET", u, nil)
	if err != nil {
		return err
	}

	_, err = c.Do(ctx, req, payload)
	return err
}
398505
func (service *ProjectService) List() ([]*Project, *http.Response, error) {
	req, err := service.client.NewRequest("GET", "projects", nil)
	if err != nil {
		return nil, nil, err
	}

	var projects []*Project
	resp, err := service.client.Do(req, &projects)
	if err != nil {
		return nil, resp, err
	}

	return projects, resp, err
}
241776
func (c oauthClient) List(listID uint) (wl.List, error) {
	url := fmt.Sprintf(
		"%s/lists/%d",
		c.apiURL,
		listID,
	)

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

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

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

	list := wl.List{}
	err = json.NewDecoder(resp.Body).Decode(&list)
	if err != nil {
		return wl.List{}, err
	}
	return list, nil
}
650306
func (ls *ListNics) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
454942
func PolicyListRequest(method, path, request string) (*PolicyList, error) {
	policylist := &PolicyList{}
	err := hnsCall(method, "/policylists/"+path, request, &policylist)
	if err != nil {
		return nil, err
	}

	return policylist, nil
}
138114
func (m *Client) List(ctx context.Context, q cloudstorage.Query) (*cloudstorage.ObjectsResponse, error) {

	objs := &cloudstorage.ObjectsResponse{
		Objects: make(cloudstorage.Objects, 0),
	}

	err := m.listFiles(ctx, q, objs, m.bucket)
	if err != nil {
		gou.Warnf("fetch listFiles error %v", err)
		return nil, err
	}
	objs.Objects = q.ApplyFilters(objs.Objects)
	return objs, nil
}
165278
func (user User) ListRequest() (ListCommand, error) {
	req := &ListUsers{
		ID:       user.ID,
		UserName: user.UserName,
	}

	return req, nil
}
273152
func (ls *ListEventTypes) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
115528
func HNSListNetworkRequest(method, path, request string) ([]HNSNetwork, error) {
	return hns.HNSListNetworkRequest(method, path, request)
}
194216
func (c *Client) ListAccount(ctx context.Context, path string) (*http.Response, error) {
	req, err := c.NewListAccountRequest(ctx, path)
	if err != nil {
		return nil, err
	}
	return c.Client.Do(ctx, req)
}
406282
func (nic Nic) ListRequest() (ListCommand, error) {
	req := &ListNics{
		VirtualMachineID: nic.VirtualMachineID,
		NicID:            nic.ID,
		NetworkID:        nic.NetworkID,
	}

	return req, nil
}
1029883
func (ag AffinityGroup) ListRequest() (ListCommand, error) {
	return &ListAffinityGroups{
		ID:   ag.ID,
		Name: ag.Name,
	}, nil
}