github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/command/v2/v2fakes/fake_set_health_check_actor.go (about)

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