// ListRequest buils the (empty) ListAsyncJobs request
512568
func (a AsyncJobResult) ListRequest() (ListCommand, error) {
	req := &ListAsyncJobs{
		StartDate: a.Created,
	}

	return req, nil
}
216495
func (ls *ListServiceOfferings) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
486079
func (ls *ListSSHKeyPairs) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
538880
func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error) {
	resp, err := c.Get("/service", nil)
	if err != nil {
		return nil, err
	}

	var s []*Service
	if err := decodeJSON(&s, resp.Body); err != nil {
		return nil, err
	}
	sort.Stable(servicesByName(s))
	return s, nil
}
10740
func (network Network) ListRequest() (ListCommand, error) {
	//TODO add tags support
	req := &ListNetworks{
		ID:                network.ID,
		Keyword:           network.Name, // this is a hack as listNetworks doesn't support to search by name.
		PhysicalNetworkID: network.PhysicalNetworkID,
		TrafficType:       network.TrafficType,
		Type:              network.Type,
		ZoneID:            network.ZoneID,
	}

	if network.CanUseForDeploy {
		req.CanUseForDeploy = &network.CanUseForDeploy
	}
	if network.RestartRequired {
		req.RestartRequired = &network.RestartRequired
	}

	return req, nil
}
507279
func (ls *ListSecurityGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
764233
func (ls *ListNetworks) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
346860
func (ls *ListInstanceGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
1069428
func (s *ServicesService) ListServices(options *ListOptions) (*servicesResponse, error) {
	path := versioned(servicePath(""))
	servicesResponse := &servicesResponse{}

	path, err := addURLQueryOptions(path, options)
	if err != nil {
		return nil, err
	}

	resp, err := s.client.get(path, servicesResponse)
	if err != nil {
		return servicesResponse, err
	}

	servicesResponse.HttpResponse = resp
	return servicesResponse, nil
}
406282
func (nic Nic) ListRequest() (ListCommand, error) {
	req := &ListNics{
		VirtualMachineID: nic.VirtualMachineID,
		NicID:            nic.ID,
		NetworkID:        nic.NetworkID,
	}

	return req, nil
}
152231
func (t *Transferer) List(project string, statuses ...Status) ([]*storagetransfer.TransferJob, error) {
	var jobs []*storagetransfer.TransferJob
	var token string

	body, err := json.Marshal(struct {
		ProjectID   string   `json:"project_id"`
		JobStatuses []Status `json:"job_statuses,omitempty"`
	}{
		ProjectID:   project,
		JobStatuses: statuses,
	})

	if err != nil {
		return nil, err
	}

	for {
		call := t.svc.List().Filter(string(body))
		if token != "" {
			call = call.PageToken(token)
		}

		resp, err := call.Do()
		if err != nil {
			return nil, err
		}

		for _, job := range resp.TransferJobs {
			jobs = append(jobs, job)
		}

		token = resp.NextPageToken
		if token == "" {
			break
		}
	}
	return jobs, nil
}
256173
func (c CloudstackClient) ListProjects(name string) (ListProjectsResponse, error) {
	var resp ListProjectsResponse
	params := url.Values{}

	if name != "" {
		params.Set("name", name)
	}
	response, err := NewRequest(c, "listProjects", params)
	if err != nil {
		return resp, err
	}

	resp = response.(ListProjectsResponse)
	return resp, err
}
1333053
func (osCat OSCategory) ListRequest() (ListCommand, error) {
	req := &ListOSCategories{
		Name: osCat.Name,
		ID:   osCat.ID,
	}

	return req, nil
}
1029883
func (ag AffinityGroup) ListRequest() (ListCommand, error) {
	return &ListAffinityGroups{
		ID:   ag.ID,
		Name: ag.Name,
	}, nil
}
1340933
func (ls *ListEvents) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
554036
func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v2alpha1.CronJobList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v2alpha1.CronJobList{ListMeta: obj.(*v2alpha1.CronJobList).ListMeta}
	for _, item := range obj.(*v2alpha1.CronJobList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
663235
func httpListServiceLBs(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpListServiceLBs: %+v", vars)

	list := make([]*ServiceLB, 0)
	collections.serviceLBMutex.Lock()
	defer collections.serviceLBMutex.Unlock()
	for _, obj := range collections.serviceLBs {
		list = append(list, obj)
	}

	// Return the list
	return list, nil
}