sigs.k8s.io/cluster-api-provider-azure@v1.14.3/azure/services/aso/mock_aso/aso_mock.go (about) 1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by MockGen. DO NOT EDIT. 18 // Source: ../interfaces.go 19 // 20 // Generated by this command: 21 // 22 // mockgen -destination aso_mock.go -package mock_aso -source ../interfaces.go 23 // 24 25 // Package mock_aso is a generated GoMock package. 26 package mock_aso 27 28 import ( 29 context "context" 30 reflect "reflect" 31 time "time" 32 33 genruntime "github.com/Azure/azure-service-operator/v2/pkg/genruntime" 34 gomock "go.uber.org/mock/gomock" 35 v1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" 36 azure "sigs.k8s.io/cluster-api-provider-azure/azure" 37 v1beta10 "sigs.k8s.io/cluster-api/api/v1beta1" 38 client "sigs.k8s.io/controller-runtime/pkg/client" 39 ) 40 41 // MockReconciler is a mock of Reconciler interface. 42 type MockReconciler[T genruntime.MetaObject] struct { 43 ctrl *gomock.Controller 44 recorder *MockReconcilerMockRecorder[T] 45 } 46 47 // MockReconcilerMockRecorder is the mock recorder for MockReconciler. 48 type MockReconcilerMockRecorder[T genruntime.MetaObject] struct { 49 mock *MockReconciler[T] 50 } 51 52 // NewMockReconciler creates a new mock instance. 53 func NewMockReconciler[T genruntime.MetaObject](ctrl *gomock.Controller) *MockReconciler[T] { 54 mock := &MockReconciler[T]{ctrl: ctrl} 55 mock.recorder = &MockReconcilerMockRecorder[T]{mock} 56 return mock 57 } 58 59 // EXPECT returns an object that allows the caller to indicate expected use. 60 func (m *MockReconciler[T]) EXPECT() *MockReconcilerMockRecorder[T] { 61 return m.recorder 62 } 63 64 // CreateOrUpdateResource mocks base method. 65 func (m *MockReconciler[T]) CreateOrUpdateResource(ctx context.Context, spec azure.ASOResourceSpecGetter[T], serviceName string) (T, error) { 66 m.ctrl.T.Helper() 67 ret := m.ctrl.Call(m, "CreateOrUpdateResource", ctx, spec, serviceName) 68 ret0, _ := ret[0].(T) 69 ret1, _ := ret[1].(error) 70 return ret0, ret1 71 } 72 73 // CreateOrUpdateResource indicates an expected call of CreateOrUpdateResource. 74 func (mr *MockReconcilerMockRecorder[T]) CreateOrUpdateResource(ctx, spec, serviceName any) *gomock.Call { 75 mr.mock.ctrl.T.Helper() 76 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateResource", reflect.TypeOf((*MockReconciler[T])(nil).CreateOrUpdateResource), ctx, spec, serviceName) 77 } 78 79 // DeleteResource mocks base method. 80 func (m *MockReconciler[T]) DeleteResource(ctx context.Context, resource T, serviceName string) error { 81 m.ctrl.T.Helper() 82 ret := m.ctrl.Call(m, "DeleteResource", ctx, resource, serviceName) 83 ret0, _ := ret[0].(error) 84 return ret0 85 } 86 87 // DeleteResource indicates an expected call of DeleteResource. 88 func (mr *MockReconcilerMockRecorder[T]) DeleteResource(ctx, resource, serviceName any) *gomock.Call { 89 mr.mock.ctrl.T.Helper() 90 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteResource", reflect.TypeOf((*MockReconciler[T])(nil).DeleteResource), ctx, resource, serviceName) 91 } 92 93 // PauseResource mocks base method. 94 func (m *MockReconciler[T]) PauseResource(ctx context.Context, resource T, serviceName string) error { 95 m.ctrl.T.Helper() 96 ret := m.ctrl.Call(m, "PauseResource", ctx, resource, serviceName) 97 ret0, _ := ret[0].(error) 98 return ret0 99 } 100 101 // PauseResource indicates an expected call of PauseResource. 102 func (mr *MockReconcilerMockRecorder[T]) PauseResource(ctx, resource, serviceName any) *gomock.Call { 103 mr.mock.ctrl.T.Helper() 104 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PauseResource", reflect.TypeOf((*MockReconciler[T])(nil).PauseResource), ctx, resource, serviceName) 105 } 106 107 // MockTagsGetterSetter is a mock of TagsGetterSetter interface. 108 type MockTagsGetterSetter[T genruntime.MetaObject] struct { 109 ctrl *gomock.Controller 110 recorder *MockTagsGetterSetterMockRecorder[T] 111 } 112 113 // MockTagsGetterSetterMockRecorder is the mock recorder for MockTagsGetterSetter. 114 type MockTagsGetterSetterMockRecorder[T genruntime.MetaObject] struct { 115 mock *MockTagsGetterSetter[T] 116 } 117 118 // NewMockTagsGetterSetter creates a new mock instance. 119 func NewMockTagsGetterSetter[T genruntime.MetaObject](ctrl *gomock.Controller) *MockTagsGetterSetter[T] { 120 mock := &MockTagsGetterSetter[T]{ctrl: ctrl} 121 mock.recorder = &MockTagsGetterSetterMockRecorder[T]{mock} 122 return mock 123 } 124 125 // EXPECT returns an object that allows the caller to indicate expected use. 126 func (m *MockTagsGetterSetter[T]) EXPECT() *MockTagsGetterSetterMockRecorder[T] { 127 return m.recorder 128 } 129 130 // GetAdditionalTags mocks base method. 131 func (m *MockTagsGetterSetter[T]) GetAdditionalTags() v1beta1.Tags { 132 m.ctrl.T.Helper() 133 ret := m.ctrl.Call(m, "GetAdditionalTags") 134 ret0, _ := ret[0].(v1beta1.Tags) 135 return ret0 136 } 137 138 // GetAdditionalTags indicates an expected call of GetAdditionalTags. 139 func (mr *MockTagsGetterSetterMockRecorder[T]) GetAdditionalTags() *gomock.Call { 140 mr.mock.ctrl.T.Helper() 141 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdditionalTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).GetAdditionalTags)) 142 } 143 144 // GetDesiredTags mocks base method. 145 func (m *MockTagsGetterSetter[T]) GetDesiredTags(resource T) v1beta1.Tags { 146 m.ctrl.T.Helper() 147 ret := m.ctrl.Call(m, "GetDesiredTags", resource) 148 ret0, _ := ret[0].(v1beta1.Tags) 149 return ret0 150 } 151 152 // GetDesiredTags indicates an expected call of GetDesiredTags. 153 func (mr *MockTagsGetterSetterMockRecorder[T]) GetDesiredTags(resource any) *gomock.Call { 154 mr.mock.ctrl.T.Helper() 155 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDesiredTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).GetDesiredTags), resource) 156 } 157 158 // SetTags mocks base method. 159 func (m *MockTagsGetterSetter[T]) SetTags(resource T, tags v1beta1.Tags) { 160 m.ctrl.T.Helper() 161 m.ctrl.Call(m, "SetTags", resource, tags) 162 } 163 164 // SetTags indicates an expected call of SetTags. 165 func (mr *MockTagsGetterSetterMockRecorder[T]) SetTags(resource, tags any) *gomock.Call { 166 mr.mock.ctrl.T.Helper() 167 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTags", reflect.TypeOf((*MockTagsGetterSetter[T])(nil).SetTags), resource, tags) 168 } 169 170 // MockPatcher is a mock of Patcher interface. 171 type MockPatcher struct { 172 ctrl *gomock.Controller 173 recorder *MockPatcherMockRecorder 174 } 175 176 // MockPatcherMockRecorder is the mock recorder for MockPatcher. 177 type MockPatcherMockRecorder struct { 178 mock *MockPatcher 179 } 180 181 // NewMockPatcher creates a new mock instance. 182 func NewMockPatcher(ctrl *gomock.Controller) *MockPatcher { 183 mock := &MockPatcher{ctrl: ctrl} 184 mock.recorder = &MockPatcherMockRecorder{mock} 185 return mock 186 } 187 188 // EXPECT returns an object that allows the caller to indicate expected use. 189 func (m *MockPatcher) EXPECT() *MockPatcherMockRecorder { 190 return m.recorder 191 } 192 193 // ExtraPatches mocks base method. 194 func (m *MockPatcher) ExtraPatches() []string { 195 m.ctrl.T.Helper() 196 ret := m.ctrl.Call(m, "ExtraPatches") 197 ret0, _ := ret[0].([]string) 198 return ret0 199 } 200 201 // ExtraPatches indicates an expected call of ExtraPatches. 202 func (mr *MockPatcherMockRecorder) ExtraPatches() *gomock.Call { 203 mr.mock.ctrl.T.Helper() 204 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExtraPatches", reflect.TypeOf((*MockPatcher)(nil).ExtraPatches)) 205 } 206 207 // MockScope is a mock of Scope interface. 208 type MockScope struct { 209 ctrl *gomock.Controller 210 recorder *MockScopeMockRecorder 211 } 212 213 // MockScopeMockRecorder is the mock recorder for MockScope. 214 type MockScopeMockRecorder struct { 215 mock *MockScope 216 } 217 218 // NewMockScope creates a new mock instance. 219 func NewMockScope(ctrl *gomock.Controller) *MockScope { 220 mock := &MockScope{ctrl: ctrl} 221 mock.recorder = &MockScopeMockRecorder{mock} 222 return mock 223 } 224 225 // EXPECT returns an object that allows the caller to indicate expected use. 226 func (m *MockScope) EXPECT() *MockScopeMockRecorder { 227 return m.recorder 228 } 229 230 // ASOOwner mocks base method. 231 func (m *MockScope) ASOOwner() client.Object { 232 m.ctrl.T.Helper() 233 ret := m.ctrl.Call(m, "ASOOwner") 234 ret0, _ := ret[0].(client.Object) 235 return ret0 236 } 237 238 // ASOOwner indicates an expected call of ASOOwner. 239 func (mr *MockScopeMockRecorder) ASOOwner() *gomock.Call { 240 mr.mock.ctrl.T.Helper() 241 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ASOOwner", reflect.TypeOf((*MockScope)(nil).ASOOwner)) 242 } 243 244 // ClusterName mocks base method. 245 func (m *MockScope) ClusterName() string { 246 m.ctrl.T.Helper() 247 ret := m.ctrl.Call(m, "ClusterName") 248 ret0, _ := ret[0].(string) 249 return ret0 250 } 251 252 // ClusterName indicates an expected call of ClusterName. 253 func (mr *MockScopeMockRecorder) ClusterName() *gomock.Call { 254 mr.mock.ctrl.T.Helper() 255 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClusterName", reflect.TypeOf((*MockScope)(nil).ClusterName)) 256 } 257 258 // DefaultedAzureCallTimeout mocks base method. 259 func (m *MockScope) DefaultedAzureCallTimeout() time.Duration { 260 m.ctrl.T.Helper() 261 ret := m.ctrl.Call(m, "DefaultedAzureCallTimeout") 262 ret0, _ := ret[0].(time.Duration) 263 return ret0 264 } 265 266 // DefaultedAzureCallTimeout indicates an expected call of DefaultedAzureCallTimeout. 267 func (mr *MockScopeMockRecorder) DefaultedAzureCallTimeout() *gomock.Call { 268 mr.mock.ctrl.T.Helper() 269 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedAzureCallTimeout", reflect.TypeOf((*MockScope)(nil).DefaultedAzureCallTimeout)) 270 } 271 272 // DefaultedAzureServiceReconcileTimeout mocks base method. 273 func (m *MockScope) DefaultedAzureServiceReconcileTimeout() time.Duration { 274 m.ctrl.T.Helper() 275 ret := m.ctrl.Call(m, "DefaultedAzureServiceReconcileTimeout") 276 ret0, _ := ret[0].(time.Duration) 277 return ret0 278 } 279 280 // DefaultedAzureServiceReconcileTimeout indicates an expected call of DefaultedAzureServiceReconcileTimeout. 281 func (mr *MockScopeMockRecorder) DefaultedAzureServiceReconcileTimeout() *gomock.Call { 282 mr.mock.ctrl.T.Helper() 283 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedAzureServiceReconcileTimeout", reflect.TypeOf((*MockScope)(nil).DefaultedAzureServiceReconcileTimeout)) 284 } 285 286 // DefaultedReconcilerRequeue mocks base method. 287 func (m *MockScope) DefaultedReconcilerRequeue() time.Duration { 288 m.ctrl.T.Helper() 289 ret := m.ctrl.Call(m, "DefaultedReconcilerRequeue") 290 ret0, _ := ret[0].(time.Duration) 291 return ret0 292 } 293 294 // DefaultedReconcilerRequeue indicates an expected call of DefaultedReconcilerRequeue. 295 func (mr *MockScopeMockRecorder) DefaultedReconcilerRequeue() *gomock.Call { 296 mr.mock.ctrl.T.Helper() 297 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultedReconcilerRequeue", reflect.TypeOf((*MockScope)(nil).DefaultedReconcilerRequeue)) 298 } 299 300 // DeleteLongRunningOperationState mocks base method. 301 func (m *MockScope) DeleteLongRunningOperationState(arg0, arg1, arg2 string) { 302 m.ctrl.T.Helper() 303 m.ctrl.Call(m, "DeleteLongRunningOperationState", arg0, arg1, arg2) 304 } 305 306 // DeleteLongRunningOperationState indicates an expected call of DeleteLongRunningOperationState. 307 func (mr *MockScopeMockRecorder) DeleteLongRunningOperationState(arg0, arg1, arg2 any) *gomock.Call { 308 mr.mock.ctrl.T.Helper() 309 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).DeleteLongRunningOperationState), arg0, arg1, arg2) 310 } 311 312 // GetClient mocks base method. 313 func (m *MockScope) GetClient() client.Client { 314 m.ctrl.T.Helper() 315 ret := m.ctrl.Call(m, "GetClient") 316 ret0, _ := ret[0].(client.Client) 317 return ret0 318 } 319 320 // GetClient indicates an expected call of GetClient. 321 func (mr *MockScopeMockRecorder) GetClient() *gomock.Call { 322 mr.mock.ctrl.T.Helper() 323 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClient", reflect.TypeOf((*MockScope)(nil).GetClient)) 324 } 325 326 // GetLongRunningOperationState mocks base method. 327 func (m *MockScope) GetLongRunningOperationState(arg0, arg1, arg2 string) *v1beta1.Future { 328 m.ctrl.T.Helper() 329 ret := m.ctrl.Call(m, "GetLongRunningOperationState", arg0, arg1, arg2) 330 ret0, _ := ret[0].(*v1beta1.Future) 331 return ret0 332 } 333 334 // GetLongRunningOperationState indicates an expected call of GetLongRunningOperationState. 335 func (mr *MockScopeMockRecorder) GetLongRunningOperationState(arg0, arg1, arg2 any) *gomock.Call { 336 mr.mock.ctrl.T.Helper() 337 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).GetLongRunningOperationState), arg0, arg1, arg2) 338 } 339 340 // SetLongRunningOperationState mocks base method. 341 func (m *MockScope) SetLongRunningOperationState(arg0 *v1beta1.Future) { 342 m.ctrl.T.Helper() 343 m.ctrl.Call(m, "SetLongRunningOperationState", arg0) 344 } 345 346 // SetLongRunningOperationState indicates an expected call of SetLongRunningOperationState. 347 func (mr *MockScopeMockRecorder) SetLongRunningOperationState(arg0 any) *gomock.Call { 348 mr.mock.ctrl.T.Helper() 349 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLongRunningOperationState", reflect.TypeOf((*MockScope)(nil).SetLongRunningOperationState), arg0) 350 } 351 352 // UpdateDeleteStatus mocks base method. 353 func (m *MockScope) UpdateDeleteStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) { 354 m.ctrl.T.Helper() 355 m.ctrl.Call(m, "UpdateDeleteStatus", arg0, arg1, arg2) 356 } 357 358 // UpdateDeleteStatus indicates an expected call of UpdateDeleteStatus. 359 func (mr *MockScopeMockRecorder) UpdateDeleteStatus(arg0, arg1, arg2 any) *gomock.Call { 360 mr.mock.ctrl.T.Helper() 361 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDeleteStatus", reflect.TypeOf((*MockScope)(nil).UpdateDeleteStatus), arg0, arg1, arg2) 362 } 363 364 // UpdatePatchStatus mocks base method. 365 func (m *MockScope) UpdatePatchStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) { 366 m.ctrl.T.Helper() 367 m.ctrl.Call(m, "UpdatePatchStatus", arg0, arg1, arg2) 368 } 369 370 // UpdatePatchStatus indicates an expected call of UpdatePatchStatus. 371 func (mr *MockScopeMockRecorder) UpdatePatchStatus(arg0, arg1, arg2 any) *gomock.Call { 372 mr.mock.ctrl.T.Helper() 373 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePatchStatus", reflect.TypeOf((*MockScope)(nil).UpdatePatchStatus), arg0, arg1, arg2) 374 } 375 376 // UpdatePutStatus mocks base method. 377 func (m *MockScope) UpdatePutStatus(arg0 v1beta10.ConditionType, arg1 string, arg2 error) { 378 m.ctrl.T.Helper() 379 m.ctrl.Call(m, "UpdatePutStatus", arg0, arg1, arg2) 380 } 381 382 // UpdatePutStatus indicates an expected call of UpdatePutStatus. 383 func (mr *MockScopeMockRecorder) UpdatePutStatus(arg0, arg1, arg2 any) *gomock.Call { 384 mr.mock.ctrl.T.Helper() 385 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePutStatus", reflect.TypeOf((*MockScope)(nil).UpdatePutStatus), arg0, arg1, arg2) 386 }