From 2873102d649da8b625671ba119cfb103e7124f03 Mon Sep 17 00:00:00 2001 From: Ayato Tokubi Date: Tue, 28 May 2024 15:38:43 +0100 Subject: [PATCH] generate --- .../azuresdk/armnetwork/generate.go | 2 +- .../azuresdk/armnetwork/armnetwork.go | 231 +++++++++++++++++- 2 files changed, 231 insertions(+), 2 deletions(-) diff --git a/pkg/util/azureclient/azuresdk/armnetwork/generate.go b/pkg/util/azureclient/azuresdk/armnetwork/generate.go index af0957fb948..a2029abccb2 100644 --- a/pkg/util/azureclient/azuresdk/armnetwork/generate.go +++ b/pkg/util/azureclient/azuresdk/armnetwork/generate.go @@ -4,5 +4,5 @@ package armnetwork // Licensed under the Apache License 2.0. //go:generate rm -rf ../../../../util/mocks/$GOPACKAGE -//go:generate go run ../../../../../vendor/github.com/golang/mock/mockgen -destination=../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/$GOPACKAGE InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PublicIPAddressesClient +//go:generate go run ../../../../../vendor/github.com/golang/mock/mockgen -destination=../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/$GOPACKAGE InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient //go:generate go run ../../../../../vendor/golang.org/x/tools/cmd/goimports -local=github.com/Azure/ARO-RP -e -w ../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go diff --git a/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go b/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go index ab4e7faf643..d74b941d25a 100644 --- a/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go +++ b/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armnetwork (interfaces: InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PublicIPAddressesClient) +// Source: github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armnetwork (interfaces: InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient) // Package mock_armnetwork is a generated GoMock package. package mock_armnetwork @@ -168,6 +168,154 @@ func (mr *MockLoadBalancerBackendAddressPoolsClientMockRecorder) Get(arg0, arg1, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLoadBalancerBackendAddressPoolsClient)(nil).Get), arg0, arg1, arg2, arg3, arg4) } +// MockPrivateEndpointsClient is a mock of PrivateEndpointsClient interface. +type MockPrivateEndpointsClient struct { + ctrl *gomock.Controller + recorder *MockPrivateEndpointsClientMockRecorder +} + +// MockPrivateEndpointsClientMockRecorder is the mock recorder for MockPrivateEndpointsClient. +type MockPrivateEndpointsClientMockRecorder struct { + mock *MockPrivateEndpointsClient +} + +// NewMockPrivateEndpointsClient creates a new mock instance. +func NewMockPrivateEndpointsClient(ctrl *gomock.Controller) *MockPrivateEndpointsClient { + mock := &MockPrivateEndpointsClient{ctrl: ctrl} + mock.recorder = &MockPrivateEndpointsClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPrivateEndpointsClient) EXPECT() *MockPrivateEndpointsClientMockRecorder { + return m.recorder +} + +// CreateOrUpdateAndWait mocks base method. +func (m *MockPrivateEndpointsClient) CreateOrUpdateAndWait(arg0 context.Context, arg1, arg2 string, arg3 armnetwork.PrivateEndpoint, arg4 *armnetwork.PrivateEndpointsClientBeginCreateOrUpdateOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdateAndWait", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateOrUpdateAndWait indicates an expected call of CreateOrUpdateAndWait. +func (mr *MockPrivateEndpointsClientMockRecorder) CreateOrUpdateAndWait(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAndWait", reflect.TypeOf((*MockPrivateEndpointsClient)(nil).CreateOrUpdateAndWait), arg0, arg1, arg2, arg3, arg4) +} + +// DeleteAndWait mocks base method. +func (m *MockPrivateEndpointsClient) DeleteAndWait(arg0 context.Context, arg1, arg2 string, arg3 *armnetwork.PrivateEndpointsClientBeginDeleteOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAndWait", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAndWait indicates an expected call of DeleteAndWait. +func (mr *MockPrivateEndpointsClientMockRecorder) DeleteAndWait(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAndWait", reflect.TypeOf((*MockPrivateEndpointsClient)(nil).DeleteAndWait), arg0, arg1, arg2, arg3) +} + +// Get mocks base method. +func (m *MockPrivateEndpointsClient) Get(arg0 context.Context, arg1, arg2 string, arg3 *armnetwork.PrivateEndpointsClientGetOptions) (armnetwork.PrivateEndpointsClientGetResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(armnetwork.PrivateEndpointsClientGetResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockPrivateEndpointsClientMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPrivateEndpointsClient)(nil).Get), arg0, arg1, arg2, arg3) +} + +// MockPrivateLinkServicesClient is a mock of PrivateLinkServicesClient interface. +type MockPrivateLinkServicesClient struct { + ctrl *gomock.Controller + recorder *MockPrivateLinkServicesClientMockRecorder +} + +// MockPrivateLinkServicesClientMockRecorder is the mock recorder for MockPrivateLinkServicesClient. +type MockPrivateLinkServicesClientMockRecorder struct { + mock *MockPrivateLinkServicesClient +} + +// NewMockPrivateLinkServicesClient creates a new mock instance. +func NewMockPrivateLinkServicesClient(ctrl *gomock.Controller) *MockPrivateLinkServicesClient { + mock := &MockPrivateLinkServicesClient{ctrl: ctrl} + mock.recorder = &MockPrivateLinkServicesClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPrivateLinkServicesClient) EXPECT() *MockPrivateLinkServicesClientMockRecorder { + return m.recorder +} + +// DeletePrivateEndpointConnectionAndWait mocks base method. +func (m *MockPrivateLinkServicesClient) DeletePrivateEndpointConnectionAndWait(arg0 context.Context, arg1, arg2, arg3 string, arg4 *armnetwork.PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeletePrivateEndpointConnectionAndWait", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeletePrivateEndpointConnectionAndWait indicates an expected call of DeletePrivateEndpointConnectionAndWait. +func (mr *MockPrivateLinkServicesClientMockRecorder) DeletePrivateEndpointConnectionAndWait(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePrivateEndpointConnectionAndWait", reflect.TypeOf((*MockPrivateLinkServicesClient)(nil).DeletePrivateEndpointConnectionAndWait), arg0, arg1, arg2, arg3, arg4) +} + +// Get mocks base method. +func (m *MockPrivateLinkServicesClient) Get(arg0 context.Context, arg1, arg2 string, arg3 *armnetwork.PrivateLinkServicesClientGetOptions) (armnetwork.PrivateLinkServicesClientGetResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(armnetwork.PrivateLinkServicesClientGetResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockPrivateLinkServicesClientMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPrivateLinkServicesClient)(nil).Get), arg0, arg1, arg2, arg3) +} + +// List mocks base method. +func (m *MockPrivateLinkServicesClient) List(arg0 context.Context, arg1 string, arg2 *armnetwork.PrivateLinkServicesClientListOptions) ([]*armnetwork.PrivateLinkService, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1, arg2) + ret0, _ := ret[0].([]*armnetwork.PrivateLinkService) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockPrivateLinkServicesClientMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPrivateLinkServicesClient)(nil).List), arg0, arg1, arg2) +} + +// UpdatePrivateEndpointConnection mocks base method. +func (m *MockPrivateLinkServicesClient) UpdatePrivateEndpointConnection(arg0 context.Context, arg1, arg2, arg3 string, arg4 armnetwork.PrivateEndpointConnection, arg5 *armnetwork.PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (armnetwork.PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdatePrivateEndpointConnection", arg0, arg1, arg2, arg3, arg4, arg5) + ret0, _ := ret[0].(armnetwork.PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdatePrivateEndpointConnection indicates an expected call of UpdatePrivateEndpointConnection. +func (mr *MockPrivateLinkServicesClientMockRecorder) UpdatePrivateEndpointConnection(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePrivateEndpointConnection", reflect.TypeOf((*MockPrivateLinkServicesClient)(nil).UpdatePrivateEndpointConnection), arg0, arg1, arg2, arg3, arg4, arg5) +} + // MockPublicIPAddressesClient is a mock of PublicIPAddressesClient interface. type MockPublicIPAddressesClient struct { ctrl *gomock.Controller @@ -248,3 +396,84 @@ func (mr *MockPublicIPAddressesClientMockRecorder) List(arg0, arg1, arg2 interfa mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPublicIPAddressesClient)(nil).List), arg0, arg1, arg2) } + +// MockSecurityGroupsClient is a mock of SecurityGroupsClient interface. +type MockSecurityGroupsClient struct { + ctrl *gomock.Controller + recorder *MockSecurityGroupsClientMockRecorder +} + +// MockSecurityGroupsClientMockRecorder is the mock recorder for MockSecurityGroupsClient. +type MockSecurityGroupsClientMockRecorder struct { + mock *MockSecurityGroupsClient +} + +// NewMockSecurityGroupsClient creates a new mock instance. +func NewMockSecurityGroupsClient(ctrl *gomock.Controller) *MockSecurityGroupsClient { + mock := &MockSecurityGroupsClient{ctrl: ctrl} + mock.recorder = &MockSecurityGroupsClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSecurityGroupsClient) EXPECT() *MockSecurityGroupsClientMockRecorder { + return m.recorder +} + +// CreateOrUpdateAndWait mocks base method. +func (m *MockSecurityGroupsClient) CreateOrUpdateAndWait(arg0 context.Context, arg1, arg2 string, arg3 armnetwork.SecurityGroup, arg4 *armnetwork.SecurityGroupsClientBeginCreateOrUpdateOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdateAndWait", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateOrUpdateAndWait indicates an expected call of CreateOrUpdateAndWait. +func (mr *MockSecurityGroupsClientMockRecorder) CreateOrUpdateAndWait(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAndWait", reflect.TypeOf((*MockSecurityGroupsClient)(nil).CreateOrUpdateAndWait), arg0, arg1, arg2, arg3, arg4) +} + +// DeleteAndWait mocks base method. +func (m *MockSecurityGroupsClient) DeleteAndWait(arg0 context.Context, arg1, arg2 string, arg3 *armnetwork.SecurityGroupsClientBeginDeleteOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAndWait", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAndWait indicates an expected call of DeleteAndWait. +func (mr *MockSecurityGroupsClientMockRecorder) DeleteAndWait(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAndWait", reflect.TypeOf((*MockSecurityGroupsClient)(nil).DeleteAndWait), arg0, arg1, arg2, arg3) +} + +// Get mocks base method. +func (m *MockSecurityGroupsClient) Get(arg0 context.Context, arg1, arg2 string, arg3 *armnetwork.SecurityGroupsClientGetOptions) (armnetwork.SecurityGroupsClientGetResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(armnetwork.SecurityGroupsClientGetResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockSecurityGroupsClientMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSecurityGroupsClient)(nil).Get), arg0, arg1, arg2, arg3) +} + +// List mocks base method. +func (m *MockSecurityGroupsClient) List(arg0 context.Context, arg1 string, arg2 *armnetwork.SecurityGroupsClientListOptions) ([]*armnetwork.SecurityGroup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1, arg2) + ret0, _ := ret[0].([]*armnetwork.SecurityGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List. +func (mr *MockSecurityGroupsClientMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSecurityGroupsClient)(nil).List), arg0, arg1, arg2) +}