github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/v6fakes/fake_share_service_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package v6fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/actor/v2v3action"
     8  	v6 "code.cloudfoundry.org/cli/command/v6"
     9  )
    10  
    11  type FakeShareServiceActor struct {
    12  	CloudControllerV3APIVersionStub        func() string
    13  	cloudControllerV3APIVersionMutex       sync.RWMutex
    14  	cloudControllerV3APIVersionArgsForCall []struct {
    15  	}
    16  	cloudControllerV3APIVersionReturns struct {
    17  		result1 string
    18  	}
    19  	cloudControllerV3APIVersionReturnsOnCall map[int]struct {
    20  		result1 string
    21  	}
    22  	ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub        func(string, string, string, string) (v2v3action.Warnings, error)
    23  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex       sync.RWMutex
    24  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall []struct {
    25  		arg1 string
    26  		arg2 string
    27  		arg3 string
    28  		arg4 string
    29  	}
    30  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturns struct {
    31  		result1 v2v3action.Warnings
    32  		result2 error
    33  	}
    34  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall map[int]struct {
    35  		result1 v2v3action.Warnings
    36  		result2 error
    37  	}
    38  	ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub        func(string, string, string, string) (v2v3action.Warnings, error)
    39  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex       sync.RWMutex
    40  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall []struct {
    41  		arg1 string
    42  		arg2 string
    43  		arg3 string
    44  		arg4 string
    45  	}
    46  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturns struct {
    47  		result1 v2v3action.Warnings
    48  		result2 error
    49  	}
    50  	shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall map[int]struct {
    51  		result1 v2v3action.Warnings
    52  		result2 error
    53  	}
    54  	invocations      map[string][][]interface{}
    55  	invocationsMutex sync.RWMutex
    56  }
    57  
    58  func (fake *FakeShareServiceActor) CloudControllerV3APIVersion() string {
    59  	fake.cloudControllerV3APIVersionMutex.Lock()
    60  	ret, specificReturn := fake.cloudControllerV3APIVersionReturnsOnCall[len(fake.cloudControllerV3APIVersionArgsForCall)]
    61  	fake.cloudControllerV3APIVersionArgsForCall = append(fake.cloudControllerV3APIVersionArgsForCall, struct {
    62  	}{})
    63  	fake.recordInvocation("CloudControllerV3APIVersion", []interface{}{})
    64  	fake.cloudControllerV3APIVersionMutex.Unlock()
    65  	if fake.CloudControllerV3APIVersionStub != nil {
    66  		return fake.CloudControllerV3APIVersionStub()
    67  	}
    68  	if specificReturn {
    69  		return ret.result1
    70  	}
    71  	fakeReturns := fake.cloudControllerV3APIVersionReturns
    72  	return fakeReturns.result1
    73  }
    74  
    75  func (fake *FakeShareServiceActor) CloudControllerV3APIVersionCallCount() int {
    76  	fake.cloudControllerV3APIVersionMutex.RLock()
    77  	defer fake.cloudControllerV3APIVersionMutex.RUnlock()
    78  	return len(fake.cloudControllerV3APIVersionArgsForCall)
    79  }
    80  
    81  func (fake *FakeShareServiceActor) CloudControllerV3APIVersionCalls(stub func() string) {
    82  	fake.cloudControllerV3APIVersionMutex.Lock()
    83  	defer fake.cloudControllerV3APIVersionMutex.Unlock()
    84  	fake.CloudControllerV3APIVersionStub = stub
    85  }
    86  
    87  func (fake *FakeShareServiceActor) CloudControllerV3APIVersionReturns(result1 string) {
    88  	fake.cloudControllerV3APIVersionMutex.Lock()
    89  	defer fake.cloudControllerV3APIVersionMutex.Unlock()
    90  	fake.CloudControllerV3APIVersionStub = nil
    91  	fake.cloudControllerV3APIVersionReturns = struct {
    92  		result1 string
    93  	}{result1}
    94  }
    95  
    96  func (fake *FakeShareServiceActor) CloudControllerV3APIVersionReturnsOnCall(i int, result1 string) {
    97  	fake.cloudControllerV3APIVersionMutex.Lock()
    98  	defer fake.cloudControllerV3APIVersionMutex.Unlock()
    99  	fake.CloudControllerV3APIVersionStub = nil
   100  	if fake.cloudControllerV3APIVersionReturnsOnCall == nil {
   101  		fake.cloudControllerV3APIVersionReturnsOnCall = make(map[int]struct {
   102  			result1 string
   103  		})
   104  	}
   105  	fake.cloudControllerV3APIVersionReturnsOnCall[i] = struct {
   106  		result1 string
   107  	}{result1}
   108  }
   109  
   110  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganization(arg1 string, arg2 string, arg3 string, arg4 string) (v2v3action.Warnings, error) {
   111  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Lock()
   112  	ret, specificReturn := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall[len(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall)]
   113  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall = append(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall, struct {
   114  		arg1 string
   115  		arg2 string
   116  		arg3 string
   117  		arg4 string
   118  	}{arg1, arg2, arg3, arg4})
   119  	fake.recordInvocation("ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganization", []interface{}{arg1, arg2, arg3, arg4})
   120  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Unlock()
   121  	if fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub != nil {
   122  		return fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub(arg1, arg2, arg3, arg4)
   123  	}
   124  	if specificReturn {
   125  		return ret.result1, ret.result2
   126  	}
   127  	fakeReturns := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturns
   128  	return fakeReturns.result1, fakeReturns.result2
   129  }
   130  
   131  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationCallCount() int {
   132  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RLock()
   133  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RUnlock()
   134  	return len(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall)
   135  }
   136  
   137  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationCalls(stub func(string, string, string, string) (v2v3action.Warnings, error)) {
   138  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Lock()
   139  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Unlock()
   140  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub = stub
   141  }
   142  
   143  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall(i int) (string, string, string, string) {
   144  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RLock()
   145  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RUnlock()
   146  	argsForCall := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationArgsForCall[i]
   147  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
   148  }
   149  
   150  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturns(result1 v2v3action.Warnings, result2 error) {
   151  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Lock()
   152  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Unlock()
   153  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub = nil
   154  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturns = struct {
   155  		result1 v2v3action.Warnings
   156  		result2 error
   157  	}{result1, result2}
   158  }
   159  
   160  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall(i int, result1 v2v3action.Warnings, result2 error) {
   161  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Lock()
   162  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.Unlock()
   163  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationStub = nil
   164  	if fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall == nil {
   165  		fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall = make(map[int]struct {
   166  			result1 v2v3action.Warnings
   167  			result2 error
   168  		})
   169  	}
   170  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationReturnsOnCall[i] = struct {
   171  		result1 v2v3action.Warnings
   172  		result2 error
   173  	}{result1, result2}
   174  }
   175  
   176  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationName(arg1 string, arg2 string, arg3 string, arg4 string) (v2v3action.Warnings, error) {
   177  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Lock()
   178  	ret, specificReturn := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall[len(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall)]
   179  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall = append(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall, struct {
   180  		arg1 string
   181  		arg2 string
   182  		arg3 string
   183  		arg4 string
   184  	}{arg1, arg2, arg3, arg4})
   185  	fake.recordInvocation("ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationName", []interface{}{arg1, arg2, arg3, arg4})
   186  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Unlock()
   187  	if fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub != nil {
   188  		return fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub(arg1, arg2, arg3, arg4)
   189  	}
   190  	if specificReturn {
   191  		return ret.result1, ret.result2
   192  	}
   193  	fakeReturns := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturns
   194  	return fakeReturns.result1, fakeReturns.result2
   195  }
   196  
   197  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameCallCount() int {
   198  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RLock()
   199  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RUnlock()
   200  	return len(fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall)
   201  }
   202  
   203  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameCalls(stub func(string, string, string, string) (v2v3action.Warnings, error)) {
   204  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Lock()
   205  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Unlock()
   206  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub = stub
   207  }
   208  
   209  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall(i int) (string, string, string, string) {
   210  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RLock()
   211  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RUnlock()
   212  	argsForCall := fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameArgsForCall[i]
   213  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
   214  }
   215  
   216  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturns(result1 v2v3action.Warnings, result2 error) {
   217  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Lock()
   218  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Unlock()
   219  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub = nil
   220  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturns = struct {
   221  		result1 v2v3action.Warnings
   222  		result2 error
   223  	}{result1, result2}
   224  }
   225  
   226  func (fake *FakeShareServiceActor) ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall(i int, result1 v2v3action.Warnings, result2 error) {
   227  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Lock()
   228  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.Unlock()
   229  	fake.ShareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameStub = nil
   230  	if fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall == nil {
   231  		fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall = make(map[int]struct {
   232  			result1 v2v3action.Warnings
   233  			result2 error
   234  		})
   235  	}
   236  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameReturnsOnCall[i] = struct {
   237  		result1 v2v3action.Warnings
   238  		result2 error
   239  	}{result1, result2}
   240  }
   241  
   242  func (fake *FakeShareServiceActor) Invocations() map[string][][]interface{} {
   243  	fake.invocationsMutex.RLock()
   244  	defer fake.invocationsMutex.RUnlock()
   245  	fake.cloudControllerV3APIVersionMutex.RLock()
   246  	defer fake.cloudControllerV3APIVersionMutex.RUnlock()
   247  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RLock()
   248  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationMutex.RUnlock()
   249  	fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RLock()
   250  	defer fake.shareServiceInstanceToSpaceNameByNameAndSpaceAndOrganizationNameMutex.RUnlock()
   251  	copiedInvocations := map[string][][]interface{}{}
   252  	for key, value := range fake.invocations {
   253  		copiedInvocations[key] = value
   254  	}
   255  	return copiedInvocations
   256  }
   257  
   258  func (fake *FakeShareServiceActor) recordInvocation(key string, args []interface{}) {
   259  	fake.invocationsMutex.Lock()
   260  	defer fake.invocationsMutex.Unlock()
   261  	if fake.invocations == nil {
   262  		fake.invocations = map[string][][]interface{}{}
   263  	}
   264  	if fake.invocations[key] == nil {
   265  		fake.invocations[key] = [][]interface{}{}
   266  	}
   267  	fake.invocations[key] = append(fake.invocations[key], args)
   268  }
   269  
   270  var _ v6.ShareServiceActor = new(FakeShareServiceActor)