// ListVersionsByFunctionRequest mocks base method
14377
func (m *MockLambdaAPI) ListVersionsByFunctionRequest(arg0 *lambda.ListVersionsByFunctionInput) (*request.Request, *lambda.ListVersionsByFunctionOutput) {
	ret := m.ctrl.Call(m, "ListVersionsByFunctionRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.ListVersionsByFunctionOutput)
	return ret0, ret1
}
1222588
func (s *AliasConfiguration) SetFunctionVersion(v string) *AliasConfiguration {
	s.FunctionVersion = &v
	return s
}
341364
func (s *RPCServer) ListFunctionArgs(arg ListFunctionArgsIn, out *ListFunctionArgsOut) error {
	vars, err := s.debugger.FunctionArguments(arg.Scope, *api.LoadConfigToProc(&arg.Cfg))
	if err != nil {
		return err
	}
	out.Args = vars
	return nil
}
263932
func (c *FakeClient) ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error) {
	reqOpts := c.Opts
	for _, opt := range opts {
		opt(&reqOpts)
	}
	req := &reqOpts.listReq
	rels := c.Rels
	count := int64(len(c.Rels))
	var next string
	limit := req.GetLimit()
	// TODO: Handle all other options.
	if limit != 0 && limit < count {
		rels = rels[:limit]
		count = limit
		next = c.Rels[limit].GetName()
	}

	resp := &rls.ListReleasesResponse{
		Count:    count,
		Releases: rels,
	}
	if next != "" {
		resp.Next = next
	}
	return resp, nil
}
414281
func (m *MockLambdaAPI) ListEventSourceMappingsRequest(arg0 *lambda.ListEventSourceMappingsInput) (*request.Request, *lambda.ListEventSourceMappingsOutput) {
	ret := m.ctrl.Call(m, "ListEventSourceMappingsRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.ListEventSourceMappingsOutput)
	return ret0, ret1
}
486079
func (ls *ListSSHKeyPairs) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
885323
func (ls *ListAffinityGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
546164
func (e *EnvironmentService) ListCookbooks(name string, numVersions string) (data EnvironmentCookbookResult, err error) {
	path := versionParams(fmt.Sprintf("environments/%s/cookbooks", name), numVersions)
	err = e.client.magicRequestDecoder("GET", path, nil, &data)
	return
}
328241
func (m *MockLambdaAPI) ListFunctionsPages(arg0 *lambda.ListFunctionsInput, arg1 func(*lambda.ListFunctionsOutput, bool) bool) error {
	ret := m.ctrl.Call(m, "ListFunctionsPages", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}
346860
func (ls *ListInstanceGroups) ListRequest() (ListCommand, error) {
	if ls == nil {
		return nil, fmt.Errorf("%T cannot be nil", ls)
	}
	return ls, nil
}
1368885
func (iso ISO) ListRequest() (ListCommand, error) {
	req := &ListISOs{
		ID:     iso.ID,
		Name:   iso.Name,
		ZoneID: iso.ZoneID,
	}
	if iso.Bootable {
		*req.Bootable = true
	}
	if iso.IsFeatured {
		req.IsoFilter = "featured"
	}
	if iso.IsPublic {
		*req.IsPublic = true
	}
	if iso.IsReady {
		*req.IsReady = true
	}

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

	return req, nil
}
1183749
func Convert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error {
	return autoConvert_internalversion_List_To_v1_List(in, out, s)
}
108310
func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest, stream services.ReleaseService_ListReleasesServer) error {
	if len(req.StatusCodes) == 0 {
		req.StatusCodes = []release.Status_Code{release.Status_DEPLOYED}
	}

	//rels, err := s.env.Releases.ListDeployed()
	rels, err := s.env.Releases.ListFilterAll(func(r *release.Release) bool {
		for _, sc := range req.StatusCodes {
			if sc == r.Info.Status.Code {
				return true
			}
		}
		return false
	})
	if err != nil {
		return err
	}

	if req.Namespace != "" {
		rels, err = filterByNamespace(req.Namespace, rels)
		if err != nil {
			return err
		}
	}

	if len(req.Filter) != 0 {
		rels, err = filterReleases(req.Filter, rels)
		if err != nil {
			return err
		}
	}

	total := int64(len(rels))

	switch req.SortBy {
	case services.ListSort_NAME:
		relutil.SortByName(rels)
	case services.ListSort_LAST_RELEASED:
		relutil.SortByDate(rels)
	case services.ListSort_CHART_NAME:
		relutil.SortByChartName(rels)
	}

	if req.SortOrder == services.ListSort_DESC {
		ll := len(rels)
		rr := make([]*release.Release, ll)
		for i, item := range rels {
			rr[ll-i-1] = item
		}
		rels = rr
	}

	l := int64(len(rels))
	if req.Offset != "" {

		i := -1
		for ii, cur := range rels {
			if cur.Name == req.Offset {
				i = ii
			}
		}
		if i == -1 {
			return fmt.Errorf("offset %q not found", req.Offset)
		}

		if len(rels) < i {
			return fmt.Errorf("no items after %q", req.Offset)
		}

		rels = rels[i:]
		l = int64(len(rels))
	}

	if req.Limit == 0 {
		req.Limit = ListDefaultLimit
	}

	next := ""
	if l > req.Limit {
		next = rels[req.Limit].Name
		rels = rels[0:req.Limit]
		l = int64(len(rels))
	}
	res := &services.ListReleasesResponse{
		Next:  next,
		Count: l,
		Total: total,
	}
	chunks := s.partition(rels[:min(len(rels), int(req.Limit))], maxMsgSize-proto.Size(res))
	for res.Releases = range chunks {
		if err := stream.Send(res); err != nil {
			for range chunks { // drain
			}
			return err
		}
	}
	return nil
}
199040
func (impl *repoImpl) ListInstances(c context.Context, r *api.ListInstancesRequest) (resp *api.ListInstancesResponse, err error) {
	defer func() { err = grpcutil.GRPCifyAndLogErr(c, err) }()

	result, nextPage, err := impl.paginatedQuery(c, paginatedQueryOpts{
		Package:   r.Package,
		PageSize:  r.PageSize,
		PageToken: r.PageToken,
		Handler: func(cur datastore.Cursor, pageSize int32) ([]*model.Instance, datastore.Cursor, error) {
			return model.ListInstances(c, r.Package, pageSize, cur)
		},
	})
	if err != nil {
		return nil, err
	}

	return &api.ListInstancesResponse{
		Instances:     result,
		NextPageToken: nextPage,
	}, nil
}
541194
func (r *AppversionService) List() *AppversionListCall {
	c := &AppversionListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	return c
}
235253
func (ig InstanceGroup) ListRequest() (ListCommand, error) {
	req := &ListInstanceGroups{
		ID:   ig.ID,
		Name: ig.Name,
	}

	return req, nil
}
103370
func (mr *MockRestClientInterfaceMockRecorder) APIVersion() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRestClientInterface)(nil).APIVersion))
}