// ListRequest builds the ListNetworks request
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
}
1074532
func (ss Snapshot) ListRequest() (ListCommand, error) {
	// Restricted cannot be applied here because it really has three states
	req := &ListSnapshots{
		ID:           ss.ID,
		Name:         ss.Name,
		VolumeID:     ss.VolumeID,
		SnapshotType: ss.SnapshotType,
		ZoneID:       ss.ZoneID,
		// TODO: tags
	}

	return req, nil
}
459331
func HNSListPolicyListRequest() ([]PolicyList, error) {
	var plist []PolicyList
	err := hnsCall("GET", "/policylists/", "", &plist)
	if err != nil {
		return nil, err
	}

	return plist, nil
}
1117988
func (s *RouterService) ListRouters(p *ListRoutersParams) (*ListRoutersResponse, error) {
	resp, err := s.cs.newRequest("listRouters", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListRoutersResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
306354
func (s *Service) ListBucketsRequest(input *ListBucketsInput) (*request.Request, *ListBucketsOutput, error) {

	if input == nil {
		input = &ListBucketsInput{}
	}

	o := &data.Operation{
		Config:        s.Config,
		APIName:       "Get Service",
		RequestMethod: "GET",
		RequestURI:    "/",
		StatusCodes: []int{
			200, // OK
		},
	}

	x := &ListBucketsOutput{}
	r, err := request.New(o, input, x)
	if err != nil {
		return nil, nil, err
	}

	return r, x, 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
}
76525
func (m *MockLambdaAPI) ListAliasesRequest(arg0 *lambda.ListAliasesInput) (*request.Request, *lambda.ListAliasesOutput) {
	ret := m.ctrl.Call(m, "ListAliasesRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.ListAliasesOutput)
	return ret0, ret1
}
166949
func (s *NetworkService) NewListNetworkServiceProvidersParams() *ListNetworkServiceProvidersParams {
	p := &ListNetworkServiceProvidersParams{}
	p.p = make(map[string]interface{})
	return p
}
1003413
func (s *NetworkService) ListSupportedNetworkServices(p *ListSupportedNetworkServicesParams) (*ListSupportedNetworkServicesResponse, error) {
	resp, err := s.cs.newRequest("listSupportedNetworkServices", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListSupportedNetworkServicesResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
1168792
func (c *Client) ListNetworks(p *ListNetworksParameter) ([]*Network, error) {
	obj, err := c.Request("listNetworks", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*Network), err
}
932927
func (limit ResourceLimit) ListRequest() (ListCommand, error) {
	req := &ListResourceLimits{
		ResourceType:     limit.ResourceType,
		ResourceTypeName: limit.ResourceTypeName,
	}

	return req, nil
}
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
}
650306
func (ls *ListNics) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
165278
func (user User) ListRequest() (ListCommand, error) {
	req := &ListUsers{
		ID:       user.ID,
		UserName: user.UserName,
	}

	return req, nil
}
292795
func (s *ProjectService) ListProjects(p *ListProjectsParams) (*ListProjectsResponse, error) {
	resp, err := s.cs.newRequest("listProjects", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListProjectsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
732875
func (a *netAPI) ListUpdate(ctx context.Context, req *pb.FetchThreatListUpdatesRequest) (*pb.FetchThreatListUpdatesResponse, error) {
	resp := new(pb.FetchThreatListUpdatesResponse)
	return resp, a.doRequest(ctx, fetchUpdatePath, req, resp)
}
1038328
func (c *CloudAPI) ListNetworks() ([]cloudapi.Network, error) {
	if err := c.ProcessFunctionHook(c); err != nil {
		return nil, err
	}

	return c.networks, nil
}