github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/command/v3/v3fakes/fake_enable_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 FakeEnableOrgIsolationActor 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  	EntitleIsolationSegmentToOrganizationByNameStub        func(isolationSegmentName string, orgName string) (v3action.Warnings, error)
    22  	entitleIsolationSegmentToOrganizationByNameMutex       sync.RWMutex
    23  	entitleIsolationSegmentToOrganizationByNameArgsForCall []struct {
    24  		isolationSegmentName string
    25  		orgName              string
    26  	}
    27  	entitleIsolationSegmentToOrganizationByNameReturns struct {
    28  		result1 v3action.Warnings
    29  		result2 error
    30  	}
    31  	entitleIsolationSegmentToOrganizationByNameReturnsOnCall 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 *FakeEnableOrgIsolationActor) 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 *FakeEnableOrgIsolationActor) CloudControllerAPIVersionCallCount() int {
    55  	fake.cloudControllerAPIVersionMutex.RLock()
    56  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    57  	return len(fake.cloudControllerAPIVersionArgsForCall)
    58  }
    59  
    60  func (fake *FakeEnableOrgIsolationActor) CloudControllerAPIVersionReturns(result1 string) {
    61  	fake.CloudControllerAPIVersionStub = nil
    62  	fake.cloudControllerAPIVersionReturns = struct {
    63  		result1 string
    64  	}{result1}
    65  }
    66  
    67  func (fake *FakeEnableOrgIsolationActor) 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 *FakeEnableOrgIsolationActor) EntitleIsolationSegmentToOrganizationByName(isolationSegmentName string, orgName string) (v3action.Warnings, error) {
    80  	fake.entitleIsolationSegmentToOrganizationByNameMutex.Lock()
    81  	ret, specificReturn := fake.entitleIsolationSegmentToOrganizationByNameReturnsOnCall[len(fake.entitleIsolationSegmentToOrganizationByNameArgsForCall)]
    82  	fake.entitleIsolationSegmentToOrganizationByNameArgsForCall = append(fake.entitleIsolationSegmentToOrganizationByNameArgsForCall, struct {
    83  		isolationSegmentName string
    84  		orgName              string
    85  	}{isolationSegmentName, orgName})
    86  	fake.recordInvocation("EntitleIsolationSegmentToOrganizationByName", []interface{}{isolationSegmentName, orgName})
    87  	fake.entitleIsolationSegmentToOrganizationByNameMutex.Unlock()
    88  	if fake.EntitleIsolationSegmentToOrganizationByNameStub != nil {
    89  		return fake.EntitleIsolationSegmentToOrganizationByNameStub(isolationSegmentName, orgName)
    90  	}
    91  	if specificReturn {
    92  		return ret.result1, ret.result2
    93  	}
    94  	return fake.entitleIsolationSegmentToOrganizationByNameReturns.result1, fake.entitleIsolationSegmentToOrganizationByNameReturns.result2
    95  }
    96  
    97  func (fake *FakeEnableOrgIsolationActor) EntitleIsolationSegmentToOrganizationByNameCallCount() int {
    98  	fake.entitleIsolationSegmentToOrganizationByNameMutex.RLock()
    99  	defer fake.entitleIsolationSegmentToOrganizationByNameMutex.RUnlock()
   100  	return len(fake.entitleIsolationSegmentToOrganizationByNameArgsForCall)
   101  }
   102  
   103  func (fake *FakeEnableOrgIsolationActor) EntitleIsolationSegmentToOrganizationByNameArgsForCall(i int) (string, string) {
   104  	fake.entitleIsolationSegmentToOrganizationByNameMutex.RLock()
   105  	defer fake.entitleIsolationSegmentToOrganizationByNameMutex.RUnlock()
   106  	return fake.entitleIsolationSegmentToOrganizationByNameArgsForCall[i].isolationSegmentName, fake.entitleIsolationSegmentToOrganizationByNameArgsForCall[i].orgName
   107  }
   108  
   109  func (fake *FakeEnableOrgIsolationActor) EntitleIsolationSegmentToOrganizationByNameReturns(result1 v3action.Warnings, result2 error) {
   110  	fake.EntitleIsolationSegmentToOrganizationByNameStub = nil
   111  	fake.entitleIsolationSegmentToOrganizationByNameReturns = struct {
   112  		result1 v3action.Warnings
   113  		result2 error
   114  	}{result1, result2}
   115  }
   116  
   117  func (fake *FakeEnableOrgIsolationActor) EntitleIsolationSegmentToOrganizationByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) {
   118  	fake.EntitleIsolationSegmentToOrganizationByNameStub = nil
   119  	if fake.entitleIsolationSegmentToOrganizationByNameReturnsOnCall == nil {
   120  		fake.entitleIsolationSegmentToOrganizationByNameReturnsOnCall = make(map[int]struct {
   121  			result1 v3action.Warnings
   122  			result2 error
   123  		})
   124  	}
   125  	fake.entitleIsolationSegmentToOrganizationByNameReturnsOnCall[i] = struct {
   126  		result1 v3action.Warnings
   127  		result2 error
   128  	}{result1, result2}
   129  }
   130  
   131  func (fake *FakeEnableOrgIsolationActor) Invocations() map[string][][]interface{} {
   132  	fake.invocationsMutex.RLock()
   133  	defer fake.invocationsMutex.RUnlock()
   134  	fake.cloudControllerAPIVersionMutex.RLock()
   135  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   136  	fake.entitleIsolationSegmentToOrganizationByNameMutex.RLock()
   137  	defer fake.entitleIsolationSegmentToOrganizationByNameMutex.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 *FakeEnableOrgIsolationActor) 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.EnableOrgIsolationActor = new(FakeEnableOrgIsolationActor)