// ListRequest builds the ListAdresses request
178180
func (ipaddress IPAddress) ListRequest() (ListCommand, error) {
	req := &ListPublicIPAddresses{
		AssociatedNetworkID: ipaddress.AssociatedNetworkID,
		ID:                  ipaddress.ID,
		IPAddress:           ipaddress.IPAddress,
		PhysicalNetworkID:   ipaddress.PhysicalNetworkID,
		VlanID:              ipaddress.VlanID,
		ZoneID:              ipaddress.ZoneID,
	}
	if ipaddress.IsElastic {
		req.IsElastic = &ipaddress.IsElastic
	}
	if ipaddress.IsSourceNat {
		req.IsSourceNat = &ipaddress.IsSourceNat
	}
	if ipaddress.ForVirtualNetwork {
		req.ForVirtualNetwork = &ipaddress.ForVirtualNetwork
	}

	return req, 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)
}
1091099
func (sg SecurityGroup) ListRequest() (ListCommand, error) {
	req := &ListSecurityGroups{
		ID:                sg.ID,
		SecurityGroupName: sg.Name,
	}

	return req, nil
}
500302
func (c *Client) ListRequestSettings(i *ListRequestSettingsInput) ([]*RequestSetting, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	path := fmt.Sprintf("/service/%s/version/%d/request_settings", i.Service, i.Version)
	resp, err := c.Get(path, nil)
	if err != nil {
		return nil, err
	}

	var bs []*RequestSetting
	if err := decodeJSON(&bs, resp.Body); err != nil {
		return nil, err
	}
	sort.Stable(requestSettingsByName(bs))
	return bs, nil
}
91336
func (ls *ListResourceDetails) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
1184281
func (h *Header) AddressList(key string) ([]*Address, error) {
	v := h.Get(key)
	if v == "" {
		return nil, nil
	}
	return parseAddressList(v)
}
512568
func (a AsyncJobResult) ListRequest() (ListCommand, error) {
	req := &ListAsyncJobs{
		StartDate: a.Created,
	}

	return req, nil
}
885323
func (ls *ListAffinityGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
1339091
func ParseAddressList(fields []interface{}) (addrs []*Address) {
	addrs = make([]*Address, len(fields))

	for i, f := range fields {
		if addrFields, ok := f.([]interface{}); ok {
			addr := &Address{}
			if err := addr.Parse(addrFields); err == nil {
				addrs[i] = addr
			}
		}
	}

	return
}
857122
func (so ServiceOffering) ListRequest() (ListCommand, error) {
	// Restricted cannot be applied here because it really has three states
	req := &ListServiceOfferings{
		ID:           so.ID,
		Name:         so.Name,
		SystemVMType: so.SystemVMType,
	}

	if so.IsSystem {
		req.IsSystem = &so.IsSystem
	}

	return req, nil
}
943596
func (zone Zone) ListRequest() (ListCommand, error) {
	req := &ListZones{
		ID:   zone.ID,
		Name: zone.Name,
	}

	return req, nil
}
1155104
func List() (*http.Response, string, []error) {
	k := kumoru.New()

	k.Get(fmt.Sprintf("%s/v1/applications/", k.EndPoint.Application))
	k.SignRequest(true)
	return k.End()
}
240185
func ListRequest(baseURL string, resourceType string) (*http.Request, error) {
	u, urlErr := url.Parse(baseURL)
	if urlErr != nil {
		return nil, jsh.ISE(fmt.Sprintf("Error parsing URL: %s", urlErr.Error()))
	}

	setPath(u, resourceType)

	return NewRequest("GET", u.String(), nil)
}
1005047
func (*Service) ListPlatforms(c context.Context, req *crimson.ListPlatformsRequest) (*crimson.ListPlatformsResponse, error) {
	platforms, err := listPlatforms(c, req)
	if err != nil {
		return nil, err
	}
	return &crimson.ListPlatformsResponse{
		Platforms: platforms,
	}, nil
}
932927
func (limit ResourceLimit) ListRequest() (ListCommand, error) {
	req := &ListResourceLimits{
		ResourceType:     limit.ResourceType,
		ResourceTypeName: limit.ResourceTypeName,
	}

	return req, nil
}
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
}
220202
func (ls *ListAccounts) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}