github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/spaces/spacesfakes/fake_space_repository.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package spacesfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/api/spaces"
     8  	"code.cloudfoundry.org/cli/cf/models"
     9  )
    10  
    11  type FakeSpaceRepository struct {
    12  	CreateStub        func(string, string, string) (models.Space, error)
    13  	createMutex       sync.RWMutex
    14  	createArgsForCall []struct {
    15  		arg1 string
    16  		arg2 string
    17  		arg3 string
    18  	}
    19  	createReturns struct {
    20  		result1 models.Space
    21  		result2 error
    22  	}
    23  	createReturnsOnCall map[int]struct {
    24  		result1 models.Space
    25  		result2 error
    26  	}
    27  	DeleteStub        func(string) error
    28  	deleteMutex       sync.RWMutex
    29  	deleteArgsForCall []struct {
    30  		arg1 string
    31  	}
    32  	deleteReturns struct {
    33  		result1 error
    34  	}
    35  	deleteReturnsOnCall map[int]struct {
    36  		result1 error
    37  	}
    38  	FindByNameStub        func(string) (models.Space, error)
    39  	findByNameMutex       sync.RWMutex
    40  	findByNameArgsForCall []struct {
    41  		arg1 string
    42  	}
    43  	findByNameReturns struct {
    44  		result1 models.Space
    45  		result2 error
    46  	}
    47  	findByNameReturnsOnCall map[int]struct {
    48  		result1 models.Space
    49  		result2 error
    50  	}
    51  	FindByNameInOrgStub        func(string, string) (models.Space, error)
    52  	findByNameInOrgMutex       sync.RWMutex
    53  	findByNameInOrgArgsForCall []struct {
    54  		arg1 string
    55  		arg2 string
    56  	}
    57  	findByNameInOrgReturns struct {
    58  		result1 models.Space
    59  		result2 error
    60  	}
    61  	findByNameInOrgReturnsOnCall map[int]struct {
    62  		result1 models.Space
    63  		result2 error
    64  	}
    65  	ListSpacesStub        func(func(models.Space) bool) error
    66  	listSpacesMutex       sync.RWMutex
    67  	listSpacesArgsForCall []struct {
    68  		arg1 func(models.Space) bool
    69  	}
    70  	listSpacesReturns struct {
    71  		result1 error
    72  	}
    73  	listSpacesReturnsOnCall map[int]struct {
    74  		result1 error
    75  	}
    76  	ListSpacesFromOrgStub        func(string, func(models.Space) bool) error
    77  	listSpacesFromOrgMutex       sync.RWMutex
    78  	listSpacesFromOrgArgsForCall []struct {
    79  		arg1 string
    80  		arg2 func(models.Space) bool
    81  	}
    82  	listSpacesFromOrgReturns struct {
    83  		result1 error
    84  	}
    85  	listSpacesFromOrgReturnsOnCall map[int]struct {
    86  		result1 error
    87  	}
    88  	RenameStub        func(string, string) error
    89  	renameMutex       sync.RWMutex
    90  	renameArgsForCall []struct {
    91  		arg1 string
    92  		arg2 string
    93  	}
    94  	renameReturns struct {
    95  		result1 error
    96  	}
    97  	renameReturnsOnCall map[int]struct {
    98  		result1 error
    99  	}
   100  	SetAllowSSHStub        func(string, bool) error
   101  	setAllowSSHMutex       sync.RWMutex
   102  	setAllowSSHArgsForCall []struct {
   103  		arg1 string
   104  		arg2 bool
   105  	}
   106  	setAllowSSHReturns struct {
   107  		result1 error
   108  	}
   109  	setAllowSSHReturnsOnCall map[int]struct {
   110  		result1 error
   111  	}
   112  	invocations      map[string][][]interface{}
   113  	invocationsMutex sync.RWMutex
   114  }
   115  
   116  func (fake *FakeSpaceRepository) Create(arg1 string, arg2 string, arg3 string) (models.Space, error) {
   117  	fake.createMutex.Lock()
   118  	ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)]
   119  	fake.createArgsForCall = append(fake.createArgsForCall, struct {
   120  		arg1 string
   121  		arg2 string
   122  		arg3 string
   123  	}{arg1, arg2, arg3})
   124  	fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3})
   125  	fake.createMutex.Unlock()
   126  	if fake.CreateStub != nil {
   127  		return fake.CreateStub(arg1, arg2, arg3)
   128  	}
   129  	if specificReturn {
   130  		return ret.result1, ret.result2
   131  	}
   132  	fakeReturns := fake.createReturns
   133  	return fakeReturns.result1, fakeReturns.result2
   134  }
   135  
   136  func (fake *FakeSpaceRepository) CreateCallCount() int {
   137  	fake.createMutex.RLock()
   138  	defer fake.createMutex.RUnlock()
   139  	return len(fake.createArgsForCall)
   140  }
   141  
   142  func (fake *FakeSpaceRepository) CreateCalls(stub func(string, string, string) (models.Space, error)) {
   143  	fake.createMutex.Lock()
   144  	defer fake.createMutex.Unlock()
   145  	fake.CreateStub = stub
   146  }
   147  
   148  func (fake *FakeSpaceRepository) CreateArgsForCall(i int) (string, string, string) {
   149  	fake.createMutex.RLock()
   150  	defer fake.createMutex.RUnlock()
   151  	argsForCall := fake.createArgsForCall[i]
   152  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
   153  }
   154  
   155  func (fake *FakeSpaceRepository) CreateReturns(result1 models.Space, result2 error) {
   156  	fake.createMutex.Lock()
   157  	defer fake.createMutex.Unlock()
   158  	fake.CreateStub = nil
   159  	fake.createReturns = struct {
   160  		result1 models.Space
   161  		result2 error
   162  	}{result1, result2}
   163  }
   164  
   165  func (fake *FakeSpaceRepository) CreateReturnsOnCall(i int, result1 models.Space, result2 error) {
   166  	fake.createMutex.Lock()
   167  	defer fake.createMutex.Unlock()
   168  	fake.CreateStub = nil
   169  	if fake.createReturnsOnCall == nil {
   170  		fake.createReturnsOnCall = make(map[int]struct {
   171  			result1 models.Space
   172  			result2 error
   173  		})
   174  	}
   175  	fake.createReturnsOnCall[i] = struct {
   176  		result1 models.Space
   177  		result2 error
   178  	}{result1, result2}
   179  }
   180  
   181  func (fake *FakeSpaceRepository) Delete(arg1 string) error {
   182  	fake.deleteMutex.Lock()
   183  	ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)]
   184  	fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct {
   185  		arg1 string
   186  	}{arg1})
   187  	fake.recordInvocation("Delete", []interface{}{arg1})
   188  	fake.deleteMutex.Unlock()
   189  	if fake.DeleteStub != nil {
   190  		return fake.DeleteStub(arg1)
   191  	}
   192  	if specificReturn {
   193  		return ret.result1
   194  	}
   195  	fakeReturns := fake.deleteReturns
   196  	return fakeReturns.result1
   197  }
   198  
   199  func (fake *FakeSpaceRepository) DeleteCallCount() int {
   200  	fake.deleteMutex.RLock()
   201  	defer fake.deleteMutex.RUnlock()
   202  	return len(fake.deleteArgsForCall)
   203  }
   204  
   205  func (fake *FakeSpaceRepository) DeleteCalls(stub func(string) error) {
   206  	fake.deleteMutex.Lock()
   207  	defer fake.deleteMutex.Unlock()
   208  	fake.DeleteStub = stub
   209  }
   210  
   211  func (fake *FakeSpaceRepository) DeleteArgsForCall(i int) string {
   212  	fake.deleteMutex.RLock()
   213  	defer fake.deleteMutex.RUnlock()
   214  	argsForCall := fake.deleteArgsForCall[i]
   215  	return argsForCall.arg1
   216  }
   217  
   218  func (fake *FakeSpaceRepository) DeleteReturns(result1 error) {
   219  	fake.deleteMutex.Lock()
   220  	defer fake.deleteMutex.Unlock()
   221  	fake.DeleteStub = nil
   222  	fake.deleteReturns = struct {
   223  		result1 error
   224  	}{result1}
   225  }
   226  
   227  func (fake *FakeSpaceRepository) DeleteReturnsOnCall(i int, result1 error) {
   228  	fake.deleteMutex.Lock()
   229  	defer fake.deleteMutex.Unlock()
   230  	fake.DeleteStub = nil
   231  	if fake.deleteReturnsOnCall == nil {
   232  		fake.deleteReturnsOnCall = make(map[int]struct {
   233  			result1 error
   234  		})
   235  	}
   236  	fake.deleteReturnsOnCall[i] = struct {
   237  		result1 error
   238  	}{result1}
   239  }
   240  
   241  func (fake *FakeSpaceRepository) FindByName(arg1 string) (models.Space, error) {
   242  	fake.findByNameMutex.Lock()
   243  	ret, specificReturn := fake.findByNameReturnsOnCall[len(fake.findByNameArgsForCall)]
   244  	fake.findByNameArgsForCall = append(fake.findByNameArgsForCall, struct {
   245  		arg1 string
   246  	}{arg1})
   247  	fake.recordInvocation("FindByName", []interface{}{arg1})
   248  	fake.findByNameMutex.Unlock()
   249  	if fake.FindByNameStub != nil {
   250  		return fake.FindByNameStub(arg1)
   251  	}
   252  	if specificReturn {
   253  		return ret.result1, ret.result2
   254  	}
   255  	fakeReturns := fake.findByNameReturns
   256  	return fakeReturns.result1, fakeReturns.result2
   257  }
   258  
   259  func (fake *FakeSpaceRepository) FindByNameCallCount() int {
   260  	fake.findByNameMutex.RLock()
   261  	defer fake.findByNameMutex.RUnlock()
   262  	return len(fake.findByNameArgsForCall)
   263  }
   264  
   265  func (fake *FakeSpaceRepository) FindByNameCalls(stub func(string) (models.Space, error)) {
   266  	fake.findByNameMutex.Lock()
   267  	defer fake.findByNameMutex.Unlock()
   268  	fake.FindByNameStub = stub
   269  }
   270  
   271  func (fake *FakeSpaceRepository) FindByNameArgsForCall(i int) string {
   272  	fake.findByNameMutex.RLock()
   273  	defer fake.findByNameMutex.RUnlock()
   274  	argsForCall := fake.findByNameArgsForCall[i]
   275  	return argsForCall.arg1
   276  }
   277  
   278  func (fake *FakeSpaceRepository) FindByNameReturns(result1 models.Space, result2 error) {
   279  	fake.findByNameMutex.Lock()
   280  	defer fake.findByNameMutex.Unlock()
   281  	fake.FindByNameStub = nil
   282  	fake.findByNameReturns = struct {
   283  		result1 models.Space
   284  		result2 error
   285  	}{result1, result2}
   286  }
   287  
   288  func (fake *FakeSpaceRepository) FindByNameReturnsOnCall(i int, result1 models.Space, result2 error) {
   289  	fake.findByNameMutex.Lock()
   290  	defer fake.findByNameMutex.Unlock()
   291  	fake.FindByNameStub = nil
   292  	if fake.findByNameReturnsOnCall == nil {
   293  		fake.findByNameReturnsOnCall = make(map[int]struct {
   294  			result1 models.Space
   295  			result2 error
   296  		})
   297  	}
   298  	fake.findByNameReturnsOnCall[i] = struct {
   299  		result1 models.Space
   300  		result2 error
   301  	}{result1, result2}
   302  }
   303  
   304  func (fake *FakeSpaceRepository) FindByNameInOrg(arg1 string, arg2 string) (models.Space, error) {
   305  	fake.findByNameInOrgMutex.Lock()
   306  	ret, specificReturn := fake.findByNameInOrgReturnsOnCall[len(fake.findByNameInOrgArgsForCall)]
   307  	fake.findByNameInOrgArgsForCall = append(fake.findByNameInOrgArgsForCall, struct {
   308  		arg1 string
   309  		arg2 string
   310  	}{arg1, arg2})
   311  	fake.recordInvocation("FindByNameInOrg", []interface{}{arg1, arg2})
   312  	fake.findByNameInOrgMutex.Unlock()
   313  	if fake.FindByNameInOrgStub != nil {
   314  		return fake.FindByNameInOrgStub(arg1, arg2)
   315  	}
   316  	if specificReturn {
   317  		return ret.result1, ret.result2
   318  	}
   319  	fakeReturns := fake.findByNameInOrgReturns
   320  	return fakeReturns.result1, fakeReturns.result2
   321  }
   322  
   323  func (fake *FakeSpaceRepository) FindByNameInOrgCallCount() int {
   324  	fake.findByNameInOrgMutex.RLock()
   325  	defer fake.findByNameInOrgMutex.RUnlock()
   326  	return len(fake.findByNameInOrgArgsForCall)
   327  }
   328  
   329  func (fake *FakeSpaceRepository) FindByNameInOrgCalls(stub func(string, string) (models.Space, error)) {
   330  	fake.findByNameInOrgMutex.Lock()
   331  	defer fake.findByNameInOrgMutex.Unlock()
   332  	fake.FindByNameInOrgStub = stub
   333  }
   334  
   335  func (fake *FakeSpaceRepository) FindByNameInOrgArgsForCall(i int) (string, string) {
   336  	fake.findByNameInOrgMutex.RLock()
   337  	defer fake.findByNameInOrgMutex.RUnlock()
   338  	argsForCall := fake.findByNameInOrgArgsForCall[i]
   339  	return argsForCall.arg1, argsForCall.arg2
   340  }
   341  
   342  func (fake *FakeSpaceRepository) FindByNameInOrgReturns(result1 models.Space, result2 error) {
   343  	fake.findByNameInOrgMutex.Lock()
   344  	defer fake.findByNameInOrgMutex.Unlock()
   345  	fake.FindByNameInOrgStub = nil
   346  	fake.findByNameInOrgReturns = struct {
   347  		result1 models.Space
   348  		result2 error
   349  	}{result1, result2}
   350  }
   351  
   352  func (fake *FakeSpaceRepository) FindByNameInOrgReturnsOnCall(i int, result1 models.Space, result2 error) {
   353  	fake.findByNameInOrgMutex.Lock()
   354  	defer fake.findByNameInOrgMutex.Unlock()
   355  	fake.FindByNameInOrgStub = nil
   356  	if fake.findByNameInOrgReturnsOnCall == nil {
   357  		fake.findByNameInOrgReturnsOnCall = make(map[int]struct {
   358  			result1 models.Space
   359  			result2 error
   360  		})
   361  	}
   362  	fake.findByNameInOrgReturnsOnCall[i] = struct {
   363  		result1 models.Space
   364  		result2 error
   365  	}{result1, result2}
   366  }
   367  
   368  func (fake *FakeSpaceRepository) ListSpaces(arg1 func(models.Space) bool) error {
   369  	fake.listSpacesMutex.Lock()
   370  	ret, specificReturn := fake.listSpacesReturnsOnCall[len(fake.listSpacesArgsForCall)]
   371  	fake.listSpacesArgsForCall = append(fake.listSpacesArgsForCall, struct {
   372  		arg1 func(models.Space) bool
   373  	}{arg1})
   374  	fake.recordInvocation("ListSpaces", []interface{}{arg1})
   375  	fake.listSpacesMutex.Unlock()
   376  	if fake.ListSpacesStub != nil {
   377  		return fake.ListSpacesStub(arg1)
   378  	}
   379  	if specificReturn {
   380  		return ret.result1
   381  	}
   382  	fakeReturns := fake.listSpacesReturns
   383  	return fakeReturns.result1
   384  }
   385  
   386  func (fake *FakeSpaceRepository) ListSpacesCallCount() int {
   387  	fake.listSpacesMutex.RLock()
   388  	defer fake.listSpacesMutex.RUnlock()
   389  	return len(fake.listSpacesArgsForCall)
   390  }
   391  
   392  func (fake *FakeSpaceRepository) ListSpacesCalls(stub func(func(models.Space) bool) error) {
   393  	fake.listSpacesMutex.Lock()
   394  	defer fake.listSpacesMutex.Unlock()
   395  	fake.ListSpacesStub = stub
   396  }
   397  
   398  func (fake *FakeSpaceRepository) ListSpacesArgsForCall(i int) func(models.Space) bool {
   399  	fake.listSpacesMutex.RLock()
   400  	defer fake.listSpacesMutex.RUnlock()
   401  	argsForCall := fake.listSpacesArgsForCall[i]
   402  	return argsForCall.arg1
   403  }
   404  
   405  func (fake *FakeSpaceRepository) ListSpacesReturns(result1 error) {
   406  	fake.listSpacesMutex.Lock()
   407  	defer fake.listSpacesMutex.Unlock()
   408  	fake.ListSpacesStub = nil
   409  	fake.listSpacesReturns = struct {
   410  		result1 error
   411  	}{result1}
   412  }
   413  
   414  func (fake *FakeSpaceRepository) ListSpacesReturnsOnCall(i int, result1 error) {
   415  	fake.listSpacesMutex.Lock()
   416  	defer fake.listSpacesMutex.Unlock()
   417  	fake.ListSpacesStub = nil
   418  	if fake.listSpacesReturnsOnCall == nil {
   419  		fake.listSpacesReturnsOnCall = make(map[int]struct {
   420  			result1 error
   421  		})
   422  	}
   423  	fake.listSpacesReturnsOnCall[i] = struct {
   424  		result1 error
   425  	}{result1}
   426  }
   427  
   428  func (fake *FakeSpaceRepository) ListSpacesFromOrg(arg1 string, arg2 func(models.Space) bool) error {
   429  	fake.listSpacesFromOrgMutex.Lock()
   430  	ret, specificReturn := fake.listSpacesFromOrgReturnsOnCall[len(fake.listSpacesFromOrgArgsForCall)]
   431  	fake.listSpacesFromOrgArgsForCall = append(fake.listSpacesFromOrgArgsForCall, struct {
   432  		arg1 string
   433  		arg2 func(models.Space) bool
   434  	}{arg1, arg2})
   435  	fake.recordInvocation("ListSpacesFromOrg", []interface{}{arg1, arg2})
   436  	fake.listSpacesFromOrgMutex.Unlock()
   437  	if fake.ListSpacesFromOrgStub != nil {
   438  		return fake.ListSpacesFromOrgStub(arg1, arg2)
   439  	}
   440  	if specificReturn {
   441  		return ret.result1
   442  	}
   443  	fakeReturns := fake.listSpacesFromOrgReturns
   444  	return fakeReturns.result1
   445  }
   446  
   447  func (fake *FakeSpaceRepository) ListSpacesFromOrgCallCount() int {
   448  	fake.listSpacesFromOrgMutex.RLock()
   449  	defer fake.listSpacesFromOrgMutex.RUnlock()
   450  	return len(fake.listSpacesFromOrgArgsForCall)
   451  }
   452  
   453  func (fake *FakeSpaceRepository) ListSpacesFromOrgCalls(stub func(string, func(models.Space) bool) error) {
   454  	fake.listSpacesFromOrgMutex.Lock()
   455  	defer fake.listSpacesFromOrgMutex.Unlock()
   456  	fake.ListSpacesFromOrgStub = stub
   457  }
   458  
   459  func (fake *FakeSpaceRepository) ListSpacesFromOrgArgsForCall(i int) (string, func(models.Space) bool) {
   460  	fake.listSpacesFromOrgMutex.RLock()
   461  	defer fake.listSpacesFromOrgMutex.RUnlock()
   462  	argsForCall := fake.listSpacesFromOrgArgsForCall[i]
   463  	return argsForCall.arg1, argsForCall.arg2
   464  }
   465  
   466  func (fake *FakeSpaceRepository) ListSpacesFromOrgReturns(result1 error) {
   467  	fake.listSpacesFromOrgMutex.Lock()
   468  	defer fake.listSpacesFromOrgMutex.Unlock()
   469  	fake.ListSpacesFromOrgStub = nil
   470  	fake.listSpacesFromOrgReturns = struct {
   471  		result1 error
   472  	}{result1}
   473  }
   474  
   475  func (fake *FakeSpaceRepository) ListSpacesFromOrgReturnsOnCall(i int, result1 error) {
   476  	fake.listSpacesFromOrgMutex.Lock()
   477  	defer fake.listSpacesFromOrgMutex.Unlock()
   478  	fake.ListSpacesFromOrgStub = nil
   479  	if fake.listSpacesFromOrgReturnsOnCall == nil {
   480  		fake.listSpacesFromOrgReturnsOnCall = make(map[int]struct {
   481  			result1 error
   482  		})
   483  	}
   484  	fake.listSpacesFromOrgReturnsOnCall[i] = struct {
   485  		result1 error
   486  	}{result1}
   487  }
   488  
   489  func (fake *FakeSpaceRepository) Rename(arg1 string, arg2 string) error {
   490  	fake.renameMutex.Lock()
   491  	ret, specificReturn := fake.renameReturnsOnCall[len(fake.renameArgsForCall)]
   492  	fake.renameArgsForCall = append(fake.renameArgsForCall, struct {
   493  		arg1 string
   494  		arg2 string
   495  	}{arg1, arg2})
   496  	fake.recordInvocation("Rename", []interface{}{arg1, arg2})
   497  	fake.renameMutex.Unlock()
   498  	if fake.RenameStub != nil {
   499  		return fake.RenameStub(arg1, arg2)
   500  	}
   501  	if specificReturn {
   502  		return ret.result1
   503  	}
   504  	fakeReturns := fake.renameReturns
   505  	return fakeReturns.result1
   506  }
   507  
   508  func (fake *FakeSpaceRepository) RenameCallCount() int {
   509  	fake.renameMutex.RLock()
   510  	defer fake.renameMutex.RUnlock()
   511  	return len(fake.renameArgsForCall)
   512  }
   513  
   514  func (fake *FakeSpaceRepository) RenameCalls(stub func(string, string) error) {
   515  	fake.renameMutex.Lock()
   516  	defer fake.renameMutex.Unlock()
   517  	fake.RenameStub = stub
   518  }
   519  
   520  func (fake *FakeSpaceRepository) RenameArgsForCall(i int) (string, string) {
   521  	fake.renameMutex.RLock()
   522  	defer fake.renameMutex.RUnlock()
   523  	argsForCall := fake.renameArgsForCall[i]
   524  	return argsForCall.arg1, argsForCall.arg2
   525  }
   526  
   527  func (fake *FakeSpaceRepository) RenameReturns(result1 error) {
   528  	fake.renameMutex.Lock()
   529  	defer fake.renameMutex.Unlock()
   530  	fake.RenameStub = nil
   531  	fake.renameReturns = struct {
   532  		result1 error
   533  	}{result1}
   534  }
   535  
   536  func (fake *FakeSpaceRepository) RenameReturnsOnCall(i int, result1 error) {
   537  	fake.renameMutex.Lock()
   538  	defer fake.renameMutex.Unlock()
   539  	fake.RenameStub = nil
   540  	if fake.renameReturnsOnCall == nil {
   541  		fake.renameReturnsOnCall = make(map[int]struct {
   542  			result1 error
   543  		})
   544  	}
   545  	fake.renameReturnsOnCall[i] = struct {
   546  		result1 error
   547  	}{result1}
   548  }
   549  
   550  func (fake *FakeSpaceRepository) SetAllowSSH(arg1 string, arg2 bool) error {
   551  	fake.setAllowSSHMutex.Lock()
   552  	ret, specificReturn := fake.setAllowSSHReturnsOnCall[len(fake.setAllowSSHArgsForCall)]
   553  	fake.setAllowSSHArgsForCall = append(fake.setAllowSSHArgsForCall, struct {
   554  		arg1 string
   555  		arg2 bool
   556  	}{arg1, arg2})
   557  	fake.recordInvocation("SetAllowSSH", []interface{}{arg1, arg2})
   558  	fake.setAllowSSHMutex.Unlock()
   559  	if fake.SetAllowSSHStub != nil {
   560  		return fake.SetAllowSSHStub(arg1, arg2)
   561  	}
   562  	if specificReturn {
   563  		return ret.result1
   564  	}
   565  	fakeReturns := fake.setAllowSSHReturns
   566  	return fakeReturns.result1
   567  }
   568  
   569  func (fake *FakeSpaceRepository) SetAllowSSHCallCount() int {
   570  	fake.setAllowSSHMutex.RLock()
   571  	defer fake.setAllowSSHMutex.RUnlock()
   572  	return len(fake.setAllowSSHArgsForCall)
   573  }
   574  
   575  func (fake *FakeSpaceRepository) SetAllowSSHCalls(stub func(string, bool) error) {
   576  	fake.setAllowSSHMutex.Lock()
   577  	defer fake.setAllowSSHMutex.Unlock()
   578  	fake.SetAllowSSHStub = stub
   579  }
   580  
   581  func (fake *FakeSpaceRepository) SetAllowSSHArgsForCall(i int) (string, bool) {
   582  	fake.setAllowSSHMutex.RLock()
   583  	defer fake.setAllowSSHMutex.RUnlock()
   584  	argsForCall := fake.setAllowSSHArgsForCall[i]
   585  	return argsForCall.arg1, argsForCall.arg2
   586  }
   587  
   588  func (fake *FakeSpaceRepository) SetAllowSSHReturns(result1 error) {
   589  	fake.setAllowSSHMutex.Lock()
   590  	defer fake.setAllowSSHMutex.Unlock()
   591  	fake.SetAllowSSHStub = nil
   592  	fake.setAllowSSHReturns = struct {
   593  		result1 error
   594  	}{result1}
   595  }
   596  
   597  func (fake *FakeSpaceRepository) SetAllowSSHReturnsOnCall(i int, result1 error) {
   598  	fake.setAllowSSHMutex.Lock()
   599  	defer fake.setAllowSSHMutex.Unlock()
   600  	fake.SetAllowSSHStub = nil
   601  	if fake.setAllowSSHReturnsOnCall == nil {
   602  		fake.setAllowSSHReturnsOnCall = make(map[int]struct {
   603  			result1 error
   604  		})
   605  	}
   606  	fake.setAllowSSHReturnsOnCall[i] = struct {
   607  		result1 error
   608  	}{result1}
   609  }
   610  
   611  func (fake *FakeSpaceRepository) Invocations() map[string][][]interface{} {
   612  	fake.invocationsMutex.RLock()
   613  	defer fake.invocationsMutex.RUnlock()
   614  	fake.createMutex.RLock()
   615  	defer fake.createMutex.RUnlock()
   616  	fake.deleteMutex.RLock()
   617  	defer fake.deleteMutex.RUnlock()
   618  	fake.findByNameMutex.RLock()
   619  	defer fake.findByNameMutex.RUnlock()
   620  	fake.findByNameInOrgMutex.RLock()
   621  	defer fake.findByNameInOrgMutex.RUnlock()
   622  	fake.listSpacesMutex.RLock()
   623  	defer fake.listSpacesMutex.RUnlock()
   624  	fake.listSpacesFromOrgMutex.RLock()
   625  	defer fake.listSpacesFromOrgMutex.RUnlock()
   626  	fake.renameMutex.RLock()
   627  	defer fake.renameMutex.RUnlock()
   628  	fake.setAllowSSHMutex.RLock()
   629  	defer fake.setAllowSSHMutex.RUnlock()
   630  	copiedInvocations := map[string][][]interface{}{}
   631  	for key, value := range fake.invocations {
   632  		copiedInvocations[key] = value
   633  	}
   634  	return copiedInvocations
   635  }
   636  
   637  func (fake *FakeSpaceRepository) recordInvocation(key string, args []interface{}) {
   638  	fake.invocationsMutex.Lock()
   639  	defer fake.invocationsMutex.Unlock()
   640  	if fake.invocations == nil {
   641  		fake.invocations = map[string][][]interface{}{}
   642  	}
   643  	if fake.invocations[key] == nil {
   644  		fake.invocations[key] = [][]interface{}{}
   645  	}
   646  	fake.invocations[key] = append(fake.invocations[key], args)
   647  }
   648  
   649  var _ spaces.SpaceRepository = new(FakeSpaceRepository)