github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/command/v3/v3fakes/fake_isolation_segments_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 FakeIsolationSegmentsActor 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  	GetIsolationSegmentSummariesStub        func() ([]v3action.IsolationSegmentSummary, v3action.Warnings, error)
    22  	getIsolationSegmentSummariesMutex       sync.RWMutex
    23  	getIsolationSegmentSummariesArgsForCall []struct{}
    24  	getIsolationSegmentSummariesReturns     struct {
    25  		result1 []v3action.IsolationSegmentSummary
    26  		result2 v3action.Warnings
    27  		result3 error
    28  	}
    29  	getIsolationSegmentSummariesReturnsOnCall map[int]struct {
    30  		result1 []v3action.IsolationSegmentSummary
    31  		result2 v3action.Warnings
    32  		result3 error
    33  	}
    34  	invocations      map[string][][]interface{}
    35  	invocationsMutex sync.RWMutex
    36  }
    37  
    38  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersion() string {
    39  	fake.cloudControllerAPIVersionMutex.Lock()
    40  	ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)]
    41  	fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{})
    42  	fake.recordInvocation("CloudControllerAPIVersion", []interface{}{})
    43  	fake.cloudControllerAPIVersionMutex.Unlock()
    44  	if fake.CloudControllerAPIVersionStub != nil {
    45  		return fake.CloudControllerAPIVersionStub()
    46  	}
    47  	if specificReturn {
    48  		return ret.result1
    49  	}
    50  	return fake.cloudControllerAPIVersionReturns.result1
    51  }
    52  
    53  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionCallCount() int {
    54  	fake.cloudControllerAPIVersionMutex.RLock()
    55  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    56  	return len(fake.cloudControllerAPIVersionArgsForCall)
    57  }
    58  
    59  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionReturns(result1 string) {
    60  	fake.CloudControllerAPIVersionStub = nil
    61  	fake.cloudControllerAPIVersionReturns = struct {
    62  		result1 string
    63  	}{result1}
    64  }
    65  
    66  func (fake *FakeIsolationSegmentsActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) {
    67  	fake.CloudControllerAPIVersionStub = nil
    68  	if fake.cloudControllerAPIVersionReturnsOnCall == nil {
    69  		fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct {
    70  			result1 string
    71  		})
    72  	}
    73  	fake.cloudControllerAPIVersionReturnsOnCall[i] = struct {
    74  		result1 string
    75  	}{result1}
    76  }
    77  
    78  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummaries() ([]v3action.IsolationSegmentSummary, v3action.Warnings, error) {
    79  	fake.getIsolationSegmentSummariesMutex.Lock()
    80  	ret, specificReturn := fake.getIsolationSegmentSummariesReturnsOnCall[len(fake.getIsolationSegmentSummariesArgsForCall)]
    81  	fake.getIsolationSegmentSummariesArgsForCall = append(fake.getIsolationSegmentSummariesArgsForCall, struct{}{})
    82  	fake.recordInvocation("GetIsolationSegmentSummaries", []interface{}{})
    83  	fake.getIsolationSegmentSummariesMutex.Unlock()
    84  	if fake.GetIsolationSegmentSummariesStub != nil {
    85  		return fake.GetIsolationSegmentSummariesStub()
    86  	}
    87  	if specificReturn {
    88  		return ret.result1, ret.result2, ret.result3
    89  	}
    90  	return fake.getIsolationSegmentSummariesReturns.result1, fake.getIsolationSegmentSummariesReturns.result2, fake.getIsolationSegmentSummariesReturns.result3
    91  }
    92  
    93  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesCallCount() int {
    94  	fake.getIsolationSegmentSummariesMutex.RLock()
    95  	defer fake.getIsolationSegmentSummariesMutex.RUnlock()
    96  	return len(fake.getIsolationSegmentSummariesArgsForCall)
    97  }
    98  
    99  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesReturns(result1 []v3action.IsolationSegmentSummary, result2 v3action.Warnings, result3 error) {
   100  	fake.GetIsolationSegmentSummariesStub = nil
   101  	fake.getIsolationSegmentSummariesReturns = struct {
   102  		result1 []v3action.IsolationSegmentSummary
   103  		result2 v3action.Warnings
   104  		result3 error
   105  	}{result1, result2, result3}
   106  }
   107  
   108  func (fake *FakeIsolationSegmentsActor) GetIsolationSegmentSummariesReturnsOnCall(i int, result1 []v3action.IsolationSegmentSummary, result2 v3action.Warnings, result3 error) {
   109  	fake.GetIsolationSegmentSummariesStub = nil
   110  	if fake.getIsolationSegmentSummariesReturnsOnCall == nil {
   111  		fake.getIsolationSegmentSummariesReturnsOnCall = make(map[int]struct {
   112  			result1 []v3action.IsolationSegmentSummary
   113  			result2 v3action.Warnings
   114  			result3 error
   115  		})
   116  	}
   117  	fake.getIsolationSegmentSummariesReturnsOnCall[i] = struct {
   118  		result1 []v3action.IsolationSegmentSummary
   119  		result2 v3action.Warnings
   120  		result3 error
   121  	}{result1, result2, result3}
   122  }
   123  
   124  func (fake *FakeIsolationSegmentsActor) Invocations() map[string][][]interface{} {
   125  	fake.invocationsMutex.RLock()
   126  	defer fake.invocationsMutex.RUnlock()
   127  	fake.cloudControllerAPIVersionMutex.RLock()
   128  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   129  	fake.getIsolationSegmentSummariesMutex.RLock()
   130  	defer fake.getIsolationSegmentSummariesMutex.RUnlock()
   131  	copiedInvocations := map[string][][]interface{}{}
   132  	for key, value := range fake.invocations {
   133  		copiedInvocations[key] = value
   134  	}
   135  	return copiedInvocations
   136  }
   137  
   138  func (fake *FakeIsolationSegmentsActor) recordInvocation(key string, args []interface{}) {
   139  	fake.invocationsMutex.Lock()
   140  	defer fake.invocationsMutex.Unlock()
   141  	if fake.invocations == nil {
   142  		fake.invocations = map[string][][]interface{}{}
   143  	}
   144  	if fake.invocations[key] == nil {
   145  		fake.invocations[key] = [][]interface{}{}
   146  	}
   147  	fake.invocations[key] = append(fake.invocations[key], args)
   148  }
   149  
   150  var _ v3.IsolationSegmentsActor = new(FakeIsolationSegmentsActor)