From aaf99084223d18ff06ade028ca6d1b578751803f Mon Sep 17 00:00:00 2001 From: Sagi Laufer Date: Wed, 31 Jul 2024 14:12:35 +0300 Subject: [PATCH] add sets functions back --- client/api_client.go | 3 +++ client/api_client_mock.go | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/client/api_client.go b/client/api_client.go index a6d15fa7..a85007aa 100644 --- a/client/api_client.go +++ b/client/api_client.go @@ -157,6 +157,9 @@ type ApiClientInterface interface { ConfigurationSet(id string) (*ConfigurationSet, error) ConfigurationSetDelete(id string) error ConfigurationVariablesBySetId(setId string) ([]ConfigurationVariable, error) + AssignConfigurationSets(scope string, scopeId string, sets []string) error + UnassignConfigurationSets(scope string, scopeId string, sets []string) error + ConfigurationSetsAssignments(scope string, scopeId string) ([]ConfigurationSet, error) } func NewApiClient(client http.HttpClientInterface, defaultOrganizationId string) ApiClientInterface { diff --git a/client/api_client_mock.go b/client/api_client_mock.go index 17c5c279..0ce0219a 100644 --- a/client/api_client_mock.go +++ b/client/api_client_mock.go @@ -230,6 +230,20 @@ func (mr *MockApiClientInterfaceMockRecorder) AssignCloudCredentialsToProject(ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignCloudCredentialsToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignCloudCredentialsToProject), arg0, arg1) } +// AssignConfigurationSets mocks base method. +func (m *MockApiClientInterface) AssignConfigurationSets(arg0, arg1 string, arg2 []string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AssignConfigurationSets", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// AssignConfigurationSets indicates an expected call of AssignConfigurationSets. +func (mr *MockApiClientInterfaceMockRecorder) AssignConfigurationSets(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).AssignConfigurationSets), arg0, arg1, arg2) +} + // AssignCostCredentialsToProject mocks base method. func (m *MockApiClientInterface) AssignCostCredentialsToProject(arg0, arg1 string) (CostCredentialProjectAssignment, error) { m.ctrl.T.Helper() @@ -423,6 +437,21 @@ func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableCreate(arg0 a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableCreate), arg0) } +// ConfigurationSetsAssignments mocks base method. +func (m *MockApiClientInterface) ConfigurationSetsAssignments(arg0, arg1 string) ([]ConfigurationSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConfigurationSetsAssignments", arg0, arg1) + ret0, _ := ret[0].([]ConfigurationSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ConfigurationSetsAssignments indicates an expected call of ConfigurationSetsAssignments. +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetsAssignments(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetsAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetsAssignments), arg0, arg1) +} + // ConfigurationVariableDelete mocks base method. func (m *MockApiClientInterface) ConfigurationVariableDelete(arg0 string) error { m.ctrl.T.Helper() @@ -2044,6 +2073,20 @@ func (mr *MockApiClientInterfaceMockRecorder) Templates() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Templates", reflect.TypeOf((*MockApiClientInterface)(nil).Templates)) } +// UnassignConfigurationSets mocks base method. +func (m *MockApiClientInterface) UnassignConfigurationSets(arg0, arg1 string, arg2 []string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UnassignConfigurationSets", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// UnassignConfigurationSets indicates an expected call of UnassignConfigurationSets. +func (mr *MockApiClientInterfaceMockRecorder) UnassignConfigurationSets(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnassignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).UnassignConfigurationSets), arg0, arg1, arg2) +} + // UnsubscribeWorkflowTrigger mocks base method. func (m *MockApiClientInterface) UnsubscribeWorkflowTrigger(arg0 string, arg1 WorkflowTriggerEnvironments) error { m.ctrl.T.Helper()