github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/actors/planbuilder/planbuilderfakes/fake_plan_builder.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package planbuilderfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/actors/planbuilder"
     8  	"code.cloudfoundry.org/cli/cf/models"
     9  )
    10  
    11  type FakePlanBuilder struct {
    12  	AttachOrgToPlansStub        func([]models.ServicePlanFields, string) ([]models.ServicePlanFields, error)
    13  	attachOrgToPlansMutex       sync.RWMutex
    14  	attachOrgToPlansArgsForCall []struct {
    15  		arg1 []models.ServicePlanFields
    16  		arg2 string
    17  	}
    18  	attachOrgToPlansReturns struct {
    19  		result1 []models.ServicePlanFields
    20  		result2 error
    21  	}
    22  	attachOrgToPlansReturnsOnCall map[int]struct {
    23  		result1 []models.ServicePlanFields
    24  		result2 error
    25  	}
    26  	AttachOrgsToPlansStub        func([]models.ServicePlanFields) ([]models.ServicePlanFields, error)
    27  	attachOrgsToPlansMutex       sync.RWMutex
    28  	attachOrgsToPlansArgsForCall []struct {
    29  		arg1 []models.ServicePlanFields
    30  	}
    31  	attachOrgsToPlansReturns struct {
    32  		result1 []models.ServicePlanFields
    33  		result2 error
    34  	}
    35  	attachOrgsToPlansReturnsOnCall map[int]struct {
    36  		result1 []models.ServicePlanFields
    37  		result2 error
    38  	}
    39  	GetPlansForManyServicesWithOrgsStub        func([]string) ([]models.ServicePlanFields, error)
    40  	getPlansForManyServicesWithOrgsMutex       sync.RWMutex
    41  	getPlansForManyServicesWithOrgsArgsForCall []struct {
    42  		arg1 []string
    43  	}
    44  	getPlansForManyServicesWithOrgsReturns struct {
    45  		result1 []models.ServicePlanFields
    46  		result2 error
    47  	}
    48  	getPlansForManyServicesWithOrgsReturnsOnCall map[int]struct {
    49  		result1 []models.ServicePlanFields
    50  		result2 error
    51  	}
    52  	GetPlansForServiceStub        func(string) ([]models.ServicePlanFields, error)
    53  	getPlansForServiceMutex       sync.RWMutex
    54  	getPlansForServiceArgsForCall []struct {
    55  		arg1 string
    56  	}
    57  	getPlansForServiceReturns struct {
    58  		result1 []models.ServicePlanFields
    59  		result2 error
    60  	}
    61  	getPlansForServiceReturnsOnCall map[int]struct {
    62  		result1 []models.ServicePlanFields
    63  		result2 error
    64  	}
    65  	GetPlansForServiceForOrgStub        func(string, string) ([]models.ServicePlanFields, error)
    66  	getPlansForServiceForOrgMutex       sync.RWMutex
    67  	getPlansForServiceForOrgArgsForCall []struct {
    68  		arg1 string
    69  		arg2 string
    70  	}
    71  	getPlansForServiceForOrgReturns struct {
    72  		result1 []models.ServicePlanFields
    73  		result2 error
    74  	}
    75  	getPlansForServiceForOrgReturnsOnCall map[int]struct {
    76  		result1 []models.ServicePlanFields
    77  		result2 error
    78  	}
    79  	GetPlansForServiceWithOrgsStub        func(string) ([]models.ServicePlanFields, error)
    80  	getPlansForServiceWithOrgsMutex       sync.RWMutex
    81  	getPlansForServiceWithOrgsArgsForCall []struct {
    82  		arg1 string
    83  	}
    84  	getPlansForServiceWithOrgsReturns struct {
    85  		result1 []models.ServicePlanFields
    86  		result2 error
    87  	}
    88  	getPlansForServiceWithOrgsReturnsOnCall map[int]struct {
    89  		result1 []models.ServicePlanFields
    90  		result2 error
    91  	}
    92  	GetPlansVisibleToOrgStub        func(string) ([]models.ServicePlanFields, error)
    93  	getPlansVisibleToOrgMutex       sync.RWMutex
    94  	getPlansVisibleToOrgArgsForCall []struct {
    95  		arg1 string
    96  	}
    97  	getPlansVisibleToOrgReturns struct {
    98  		result1 []models.ServicePlanFields
    99  		result2 error
   100  	}
   101  	getPlansVisibleToOrgReturnsOnCall map[int]struct {
   102  		result1 []models.ServicePlanFields
   103  		result2 error
   104  	}
   105  	invocations      map[string][][]interface{}
   106  	invocationsMutex sync.RWMutex
   107  }
   108  
   109  func (fake *FakePlanBuilder) AttachOrgToPlans(arg1 []models.ServicePlanFields, arg2 string) ([]models.ServicePlanFields, error) {
   110  	var arg1Copy []models.ServicePlanFields
   111  	if arg1 != nil {
   112  		arg1Copy = make([]models.ServicePlanFields, len(arg1))
   113  		copy(arg1Copy, arg1)
   114  	}
   115  	fake.attachOrgToPlansMutex.Lock()
   116  	ret, specificReturn := fake.attachOrgToPlansReturnsOnCall[len(fake.attachOrgToPlansArgsForCall)]
   117  	fake.attachOrgToPlansArgsForCall = append(fake.attachOrgToPlansArgsForCall, struct {
   118  		arg1 []models.ServicePlanFields
   119  		arg2 string
   120  	}{arg1Copy, arg2})
   121  	fake.recordInvocation("AttachOrgToPlans", []interface{}{arg1Copy, arg2})
   122  	fake.attachOrgToPlansMutex.Unlock()
   123  	if fake.AttachOrgToPlansStub != nil {
   124  		return fake.AttachOrgToPlansStub(arg1, arg2)
   125  	}
   126  	if specificReturn {
   127  		return ret.result1, ret.result2
   128  	}
   129  	fakeReturns := fake.attachOrgToPlansReturns
   130  	return fakeReturns.result1, fakeReturns.result2
   131  }
   132  
   133  func (fake *FakePlanBuilder) AttachOrgToPlansCallCount() int {
   134  	fake.attachOrgToPlansMutex.RLock()
   135  	defer fake.attachOrgToPlansMutex.RUnlock()
   136  	return len(fake.attachOrgToPlansArgsForCall)
   137  }
   138  
   139  func (fake *FakePlanBuilder) AttachOrgToPlansCalls(stub func([]models.ServicePlanFields, string) ([]models.ServicePlanFields, error)) {
   140  	fake.attachOrgToPlansMutex.Lock()
   141  	defer fake.attachOrgToPlansMutex.Unlock()
   142  	fake.AttachOrgToPlansStub = stub
   143  }
   144  
   145  func (fake *FakePlanBuilder) AttachOrgToPlansArgsForCall(i int) ([]models.ServicePlanFields, string) {
   146  	fake.attachOrgToPlansMutex.RLock()
   147  	defer fake.attachOrgToPlansMutex.RUnlock()
   148  	argsForCall := fake.attachOrgToPlansArgsForCall[i]
   149  	return argsForCall.arg1, argsForCall.arg2
   150  }
   151  
   152  func (fake *FakePlanBuilder) AttachOrgToPlansReturns(result1 []models.ServicePlanFields, result2 error) {
   153  	fake.attachOrgToPlansMutex.Lock()
   154  	defer fake.attachOrgToPlansMutex.Unlock()
   155  	fake.AttachOrgToPlansStub = nil
   156  	fake.attachOrgToPlansReturns = struct {
   157  		result1 []models.ServicePlanFields
   158  		result2 error
   159  	}{result1, result2}
   160  }
   161  
   162  func (fake *FakePlanBuilder) AttachOrgToPlansReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   163  	fake.attachOrgToPlansMutex.Lock()
   164  	defer fake.attachOrgToPlansMutex.Unlock()
   165  	fake.AttachOrgToPlansStub = nil
   166  	if fake.attachOrgToPlansReturnsOnCall == nil {
   167  		fake.attachOrgToPlansReturnsOnCall = make(map[int]struct {
   168  			result1 []models.ServicePlanFields
   169  			result2 error
   170  		})
   171  	}
   172  	fake.attachOrgToPlansReturnsOnCall[i] = struct {
   173  		result1 []models.ServicePlanFields
   174  		result2 error
   175  	}{result1, result2}
   176  }
   177  
   178  func (fake *FakePlanBuilder) AttachOrgsToPlans(arg1 []models.ServicePlanFields) ([]models.ServicePlanFields, error) {
   179  	var arg1Copy []models.ServicePlanFields
   180  	if arg1 != nil {
   181  		arg1Copy = make([]models.ServicePlanFields, len(arg1))
   182  		copy(arg1Copy, arg1)
   183  	}
   184  	fake.attachOrgsToPlansMutex.Lock()
   185  	ret, specificReturn := fake.attachOrgsToPlansReturnsOnCall[len(fake.attachOrgsToPlansArgsForCall)]
   186  	fake.attachOrgsToPlansArgsForCall = append(fake.attachOrgsToPlansArgsForCall, struct {
   187  		arg1 []models.ServicePlanFields
   188  	}{arg1Copy})
   189  	fake.recordInvocation("AttachOrgsToPlans", []interface{}{arg1Copy})
   190  	fake.attachOrgsToPlansMutex.Unlock()
   191  	if fake.AttachOrgsToPlansStub != nil {
   192  		return fake.AttachOrgsToPlansStub(arg1)
   193  	}
   194  	if specificReturn {
   195  		return ret.result1, ret.result2
   196  	}
   197  	fakeReturns := fake.attachOrgsToPlansReturns
   198  	return fakeReturns.result1, fakeReturns.result2
   199  }
   200  
   201  func (fake *FakePlanBuilder) AttachOrgsToPlansCallCount() int {
   202  	fake.attachOrgsToPlansMutex.RLock()
   203  	defer fake.attachOrgsToPlansMutex.RUnlock()
   204  	return len(fake.attachOrgsToPlansArgsForCall)
   205  }
   206  
   207  func (fake *FakePlanBuilder) AttachOrgsToPlansCalls(stub func([]models.ServicePlanFields) ([]models.ServicePlanFields, error)) {
   208  	fake.attachOrgsToPlansMutex.Lock()
   209  	defer fake.attachOrgsToPlansMutex.Unlock()
   210  	fake.AttachOrgsToPlansStub = stub
   211  }
   212  
   213  func (fake *FakePlanBuilder) AttachOrgsToPlansArgsForCall(i int) []models.ServicePlanFields {
   214  	fake.attachOrgsToPlansMutex.RLock()
   215  	defer fake.attachOrgsToPlansMutex.RUnlock()
   216  	argsForCall := fake.attachOrgsToPlansArgsForCall[i]
   217  	return argsForCall.arg1
   218  }
   219  
   220  func (fake *FakePlanBuilder) AttachOrgsToPlansReturns(result1 []models.ServicePlanFields, result2 error) {
   221  	fake.attachOrgsToPlansMutex.Lock()
   222  	defer fake.attachOrgsToPlansMutex.Unlock()
   223  	fake.AttachOrgsToPlansStub = nil
   224  	fake.attachOrgsToPlansReturns = struct {
   225  		result1 []models.ServicePlanFields
   226  		result2 error
   227  	}{result1, result2}
   228  }
   229  
   230  func (fake *FakePlanBuilder) AttachOrgsToPlansReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   231  	fake.attachOrgsToPlansMutex.Lock()
   232  	defer fake.attachOrgsToPlansMutex.Unlock()
   233  	fake.AttachOrgsToPlansStub = nil
   234  	if fake.attachOrgsToPlansReturnsOnCall == nil {
   235  		fake.attachOrgsToPlansReturnsOnCall = make(map[int]struct {
   236  			result1 []models.ServicePlanFields
   237  			result2 error
   238  		})
   239  	}
   240  	fake.attachOrgsToPlansReturnsOnCall[i] = struct {
   241  		result1 []models.ServicePlanFields
   242  		result2 error
   243  	}{result1, result2}
   244  }
   245  
   246  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgs(arg1 []string) ([]models.ServicePlanFields, error) {
   247  	var arg1Copy []string
   248  	if arg1 != nil {
   249  		arg1Copy = make([]string, len(arg1))
   250  		copy(arg1Copy, arg1)
   251  	}
   252  	fake.getPlansForManyServicesWithOrgsMutex.Lock()
   253  	ret, specificReturn := fake.getPlansForManyServicesWithOrgsReturnsOnCall[len(fake.getPlansForManyServicesWithOrgsArgsForCall)]
   254  	fake.getPlansForManyServicesWithOrgsArgsForCall = append(fake.getPlansForManyServicesWithOrgsArgsForCall, struct {
   255  		arg1 []string
   256  	}{arg1Copy})
   257  	fake.recordInvocation("GetPlansForManyServicesWithOrgs", []interface{}{arg1Copy})
   258  	fake.getPlansForManyServicesWithOrgsMutex.Unlock()
   259  	if fake.GetPlansForManyServicesWithOrgsStub != nil {
   260  		return fake.GetPlansForManyServicesWithOrgsStub(arg1)
   261  	}
   262  	if specificReturn {
   263  		return ret.result1, ret.result2
   264  	}
   265  	fakeReturns := fake.getPlansForManyServicesWithOrgsReturns
   266  	return fakeReturns.result1, fakeReturns.result2
   267  }
   268  
   269  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsCallCount() int {
   270  	fake.getPlansForManyServicesWithOrgsMutex.RLock()
   271  	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
   272  	return len(fake.getPlansForManyServicesWithOrgsArgsForCall)
   273  }
   274  
   275  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsCalls(stub func([]string) ([]models.ServicePlanFields, error)) {
   276  	fake.getPlansForManyServicesWithOrgsMutex.Lock()
   277  	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
   278  	fake.GetPlansForManyServicesWithOrgsStub = stub
   279  }
   280  
   281  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsArgsForCall(i int) []string {
   282  	fake.getPlansForManyServicesWithOrgsMutex.RLock()
   283  	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
   284  	argsForCall := fake.getPlansForManyServicesWithOrgsArgsForCall[i]
   285  	return argsForCall.arg1
   286  }
   287  
   288  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsReturns(result1 []models.ServicePlanFields, result2 error) {
   289  	fake.getPlansForManyServicesWithOrgsMutex.Lock()
   290  	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
   291  	fake.GetPlansForManyServicesWithOrgsStub = nil
   292  	fake.getPlansForManyServicesWithOrgsReturns = struct {
   293  		result1 []models.ServicePlanFields
   294  		result2 error
   295  	}{result1, result2}
   296  }
   297  
   298  func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   299  	fake.getPlansForManyServicesWithOrgsMutex.Lock()
   300  	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
   301  	fake.GetPlansForManyServicesWithOrgsStub = nil
   302  	if fake.getPlansForManyServicesWithOrgsReturnsOnCall == nil {
   303  		fake.getPlansForManyServicesWithOrgsReturnsOnCall = make(map[int]struct {
   304  			result1 []models.ServicePlanFields
   305  			result2 error
   306  		})
   307  	}
   308  	fake.getPlansForManyServicesWithOrgsReturnsOnCall[i] = struct {
   309  		result1 []models.ServicePlanFields
   310  		result2 error
   311  	}{result1, result2}
   312  }
   313  
   314  func (fake *FakePlanBuilder) GetPlansForService(arg1 string) ([]models.ServicePlanFields, error) {
   315  	fake.getPlansForServiceMutex.Lock()
   316  	ret, specificReturn := fake.getPlansForServiceReturnsOnCall[len(fake.getPlansForServiceArgsForCall)]
   317  	fake.getPlansForServiceArgsForCall = append(fake.getPlansForServiceArgsForCall, struct {
   318  		arg1 string
   319  	}{arg1})
   320  	fake.recordInvocation("GetPlansForService", []interface{}{arg1})
   321  	fake.getPlansForServiceMutex.Unlock()
   322  	if fake.GetPlansForServiceStub != nil {
   323  		return fake.GetPlansForServiceStub(arg1)
   324  	}
   325  	if specificReturn {
   326  		return ret.result1, ret.result2
   327  	}
   328  	fakeReturns := fake.getPlansForServiceReturns
   329  	return fakeReturns.result1, fakeReturns.result2
   330  }
   331  
   332  func (fake *FakePlanBuilder) GetPlansForServiceCallCount() int {
   333  	fake.getPlansForServiceMutex.RLock()
   334  	defer fake.getPlansForServiceMutex.RUnlock()
   335  	return len(fake.getPlansForServiceArgsForCall)
   336  }
   337  
   338  func (fake *FakePlanBuilder) GetPlansForServiceCalls(stub func(string) ([]models.ServicePlanFields, error)) {
   339  	fake.getPlansForServiceMutex.Lock()
   340  	defer fake.getPlansForServiceMutex.Unlock()
   341  	fake.GetPlansForServiceStub = stub
   342  }
   343  
   344  func (fake *FakePlanBuilder) GetPlansForServiceArgsForCall(i int) string {
   345  	fake.getPlansForServiceMutex.RLock()
   346  	defer fake.getPlansForServiceMutex.RUnlock()
   347  	argsForCall := fake.getPlansForServiceArgsForCall[i]
   348  	return argsForCall.arg1
   349  }
   350  
   351  func (fake *FakePlanBuilder) GetPlansForServiceReturns(result1 []models.ServicePlanFields, result2 error) {
   352  	fake.getPlansForServiceMutex.Lock()
   353  	defer fake.getPlansForServiceMutex.Unlock()
   354  	fake.GetPlansForServiceStub = nil
   355  	fake.getPlansForServiceReturns = struct {
   356  		result1 []models.ServicePlanFields
   357  		result2 error
   358  	}{result1, result2}
   359  }
   360  
   361  func (fake *FakePlanBuilder) GetPlansForServiceReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   362  	fake.getPlansForServiceMutex.Lock()
   363  	defer fake.getPlansForServiceMutex.Unlock()
   364  	fake.GetPlansForServiceStub = nil
   365  	if fake.getPlansForServiceReturnsOnCall == nil {
   366  		fake.getPlansForServiceReturnsOnCall = make(map[int]struct {
   367  			result1 []models.ServicePlanFields
   368  			result2 error
   369  		})
   370  	}
   371  	fake.getPlansForServiceReturnsOnCall[i] = struct {
   372  		result1 []models.ServicePlanFields
   373  		result2 error
   374  	}{result1, result2}
   375  }
   376  
   377  func (fake *FakePlanBuilder) GetPlansForServiceForOrg(arg1 string, arg2 string) ([]models.ServicePlanFields, error) {
   378  	fake.getPlansForServiceForOrgMutex.Lock()
   379  	ret, specificReturn := fake.getPlansForServiceForOrgReturnsOnCall[len(fake.getPlansForServiceForOrgArgsForCall)]
   380  	fake.getPlansForServiceForOrgArgsForCall = append(fake.getPlansForServiceForOrgArgsForCall, struct {
   381  		arg1 string
   382  		arg2 string
   383  	}{arg1, arg2})
   384  	fake.recordInvocation("GetPlansForServiceForOrg", []interface{}{arg1, arg2})
   385  	fake.getPlansForServiceForOrgMutex.Unlock()
   386  	if fake.GetPlansForServiceForOrgStub != nil {
   387  		return fake.GetPlansForServiceForOrgStub(arg1, arg2)
   388  	}
   389  	if specificReturn {
   390  		return ret.result1, ret.result2
   391  	}
   392  	fakeReturns := fake.getPlansForServiceForOrgReturns
   393  	return fakeReturns.result1, fakeReturns.result2
   394  }
   395  
   396  func (fake *FakePlanBuilder) GetPlansForServiceForOrgCallCount() int {
   397  	fake.getPlansForServiceForOrgMutex.RLock()
   398  	defer fake.getPlansForServiceForOrgMutex.RUnlock()
   399  	return len(fake.getPlansForServiceForOrgArgsForCall)
   400  }
   401  
   402  func (fake *FakePlanBuilder) GetPlansForServiceForOrgCalls(stub func(string, string) ([]models.ServicePlanFields, error)) {
   403  	fake.getPlansForServiceForOrgMutex.Lock()
   404  	defer fake.getPlansForServiceForOrgMutex.Unlock()
   405  	fake.GetPlansForServiceForOrgStub = stub
   406  }
   407  
   408  func (fake *FakePlanBuilder) GetPlansForServiceForOrgArgsForCall(i int) (string, string) {
   409  	fake.getPlansForServiceForOrgMutex.RLock()
   410  	defer fake.getPlansForServiceForOrgMutex.RUnlock()
   411  	argsForCall := fake.getPlansForServiceForOrgArgsForCall[i]
   412  	return argsForCall.arg1, argsForCall.arg2
   413  }
   414  
   415  func (fake *FakePlanBuilder) GetPlansForServiceForOrgReturns(result1 []models.ServicePlanFields, result2 error) {
   416  	fake.getPlansForServiceForOrgMutex.Lock()
   417  	defer fake.getPlansForServiceForOrgMutex.Unlock()
   418  	fake.GetPlansForServiceForOrgStub = nil
   419  	fake.getPlansForServiceForOrgReturns = struct {
   420  		result1 []models.ServicePlanFields
   421  		result2 error
   422  	}{result1, result2}
   423  }
   424  
   425  func (fake *FakePlanBuilder) GetPlansForServiceForOrgReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   426  	fake.getPlansForServiceForOrgMutex.Lock()
   427  	defer fake.getPlansForServiceForOrgMutex.Unlock()
   428  	fake.GetPlansForServiceForOrgStub = nil
   429  	if fake.getPlansForServiceForOrgReturnsOnCall == nil {
   430  		fake.getPlansForServiceForOrgReturnsOnCall = make(map[int]struct {
   431  			result1 []models.ServicePlanFields
   432  			result2 error
   433  		})
   434  	}
   435  	fake.getPlansForServiceForOrgReturnsOnCall[i] = struct {
   436  		result1 []models.ServicePlanFields
   437  		result2 error
   438  	}{result1, result2}
   439  }
   440  
   441  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgs(arg1 string) ([]models.ServicePlanFields, error) {
   442  	fake.getPlansForServiceWithOrgsMutex.Lock()
   443  	ret, specificReturn := fake.getPlansForServiceWithOrgsReturnsOnCall[len(fake.getPlansForServiceWithOrgsArgsForCall)]
   444  	fake.getPlansForServiceWithOrgsArgsForCall = append(fake.getPlansForServiceWithOrgsArgsForCall, struct {
   445  		arg1 string
   446  	}{arg1})
   447  	fake.recordInvocation("GetPlansForServiceWithOrgs", []interface{}{arg1})
   448  	fake.getPlansForServiceWithOrgsMutex.Unlock()
   449  	if fake.GetPlansForServiceWithOrgsStub != nil {
   450  		return fake.GetPlansForServiceWithOrgsStub(arg1)
   451  	}
   452  	if specificReturn {
   453  		return ret.result1, ret.result2
   454  	}
   455  	fakeReturns := fake.getPlansForServiceWithOrgsReturns
   456  	return fakeReturns.result1, fakeReturns.result2
   457  }
   458  
   459  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsCallCount() int {
   460  	fake.getPlansForServiceWithOrgsMutex.RLock()
   461  	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
   462  	return len(fake.getPlansForServiceWithOrgsArgsForCall)
   463  }
   464  
   465  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsCalls(stub func(string) ([]models.ServicePlanFields, error)) {
   466  	fake.getPlansForServiceWithOrgsMutex.Lock()
   467  	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
   468  	fake.GetPlansForServiceWithOrgsStub = stub
   469  }
   470  
   471  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsArgsForCall(i int) string {
   472  	fake.getPlansForServiceWithOrgsMutex.RLock()
   473  	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
   474  	argsForCall := fake.getPlansForServiceWithOrgsArgsForCall[i]
   475  	return argsForCall.arg1
   476  }
   477  
   478  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsReturns(result1 []models.ServicePlanFields, result2 error) {
   479  	fake.getPlansForServiceWithOrgsMutex.Lock()
   480  	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
   481  	fake.GetPlansForServiceWithOrgsStub = nil
   482  	fake.getPlansForServiceWithOrgsReturns = struct {
   483  		result1 []models.ServicePlanFields
   484  		result2 error
   485  	}{result1, result2}
   486  }
   487  
   488  func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   489  	fake.getPlansForServiceWithOrgsMutex.Lock()
   490  	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
   491  	fake.GetPlansForServiceWithOrgsStub = nil
   492  	if fake.getPlansForServiceWithOrgsReturnsOnCall == nil {
   493  		fake.getPlansForServiceWithOrgsReturnsOnCall = make(map[int]struct {
   494  			result1 []models.ServicePlanFields
   495  			result2 error
   496  		})
   497  	}
   498  	fake.getPlansForServiceWithOrgsReturnsOnCall[i] = struct {
   499  		result1 []models.ServicePlanFields
   500  		result2 error
   501  	}{result1, result2}
   502  }
   503  
   504  func (fake *FakePlanBuilder) GetPlansVisibleToOrg(arg1 string) ([]models.ServicePlanFields, error) {
   505  	fake.getPlansVisibleToOrgMutex.Lock()
   506  	ret, specificReturn := fake.getPlansVisibleToOrgReturnsOnCall[len(fake.getPlansVisibleToOrgArgsForCall)]
   507  	fake.getPlansVisibleToOrgArgsForCall = append(fake.getPlansVisibleToOrgArgsForCall, struct {
   508  		arg1 string
   509  	}{arg1})
   510  	fake.recordInvocation("GetPlansVisibleToOrg", []interface{}{arg1})
   511  	fake.getPlansVisibleToOrgMutex.Unlock()
   512  	if fake.GetPlansVisibleToOrgStub != nil {
   513  		return fake.GetPlansVisibleToOrgStub(arg1)
   514  	}
   515  	if specificReturn {
   516  		return ret.result1, ret.result2
   517  	}
   518  	fakeReturns := fake.getPlansVisibleToOrgReturns
   519  	return fakeReturns.result1, fakeReturns.result2
   520  }
   521  
   522  func (fake *FakePlanBuilder) GetPlansVisibleToOrgCallCount() int {
   523  	fake.getPlansVisibleToOrgMutex.RLock()
   524  	defer fake.getPlansVisibleToOrgMutex.RUnlock()
   525  	return len(fake.getPlansVisibleToOrgArgsForCall)
   526  }
   527  
   528  func (fake *FakePlanBuilder) GetPlansVisibleToOrgCalls(stub func(string) ([]models.ServicePlanFields, error)) {
   529  	fake.getPlansVisibleToOrgMutex.Lock()
   530  	defer fake.getPlansVisibleToOrgMutex.Unlock()
   531  	fake.GetPlansVisibleToOrgStub = stub
   532  }
   533  
   534  func (fake *FakePlanBuilder) GetPlansVisibleToOrgArgsForCall(i int) string {
   535  	fake.getPlansVisibleToOrgMutex.RLock()
   536  	defer fake.getPlansVisibleToOrgMutex.RUnlock()
   537  	argsForCall := fake.getPlansVisibleToOrgArgsForCall[i]
   538  	return argsForCall.arg1
   539  }
   540  
   541  func (fake *FakePlanBuilder) GetPlansVisibleToOrgReturns(result1 []models.ServicePlanFields, result2 error) {
   542  	fake.getPlansVisibleToOrgMutex.Lock()
   543  	defer fake.getPlansVisibleToOrgMutex.Unlock()
   544  	fake.GetPlansVisibleToOrgStub = nil
   545  	fake.getPlansVisibleToOrgReturns = struct {
   546  		result1 []models.ServicePlanFields
   547  		result2 error
   548  	}{result1, result2}
   549  }
   550  
   551  func (fake *FakePlanBuilder) GetPlansVisibleToOrgReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
   552  	fake.getPlansVisibleToOrgMutex.Lock()
   553  	defer fake.getPlansVisibleToOrgMutex.Unlock()
   554  	fake.GetPlansVisibleToOrgStub = nil
   555  	if fake.getPlansVisibleToOrgReturnsOnCall == nil {
   556  		fake.getPlansVisibleToOrgReturnsOnCall = make(map[int]struct {
   557  			result1 []models.ServicePlanFields
   558  			result2 error
   559  		})
   560  	}
   561  	fake.getPlansVisibleToOrgReturnsOnCall[i] = struct {
   562  		result1 []models.ServicePlanFields
   563  		result2 error
   564  	}{result1, result2}
   565  }
   566  
   567  func (fake *FakePlanBuilder) Invocations() map[string][][]interface{} {
   568  	fake.invocationsMutex.RLock()
   569  	defer fake.invocationsMutex.RUnlock()
   570  	fake.attachOrgToPlansMutex.RLock()
   571  	defer fake.attachOrgToPlansMutex.RUnlock()
   572  	fake.attachOrgsToPlansMutex.RLock()
   573  	defer fake.attachOrgsToPlansMutex.RUnlock()
   574  	fake.getPlansForManyServicesWithOrgsMutex.RLock()
   575  	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
   576  	fake.getPlansForServiceMutex.RLock()
   577  	defer fake.getPlansForServiceMutex.RUnlock()
   578  	fake.getPlansForServiceForOrgMutex.RLock()
   579  	defer fake.getPlansForServiceForOrgMutex.RUnlock()
   580  	fake.getPlansForServiceWithOrgsMutex.RLock()
   581  	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
   582  	fake.getPlansVisibleToOrgMutex.RLock()
   583  	defer fake.getPlansVisibleToOrgMutex.RUnlock()
   584  	copiedInvocations := map[string][][]interface{}{}
   585  	for key, value := range fake.invocations {
   586  		copiedInvocations[key] = value
   587  	}
   588  	return copiedInvocations
   589  }
   590  
   591  func (fake *FakePlanBuilder) recordInvocation(key string, args []interface{}) {
   592  	fake.invocationsMutex.Lock()
   593  	defer fake.invocationsMutex.Unlock()
   594  	if fake.invocations == nil {
   595  		fake.invocations = map[string][][]interface{}{}
   596  	}
   597  	if fake.invocations[key] == nil {
   598  		fake.invocations[key] = [][]interface{}{}
   599  	}
   600  	fake.invocations[key] = append(fake.invocations[key], args)
   601  }
   602  
   603  var _ planbuilder.PlanBuilder = new(FakePlanBuilder)