github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/command/v3/v3fakes/fake_create_isolation_segment_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 FakeCreateIsolationSegmentActor 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  	CreateIsolationSegmentByNameStub        func(isolationSegment v3action.IsolationSegment) (v3action.Warnings, error)
    22  	createIsolationSegmentByNameMutex       sync.RWMutex
    23  	createIsolationSegmentByNameArgsForCall []struct {
    24  		isolationSegment v3action.IsolationSegment
    25  	}
    26  	createIsolationSegmentByNameReturns struct {
    27  		result1 v3action.Warnings
    28  		result2 error
    29  	}
    30  	createIsolationSegmentByNameReturnsOnCall map[int]struct {
    31  		result1 v3action.Warnings
    32  		result2 error
    33  	}
    34  	invocations      map[string][][]interface{}
    35  	invocationsMutex sync.RWMutex
    36  }
    37  
    38  func (fake *FakeCreateIsolationSegmentActor) 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 *FakeCreateIsolationSegmentActor) CloudControllerAPIVersionCallCount() int {
    54  	fake.cloudControllerAPIVersionMutex.RLock()
    55  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
    56  	return len(fake.cloudControllerAPIVersionArgsForCall)
    57  }
    58  
    59  func (fake *FakeCreateIsolationSegmentActor) CloudControllerAPIVersionReturns(result1 string) {
    60  	fake.CloudControllerAPIVersionStub = nil
    61  	fake.cloudControllerAPIVersionReturns = struct {
    62  		result1 string
    63  	}{result1}
    64  }
    65  
    66  func (fake *FakeCreateIsolationSegmentActor) 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 *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByName(isolationSegment v3action.IsolationSegment) (v3action.Warnings, error) {
    79  	fake.createIsolationSegmentByNameMutex.Lock()
    80  	ret, specificReturn := fake.createIsolationSegmentByNameReturnsOnCall[len(fake.createIsolationSegmentByNameArgsForCall)]
    81  	fake.createIsolationSegmentByNameArgsForCall = append(fake.createIsolationSegmentByNameArgsForCall, struct {
    82  		isolationSegment v3action.IsolationSegment
    83  	}{isolationSegment})
    84  	fake.recordInvocation("CreateIsolationSegmentByName", []interface{}{isolationSegment})
    85  	fake.createIsolationSegmentByNameMutex.Unlock()
    86  	if fake.CreateIsolationSegmentByNameStub != nil {
    87  		return fake.CreateIsolationSegmentByNameStub(isolationSegment)
    88  	}
    89  	if specificReturn {
    90  		return ret.result1, ret.result2
    91  	}
    92  	return fake.createIsolationSegmentByNameReturns.result1, fake.createIsolationSegmentByNameReturns.result2
    93  }
    94  
    95  func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameCallCount() int {
    96  	fake.createIsolationSegmentByNameMutex.RLock()
    97  	defer fake.createIsolationSegmentByNameMutex.RUnlock()
    98  	return len(fake.createIsolationSegmentByNameArgsForCall)
    99  }
   100  
   101  func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameArgsForCall(i int) v3action.IsolationSegment {
   102  	fake.createIsolationSegmentByNameMutex.RLock()
   103  	defer fake.createIsolationSegmentByNameMutex.RUnlock()
   104  	return fake.createIsolationSegmentByNameArgsForCall[i].isolationSegment
   105  }
   106  
   107  func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameReturns(result1 v3action.Warnings, result2 error) {
   108  	fake.CreateIsolationSegmentByNameStub = nil
   109  	fake.createIsolationSegmentByNameReturns = struct {
   110  		result1 v3action.Warnings
   111  		result2 error
   112  	}{result1, result2}
   113  }
   114  
   115  func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) {
   116  	fake.CreateIsolationSegmentByNameStub = nil
   117  	if fake.createIsolationSegmentByNameReturnsOnCall == nil {
   118  		fake.createIsolationSegmentByNameReturnsOnCall = make(map[int]struct {
   119  			result1 v3action.Warnings
   120  			result2 error
   121  		})
   122  	}
   123  	fake.createIsolationSegmentByNameReturnsOnCall[i] = struct {
   124  		result1 v3action.Warnings
   125  		result2 error
   126  	}{result1, result2}
   127  }
   128  
   129  func (fake *FakeCreateIsolationSegmentActor) Invocations() map[string][][]interface{} {
   130  	fake.invocationsMutex.RLock()
   131  	defer fake.invocationsMutex.RUnlock()
   132  	fake.cloudControllerAPIVersionMutex.RLock()
   133  	defer fake.cloudControllerAPIVersionMutex.RUnlock()
   134  	fake.createIsolationSegmentByNameMutex.RLock()
   135  	defer fake.createIsolationSegmentByNameMutex.RUnlock()
   136  	copiedInvocations := map[string][][]interface{}{}
   137  	for key, value := range fake.invocations {
   138  		copiedInvocations[key] = value
   139  	}
   140  	return copiedInvocations
   141  }
   142  
   143  func (fake *FakeCreateIsolationSegmentActor) recordInvocation(key string, args []interface{}) {
   144  	fake.invocationsMutex.Lock()
   145  	defer fake.invocationsMutex.Unlock()
   146  	if fake.invocations == nil {
   147  		fake.invocations = map[string][][]interface{}{}
   148  	}
   149  	if fake.invocations[key] == nil {
   150  		fake.invocations[key] = [][]interface{}{}
   151  	}
   152  	fake.invocations[key] = append(fake.invocations[key], args)
   153  }
   154  
   155  var _ v3.CreateIsolationSegmentActor = new(FakeCreateIsolationSegmentActor)