github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v2/v2fakes/fake_security_groups_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package v2fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/liamawhite/cli-with-i18n/actor/v2action"
     8  	"github.com/liamawhite/cli-with-i18n/command/v2"
     9  )
    10  
    11  type FakeSecurityGroupsActor 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  	GetSecurityGroupsWithOrganizationSpaceAndLifecycleStub        func(includeStaging bool) ([]v2action.SecurityGroupWithOrganizationSpaceAndLifecycle, v2action.Warnings, error)
    22  	getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex       sync.RWMutex
    23  	getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall []struct {
    24  		includeStaging bool
    25  	}
    26  	getSecurityGroupsWithOrganizationSpaceAndLifecycleReturns struct {
    27  		result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle
    28  		result2 v2action.Warnings
    29  		result3 error
    30  	}
    31  	getSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall map[int]struct {
    32  		result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle
    33  		result2 v2action.Warnings
    34  		result3 error
    35  	}
    36  	invocations      map[string][][]interface{}
    37  	invocationsMutex sync.RWMutex
    38  }
    39  
    40  func (fake *FakeSecurityGroupsActor) CloudControllerAPIVersion() string {
    41  	fake.cloudControllerAPIVersionMutex.Lock()
    42  	ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)]
    43  	fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{})
    44  	fake.recordInvocation("CloudControllerAPIVersion", []interface{}{})
    45  	fake.cloudControllerAPIVersionMutex.Unlock()
    46  	if fake.CloudControllerAPIVersionStub != nil {
    47  		return fake.CloudControllerAPIVersionStub()
    48  	}
    49  	if specificReturn {
    50  		return ret.result1
    51  	}
    52  	return fake.cloudControllerAPIVersionReturns.result1
    53  }
    54  
    55  func (fake *FakeSecurityGroupsActor) CloudControllerAPIVersionCallCount() int {
    56  	fake.cloudControllerAPIVersionMutex.RLock()
    57  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    58  	return len(fake.cloudControllerAPIVersionArgsForCall)
    59  }
    60  
    61  func (fake *FakeSecurityGroupsActor) CloudControllerAPIVersionReturns(result1 string) {
    62  	fake.CloudControllerAPIVersionStub = nil
    63  	fake.cloudControllerAPIVersionReturns = struct {
    64  		result1 string
    65  	}{result1}
    66  }
    67  
    68  func (fake *FakeSecurityGroupsActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) {
    69  	fake.CloudControllerAPIVersionStub = nil
    70  	if fake.cloudControllerAPIVersionReturnsOnCall == nil {
    71  		fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct {
    72  			result1 string
    73  		})
    74  	}
    75  	fake.cloudControllerAPIVersionReturnsOnCall[i] = struct {
    76  		result1 string
    77  	}{result1}
    78  }
    79  
    80  func (fake *FakeSecurityGroupsActor) GetSecurityGroupsWithOrganizationSpaceAndLifecycle(includeStaging bool) ([]v2action.SecurityGroupWithOrganizationSpaceAndLifecycle, v2action.Warnings, error) {
    81  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.Lock()
    82  	ret, specificReturn := fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall[len(fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall)]
    83  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall = append(fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall, struct {
    84  		includeStaging bool
    85  	}{includeStaging})
    86  	fake.recordInvocation("GetSecurityGroupsWithOrganizationSpaceAndLifecycle", []interface{}{includeStaging})
    87  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.Unlock()
    88  	if fake.GetSecurityGroupsWithOrganizationSpaceAndLifecycleStub != nil {
    89  		return fake.GetSecurityGroupsWithOrganizationSpaceAndLifecycleStub(includeStaging)
    90  	}
    91  	if specificReturn {
    92  		return ret.result1, ret.result2, ret.result3
    93  	}
    94  	return fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturns.result1, fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturns.result2, fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturns.result3
    95  }
    96  
    97  func (fake *FakeSecurityGroupsActor) GetSecurityGroupsWithOrganizationSpaceAndLifecycleCallCount() int {
    98  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RLock()
    99  	defer fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RUnlock()
   100  	return len(fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall)
   101  }
   102  
   103  func (fake *FakeSecurityGroupsActor) GetSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall(i int) bool {
   104  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RLock()
   105  	defer fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RUnlock()
   106  	return fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleArgsForCall[i].includeStaging
   107  }
   108  
   109  func (fake *FakeSecurityGroupsActor) GetSecurityGroupsWithOrganizationSpaceAndLifecycleReturns(result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle, result2 v2action.Warnings, result3 error) {
   110  	fake.GetSecurityGroupsWithOrganizationSpaceAndLifecycleStub = nil
   111  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturns = struct {
   112  		result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle
   113  		result2 v2action.Warnings
   114  		result3 error
   115  	}{result1, result2, result3}
   116  }
   117  
   118  func (fake *FakeSecurityGroupsActor) GetSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall(i int, result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle, result2 v2action.Warnings, result3 error) {
   119  	fake.GetSecurityGroupsWithOrganizationSpaceAndLifecycleStub = nil
   120  	if fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall == nil {
   121  		fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall = make(map[int]struct {
   122  			result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle
   123  			result2 v2action.Warnings
   124  			result3 error
   125  		})
   126  	}
   127  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleReturnsOnCall[i] = struct {
   128  		result1 []v2action.SecurityGroupWithOrganizationSpaceAndLifecycle
   129  		result2 v2action.Warnings
   130  		result3 error
   131  	}{result1, result2, result3}
   132  }
   133  
   134  func (fake *FakeSecurityGroupsActor) Invocations() map[string][][]interface{} {
   135  	fake.invocationsMutex.RLock()
   136  	defer fake.invocationsMutex.RUnlock()
   137  	fake.cloudControllerAPIVersionMutex.RLock()
   138  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   139  	fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RLock()
   140  	defer fake.getSecurityGroupsWithOrganizationSpaceAndLifecycleMutex.RUnlock()
   141  	copiedInvocations := map[string][][]interface{}{}
   142  	for key, value := range fake.invocations {
   143  		copiedInvocations[key] = value
   144  	}
   145  	return copiedInvocations
   146  }
   147  
   148  func (fake *FakeSecurityGroupsActor) recordInvocation(key string, args []interface{}) {
   149  	fake.invocationsMutex.Lock()
   150  	defer fake.invocationsMutex.Unlock()
   151  	if fake.invocations == nil {
   152  		fake.invocations = map[string][][]interface{}{}
   153  	}
   154  	if fake.invocations[key] == nil {
   155  		fake.invocations[key] = [][]interface{}{}
   156  	}
   157  	fake.invocations[key] = append(fake.invocations[key], args)
   158  }
   159  
   160  var _ v2.SecurityGroupsActor = new(FakeSecurityGroupsActor)