// ListRequest builds the ListUsers request
165278
func (user User) ListRequest() (ListCommand, error) {
	req := &ListUsers{
		ID:       user.ID,
		UserName: user.UserName,
	}

	return req, nil
}
1209075
func List(c *client.Client, results int) (api.Users, int, error) {
	body, count, err := c.LimitedRequest("/v1/users/", results)

	if err != nil {
		return []api.User{}, -1, err
	}

	var users []api.User
	if err = json.Unmarshal([]byte(body), &users); err != nil {
		return []api.User{}, -1, err
	}

	return users, count, nil
}
721799
func (c *Client) ListUsers() (rec []UserInfo, err error) {
	req, err := newGETRequest(c, "users/")
	if err != nil {
		return []UserInfo{}, err
	}

	if err = executeAndParseRequest(c, req, &rec); err != nil {
		return []UserInfo{}, err
	}

	return rec, nil
}
1248613
func newReqList() *requestHeaderList {
	ret := &requestHeaderList{List: map[string]([]byte){}}
	go func() {
		for {
			time.Sleep(reqListRefreshTime)
			ret.Refresh()
		}
	}()
	return ret
}
861270
func (tag ResourceTag) ListRequest() (ListCommand, error) {
	req := &ListTags{
		Customer:     tag.Customer,
		Key:          tag.Key,
		ResourceID:   tag.ResourceID,
		ResourceType: tag.ResourceType,
		Value:        tag.Value,
	}

	return req, 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
}
755328
func (ls *ListTags) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
575031
func (c oauthClient) UsersForListID(listID uint) ([]wl.User, error) {
	var url string
	if listID > 0 {
		url = fmt.Sprintf("%s/users?list_id=%d", c.apiURL, listID)
	} else {
		url = fmt.Sprintf("%s/users", c.apiURL)
	}

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

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

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

	if resp.Body == nil {
		return nil, errors.New("Nil body returned")
	}

	users := []wl.User{}
	err = json.NewDecoder(resp.Body).Decode(&users)
	if err != nil {
		return nil, err
	}

	return users, nil
}
297104
func (ls *ListTemplates) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
682565
func (s *UsersService) List() *UsersListCall {
	var call UsersListCall
	call.service = s
	return &call
}
906289
func (ls *ListAsyncJobs) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
249726
func (n *nessusImpl) ListUsers() ([]User, error) {
	if n.verbose {
		log.Println("Listing users...")
	}

	resp, err := n.doRequest("GET", "/users", nil, []int{http.StatusOK})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	reply := &listUsersResp{}
	if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil {
		return nil, err
	}
	return reply.Users, nil
}
542250
func (template Template) ListRequest() (ListCommand, error) {
	req := &ListTemplates{
		ID:     template.ID,
		Name:   template.Name,
		ZoneID: template.ZoneID,
	}
	if template.IsFeatured {
		req.TemplateFilter = "featured"
	}
	if template.Removed != "" {
		*req.ShowRemoved = true
	}

	for i := range template.Tags {
		req.Tags = append(req.Tags, template.Tags[i])
	}

	return req, nil
}
47792
func (c *CloudPersister) ListUsers() ([]*models.User, error) {
	ctx := context.Background()
	Users := make([]*models.User, 0)
	q := datastore.NewQuery("User")

	keys, err := c.DatastoreClient().GetAll(ctx, q, &Users)

	if err != nil {
		return nil, fmt.Errorf("datastoredb: could not list Users: %v", err)
	}

	for i, k := range keys {
		Users[i].ID = k.ID()
	}

	return Users, nil
}
539079
func (event Event) ListRequest() (ListCommand, error) {
	req := &ListEvents{
		ID:    event.ID,
		Level: event.Level,
		Type:  event.Type,
	}

	return req, nil
}
1324852
func List(c *messagebird.Client) (*HLRList, error) {
	hlrList := &HLRList{}
	if err := c.Request(hlrList, http.MethodGet, path, nil); err != nil {
		return nil, err
	}

	return hlrList, nil
}
682813
func (ls *ListNetworkOfferings) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}