github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/command/v3/v3fakes/fake_disable_org_isolation_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package v3fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/actor/v3action"
     8  	"code.cloudfoundry.org/cli/command/v3"
     9  )
    10  
    11  type FakeDisableOrgIsolationActor struct {
    12  	CloudControllerAPIVersionStub        func() string
    13  	cloudControllerAPIVersionMutex       sync.RWMutex
    14  	cloudControllerAPIVersionArgsForCall []struct{}
    15  	cloudControllerAPIVersionReturns     struct {
    16  		result1 string
    17  	}
    18  	cloudControllerAPIVersionReturnsOnCall map[int]struct {
    19  		result1 string
    20  	}
    21  	RevokeIsolationSegmentFromOrganizationByNameStub        func(isolationSegmentName string, orgName string) (v3action.Warnings, error)
    22  	revokeIsolationSegmentFromOrganizationByNameMutex       sync.RWMutex
    23  	revokeIsolationSegmentFromOrganizationByNameArgsForCall []struct {
    24  		isolationSegmentName string
    25  		orgName              string
    26  	}
    27  	revokeIsolationSegmentFromOrganizationByNameReturns struct {
    28  		result1 v3action.Warnings
    29  		result2 error
    30  	}
    31  	revokeIsolationSegmentFromOrganizationByNameReturnsOnCall map[int]struct {
    32  		result1 v3action.Warnings
    33  		result2 error
    34  	}
    35  	invocations      map[string][][]interface{}
    36  	invocationsMutex sync.RWMutex
    37  }
    38  
    39  func (fake *FakeDisableOrgIsolationActor) CloudControllerAPIVersion() string {
    40  	fake.cloudControllerAPIVersionMutex.Lock()
    41  	ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)]
    42  	fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{})
    43  	fake.recordInvocation("CloudControllerAPIVersion", []interface{}{})
    44  	fake.cloudControllerAPIVersionMutex.Unlock()
    45  	if fake.CloudControllerAPIVersionStub != nil {
    46  		return fake.CloudControllerAPIVersionStub()
    47  	}
    48  	if specificReturn {
    49  		return ret.result1
    50  	}
    51  	return fake.cloudControllerAPIVersionReturns.result1
    52  }
    53  
    54  func (fake *FakeDisableOrgIsolationActor) CloudControllerAPIVersionCallCount() int {
    55  	fake.cloudControllerAPIVersionMutex.RLock()
    56  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    57  	return len(fake.cloudControllerAPIVersionArgsForCall)
    58  }
    59  
    60  func (fake *FakeDisableOrgIsolationActor) CloudControllerAPIVersionReturns(result1 string) {
    61  	fake.CloudControllerAPIVersionStub = nil
    62  	fake.cloudControllerAPIVersionReturns = struct {
    63  		result1 string
    64  	}{result1}
    65  }
    66  
    67  func (fake *FakeDisableOrgIsolationActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) {
    68  	fake.CloudControllerAPIVersionStub = nil
    69  	if fake.cloudControllerAPIVersionReturnsOnCall == nil {
    70  		fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct {
    71  			result1 string
    72  		})
    73  	}
    74  	fake.cloudControllerAPIVersionReturnsOnCall[i] = struct {
    75  		result1 string
    76  	}{result1}
    77  }
    78  
    79  func (fake *FakeDisableOrgIsolationActor) RevokeIsolationSegmentFromOrganizationByName(isolationSegmentName string, orgName string) (v3action.Warnings, error) {
    80  	fake.revokeIsolationSegmentFromOrganizationByNameMutex.Lock()
    81  	ret, specificReturn := fake.revokeIsolationSegmentFromOrganizationByNameReturnsOnCall[len(fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall)]
    82  	fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall = append(fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall, struct {
    83  		isolationSegmentName string
    84  		orgName              string
    85  	}{isolationSegmentName, orgName})
    86  	fake.recordInvocation("RevokeIsolationSegmentFromOrganizationByName", []interface{}{isolationSegmentName, orgName})
    87  	fake.revokeIsolationSegmentFromOrganizationByNameMutex.Unlock()
    88  	if fake.RevokeIsolationSegmentFromOrganizationByNameStub != nil {
    89  		return fake.RevokeIsolationSegmentFromOrganizationByNameStub(isolationSegmentName, orgName)
    90  	}
    91  	if specificReturn {
    92  		return ret.result1, ret.result2
    93  	}
    94  	return fake.revokeIsolationSegmentFromOrganizationByNameReturns.result1, fake.revokeIsolationSegmentFromOrganizationByNameReturns.result2
    95  }
    96  
    97  func (fake *FakeDisableOrgIsolationActor) RevokeIsolationSegmentFromOrganizationByNameCallCount() int {
    98  	fake.revokeIsolationSegmentFromOrganizationByNameMutex.RLock()
    99  	defer fake.revokeIsolationSegmentFromOrganizationByNameMutex.RUnlock()
   100  	return len(fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall)
   101  }
   102  
   103  func (fake *FakeDisableOrgIsolationActor) RevokeIsolationSegmentFromOrganizationByNameArgsForCall(i int) (string, string) {
   104  	fake.revokeIsolationSegmentFromOrganizationByNameMutex.RLock()
   105  	defer fake.revokeIsolationSegmentFromOrganizationByNameMutex.RUnlock()
   106  	return fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall[i].isolationSegmentName, fake.revokeIsolationSegmentFromOrganizationByNameArgsForCall[i].orgName
   107  }
   108  
   109  func (fake *FakeDisableOrgIsolationActor) RevokeIsolationSegmentFromOrganizationByNameReturns(result1 v3action.Warnings, result2 error) {
   110  	fake.RevokeIsolationSegmentFromOrganizationByNameStub = nil
   111  	fake.revokeIsolationSegmentFromOrganizationByNameReturns = struct {
   112  		result1 v3action.Warnings
   113  		result2 error
   114  	}{result1, result2}
   115  }
   116  
   117  func (fake *FakeDisableOrgIsolationActor) RevokeIsolationSegmentFromOrganizationByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) {
   118  	fake.RevokeIsolationSegmentFromOrganizationByNameStub = nil
   119  	if fake.revokeIsolationSegmentFromOrganizationByNameReturnsOnCall == nil {
   120  		fake.revokeIsolationSegmentFromOrganizationByNameReturnsOnCall = make(map[int]struct {
   121  			result1 v3action.Warnings
   122  			result2 error
   123  		})
   124  	}
   125  	fake.revokeIsolationSegmentFromOrganizationByNameReturnsOnCall[i] = struct {
   126  		result1 v3action.Warnings
   127  		result2 error
   128  	}{result1, result2}
   129  }
   130  
   131  func (fake *FakeDisableOrgIsolationActor) Invocations() map[string][][]interface{} {
   132  	fake.invocationsMutex.RLock()
   133  	defer fake.invocationsMutex.RUnlock()
   134  	fake.cloudControllerAPIVersionMutex.RLock()
   135  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   136  	fake.revokeIsolationSegmentFromOrganizationByNameMutex.RLock()
   137  	defer fake.revokeIsolationSegmentFromOrganizationByNameMutex.RUnlock()
   138  	copiedInvocations := map[string][][]interface{}{}
   139  	for key, value := range fake.invocations {
   140  		copiedInvocations[key] = value
   141  	}
   142  	return copiedInvocations
   143  }
   144  
   145  func (fake *FakeDisableOrgIsolationActor) recordInvocation(key string, args []interface{}) {
   146  	fake.invocationsMutex.Lock()
   147  	defer fake.invocationsMutex.Unlock()
   148  	if fake.invocations == nil {
   149  		fake.invocations = map[string][][]interface{}{}
   150  	}
   151  	if fake.invocations[key] == nil {
   152  		fake.invocations[key] = [][]interface{}{}
   153  	}
   154  	fake.invocations[key] = append(fake.invocations[key], args)
   155  }
   156  
   157  var _ v3.DisableOrgIsolationActor = new(FakeDisableOrgIsolationActor)