From 1e9a5c406970f8f81655320fd2c52bac5f9ad36c Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Fri, 27 Dec 2024 08:03:48 -0600 Subject: [PATCH 1/3] Feat: support new vcs_connection resource --- README.md | 2 +- client/api_client.go | 5 + client/api_client_mock.go | 1155 +++++++++-------- client/http/client_mock.go | 41 +- client/vcs_connection.go | 81 ++ client/vcs_connection_test.go | 171 +++ env0/provider.go | 1 + env0/resource_vcs_connection.go | 162 +++ env0/resource_vcs_connection_test.go | 225 ++++ env0/validators.go | 12 + env0/validators_test.go | 169 +++ .../resources/env0_vcs_connection/resource.tf | 23 + .../env0_workflow_triggers copy/resource.tf | 31 - tests/integration/037_vcs_connection/conf.tf | 15 + .../037_vcs_connection/expected_outputs.json | 1 + tests/integration/037_vcs_connection/main.tf | 16 + 16 files changed, 1518 insertions(+), 592 deletions(-) create mode 100644 client/vcs_connection.go create mode 100644 client/vcs_connection_test.go create mode 100644 env0/resource_vcs_connection.go create mode 100644 env0/resource_vcs_connection_test.go create mode 100644 env0/validators_test.go create mode 100644 examples/resources/env0_vcs_connection/resource.tf delete mode 100644 examples/resources/env0_workflow_triggers copy/resource.tf create mode 100644 tests/integration/037_vcs_connection/conf.tf create mode 100644 tests/integration/037_vcs_connection/expected_outputs.json create mode 100644 tests/integration/037_vcs_connection/main.tf diff --git a/README.md b/README.md index 6fefb9b9..a13e419a 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ export PATH=$PATH:$(go env GOPATH) # if not 2. Install mockgen ``` -go install go.uber.org/mock/mockgen@v0.3.0 +go install go.uber.org/mock/mockgen@v0.5.0 ``` 3. Make sure to add this line in files that include the interface you'd wish to mock: diff --git a/client/api_client.go b/client/api_client.go index ef842b62..d91fea52 100644 --- a/client/api_client.go +++ b/client/api_client.go @@ -170,6 +170,11 @@ type ApiClientInterface interface { CloudAccount(id string) (*CloudAccount, error) CloudAccounts() ([]CloudAccount, error) VcsToken(vcsType string, repository string) (*VscToken, error) + VcsConnection(id string) (*VcsConnection, error) + VcsConnectionCreate(payload VcsConnectionCreatePayload) (*VcsConnection, error) + VcsConnectionUpdate(id string, payload VcsConnectionUpdatePayload) (*VcsConnection, error) + VcsConnectionDelete(id string) error + VcsConnections() ([]VcsConnection, error) } func NewApiClient(client http.HttpClientInterface, defaultOrganizationId string) ApiClientInterface { diff --git a/client/api_client_mock.go b/client/api_client_mock.go index 2ad01ad9..8799eb0d 100644 --- a/client/api_client_mock.go +++ b/client/api_client_mock.go @@ -19,6 +19,7 @@ import ( type MockApiClientInterface struct { ctrl *gomock.Controller recorder *MockApiClientInterfaceMockRecorder + isgomock struct{} } // MockApiClientInterfaceMockRecorder is the mock recorder for MockApiClientInterface. @@ -39,18 +40,18 @@ func (m *MockApiClientInterface) EXPECT() *MockApiClientInterfaceMockRecorder { } // AgentValues mocks base method. -func (m *MockApiClientInterface) AgentValues(arg0 string) (string, error) { +func (m *MockApiClientInterface) AgentValues(id string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AgentValues", arg0) + ret := m.ctrl.Call(m, "AgentValues", id) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // AgentValues indicates an expected call of AgentValues. -func (mr *MockApiClientInterfaceMockRecorder) AgentValues(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AgentValues(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentValues", reflect.TypeOf((*MockApiClientInterface)(nil).AgentValues), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AgentValues", reflect.TypeOf((*MockApiClientInterface)(nil).AgentValues), id) } // Agents mocks base method. @@ -69,32 +70,32 @@ func (mr *MockApiClientInterfaceMockRecorder) Agents() *gomock.Call { } // ApiKeyCreate mocks base method. -func (m *MockApiClientInterface) ApiKeyCreate(arg0 ApiKeyCreatePayload) (*ApiKey, error) { +func (m *MockApiClientInterface) ApiKeyCreate(payload ApiKeyCreatePayload) (*ApiKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApiKeyCreate", arg0) + ret := m.ctrl.Call(m, "ApiKeyCreate", payload) ret0, _ := ret[0].(*ApiKey) ret1, _ := ret[1].(error) return ret0, ret1 } // ApiKeyCreate indicates an expected call of ApiKeyCreate. -func (mr *MockApiClientInterfaceMockRecorder) ApiKeyCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApiKeyCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ApiKeyCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ApiKeyCreate), payload) } // ApiKeyDelete mocks base method. -func (m *MockApiClientInterface) ApiKeyDelete(arg0 string) error { +func (m *MockApiClientInterface) ApiKeyDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApiKeyDelete", arg0) + ret := m.ctrl.Call(m, "ApiKeyDelete", id) ret0, _ := ret[0].(error) return ret0 } // ApiKeyDelete indicates an expected call of ApiKeyDelete. -func (mr *MockApiClientInterfaceMockRecorder) ApiKeyDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApiKeyDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ApiKeyDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApiKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ApiKeyDelete), id) } // ApiKeys mocks base method. @@ -113,255 +114,255 @@ func (mr *MockApiClientInterfaceMockRecorder) ApiKeys() *gomock.Call { } // ApprovalPolicies mocks base method. -func (m *MockApiClientInterface) ApprovalPolicies(arg0 string) ([]ApprovalPolicy, error) { +func (m *MockApiClientInterface) ApprovalPolicies(name string) ([]ApprovalPolicy, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicies", arg0) + ret := m.ctrl.Call(m, "ApprovalPolicies", name) ret0, _ := ret[0].([]ApprovalPolicy) ret1, _ := ret[1].(error) return ret0, ret1 } // ApprovalPolicies indicates an expected call of ApprovalPolicies. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicies(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicies(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicies", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicies), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicies", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicies), name) } // ApprovalPolicyAssign mocks base method. -func (m *MockApiClientInterface) ApprovalPolicyAssign(arg0 *ApprovalPolicyAssignment) (*ApprovalPolicyAssignment, error) { +func (m *MockApiClientInterface) ApprovalPolicyAssign(assignment *ApprovalPolicyAssignment) (*ApprovalPolicyAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicyAssign", arg0) + ret := m.ctrl.Call(m, "ApprovalPolicyAssign", assignment) ret0, _ := ret[0].(*ApprovalPolicyAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // ApprovalPolicyAssign indicates an expected call of ApprovalPolicyAssign. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyAssign(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyAssign(assignment any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyAssign", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyAssign), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyAssign", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyAssign), assignment) } // ApprovalPolicyByScope mocks base method. -func (m *MockApiClientInterface) ApprovalPolicyByScope(arg0, arg1 string) ([]ApprovalPolicyByScope, error) { +func (m *MockApiClientInterface) ApprovalPolicyByScope(scope, scopeId string) ([]ApprovalPolicyByScope, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicyByScope", arg0, arg1) + ret := m.ctrl.Call(m, "ApprovalPolicyByScope", scope, scopeId) ret0, _ := ret[0].([]ApprovalPolicyByScope) ret1, _ := ret[1].(error) return ret0, ret1 } // ApprovalPolicyByScope indicates an expected call of ApprovalPolicyByScope. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyByScope(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyByScope(scope, scopeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyByScope", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyByScope), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyByScope", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyByScope), scope, scopeId) } // ApprovalPolicyCreate mocks base method. -func (m *MockApiClientInterface) ApprovalPolicyCreate(arg0 *ApprovalPolicyCreatePayload) (*ApprovalPolicy, error) { +func (m *MockApiClientInterface) ApprovalPolicyCreate(payload *ApprovalPolicyCreatePayload) (*ApprovalPolicy, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicyCreate", arg0) + ret := m.ctrl.Call(m, "ApprovalPolicyCreate", payload) ret0, _ := ret[0].(*ApprovalPolicy) ret1, _ := ret[1].(error) return ret0, ret1 } // ApprovalPolicyCreate indicates an expected call of ApprovalPolicyCreate. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyCreate), payload) } // ApprovalPolicyUnassign mocks base method. -func (m *MockApiClientInterface) ApprovalPolicyUnassign(arg0 string) error { +func (m *MockApiClientInterface) ApprovalPolicyUnassign(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicyUnassign", arg0) + ret := m.ctrl.Call(m, "ApprovalPolicyUnassign", id) ret0, _ := ret[0].(error) return ret0 } // ApprovalPolicyUnassign indicates an expected call of ApprovalPolicyUnassign. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyUnassign(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyUnassign(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyUnassign", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyUnassign), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyUnassign", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyUnassign), id) } // ApprovalPolicyUpdate mocks base method. -func (m *MockApiClientInterface) ApprovalPolicyUpdate(arg0 *ApprovalPolicyUpdatePayload) (*ApprovalPolicy, error) { +func (m *MockApiClientInterface) ApprovalPolicyUpdate(payload *ApprovalPolicyUpdatePayload) (*ApprovalPolicy, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApprovalPolicyUpdate", arg0) + ret := m.ctrl.Call(m, "ApprovalPolicyUpdate", payload) ret0, _ := ret[0].(*ApprovalPolicy) ret1, _ := ret[1].(error) return ret0, ret1 } // ApprovalPolicyUpdate indicates an expected call of ApprovalPolicyUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyUpdate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ApprovalPolicyUpdate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyUpdate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApprovalPolicyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ApprovalPolicyUpdate), payload) } // AssignAgentsToProjects mocks base method. -func (m *MockApiClientInterface) AssignAgentsToProjects(arg0 AssignProjectsAgentsAssignmentsPayload) (*ProjectsAgentsAssignments, error) { +func (m *MockApiClientInterface) AssignAgentsToProjects(payload AssignProjectsAgentsAssignmentsPayload) (*ProjectsAgentsAssignments, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignAgentsToProjects", arg0) + ret := m.ctrl.Call(m, "AssignAgentsToProjects", payload) ret0, _ := ret[0].(*ProjectsAgentsAssignments) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignAgentsToProjects indicates an expected call of AssignAgentsToProjects. -func (mr *MockApiClientInterfaceMockRecorder) AssignAgentsToProjects(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignAgentsToProjects(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignAgentsToProjects", reflect.TypeOf((*MockApiClientInterface)(nil).AssignAgentsToProjects), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignAgentsToProjects", reflect.TypeOf((*MockApiClientInterface)(nil).AssignAgentsToProjects), payload) } // AssignCloudCredentialsToProject mocks base method. -func (m *MockApiClientInterface) AssignCloudCredentialsToProject(arg0, arg1 string) (CloudCredentialsProjectAssignment, error) { +func (m *MockApiClientInterface) AssignCloudCredentialsToProject(projectId, credentialId string) (CloudCredentialsProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignCloudCredentialsToProject", arg0, arg1) + ret := m.ctrl.Call(m, "AssignCloudCredentialsToProject", projectId, credentialId) ret0, _ := ret[0].(CloudCredentialsProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignCloudCredentialsToProject indicates an expected call of AssignCloudCredentialsToProject. -func (mr *MockApiClientInterfaceMockRecorder) AssignCloudCredentialsToProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignCloudCredentialsToProject(projectId, credentialId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignCloudCredentialsToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignCloudCredentialsToProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignCloudCredentialsToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignCloudCredentialsToProject), projectId, credentialId) } // AssignConfigurationSets mocks base method. -func (m *MockApiClientInterface) AssignConfigurationSets(arg0, arg1 string, arg2 []string) error { +func (m *MockApiClientInterface) AssignConfigurationSets(scope, scopeId string, sets []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignConfigurationSets", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AssignConfigurationSets", scope, scopeId, sets) ret0, _ := ret[0].(error) return ret0 } // AssignConfigurationSets indicates an expected call of AssignConfigurationSets. -func (mr *MockApiClientInterfaceMockRecorder) AssignConfigurationSets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignConfigurationSets(scope, scopeId, sets any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).AssignConfigurationSets), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).AssignConfigurationSets), scope, scopeId, sets) } // AssignCostCredentialsToProject mocks base method. -func (m *MockApiClientInterface) AssignCostCredentialsToProject(arg0, arg1 string) (CostCredentialProjectAssignment, error) { +func (m *MockApiClientInterface) AssignCostCredentialsToProject(projectId, credentialId string) (CostCredentialProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignCostCredentialsToProject", arg0, arg1) + ret := m.ctrl.Call(m, "AssignCostCredentialsToProject", projectId, credentialId) ret0, _ := ret[0].(CostCredentialProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignCostCredentialsToProject indicates an expected call of AssignCostCredentialsToProject. -func (mr *MockApiClientInterfaceMockRecorder) AssignCostCredentialsToProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignCostCredentialsToProject(projectId, credentialId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignCostCredentialsToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignCostCredentialsToProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignCostCredentialsToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignCostCredentialsToProject), projectId, credentialId) } // AssignTemplateToProject mocks base method. -func (m *MockApiClientInterface) AssignTemplateToProject(arg0 string, arg1 TemplateAssignmentToProjectPayload) (Template, error) { +func (m *MockApiClientInterface) AssignTemplateToProject(id string, payload TemplateAssignmentToProjectPayload) (Template, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignTemplateToProject", arg0, arg1) + ret := m.ctrl.Call(m, "AssignTemplateToProject", id, payload) ret0, _ := ret[0].(Template) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignTemplateToProject indicates an expected call of AssignTemplateToProject. -func (mr *MockApiClientInterfaceMockRecorder) AssignTemplateToProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignTemplateToProject(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignTemplateToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignTemplateToProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignTemplateToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignTemplateToProject), id, payload) } // AssignUserRoleToEnvironment mocks base method. -func (m *MockApiClientInterface) AssignUserRoleToEnvironment(arg0 *AssignUserRoleToEnvironmentPayload) (*UserRoleEnvironmentAssignment, error) { +func (m *MockApiClientInterface) AssignUserRoleToEnvironment(payload *AssignUserRoleToEnvironmentPayload) (*UserRoleEnvironmentAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignUserRoleToEnvironment", arg0) + ret := m.ctrl.Call(m, "AssignUserRoleToEnvironment", payload) ret0, _ := ret[0].(*UserRoleEnvironmentAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignUserRoleToEnvironment indicates an expected call of AssignUserRoleToEnvironment. -func (mr *MockApiClientInterfaceMockRecorder) AssignUserRoleToEnvironment(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignUserRoleToEnvironment(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUserRoleToEnvironment", reflect.TypeOf((*MockApiClientInterface)(nil).AssignUserRoleToEnvironment), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUserRoleToEnvironment", reflect.TypeOf((*MockApiClientInterface)(nil).AssignUserRoleToEnvironment), payload) } // AssignUserToProject mocks base method. -func (m *MockApiClientInterface) AssignUserToProject(arg0 string, arg1 *AssignUserToProjectPayload) (*UserProjectAssignment, error) { +func (m *MockApiClientInterface) AssignUserToProject(projectId string, payload *AssignUserToProjectPayload) (*UserProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AssignUserToProject", arg0, arg1) + ret := m.ctrl.Call(m, "AssignUserToProject", projectId, payload) ret0, _ := ret[0].(*UserProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // AssignUserToProject indicates an expected call of AssignUserToProject. -func (mr *MockApiClientInterfaceMockRecorder) AssignUserToProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) AssignUserToProject(projectId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUserToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignUserToProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssignUserToProject", reflect.TypeOf((*MockApiClientInterface)(nil).AssignUserToProject), projectId, payload) } // CloudAccount mocks base method. -func (m *MockApiClientInterface) CloudAccount(arg0 string) (*CloudAccount, error) { +func (m *MockApiClientInterface) CloudAccount(id string) (*CloudAccount, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudAccount", arg0) + ret := m.ctrl.Call(m, "CloudAccount", id) ret0, _ := ret[0].(*CloudAccount) ret1, _ := ret[1].(error) return ret0, ret1 } // CloudAccount indicates an expected call of CloudAccount. -func (mr *MockApiClientInterfaceMockRecorder) CloudAccount(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudAccount(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccount", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccount), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccount", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccount), id) } // CloudAccountCreate mocks base method. -func (m *MockApiClientInterface) CloudAccountCreate(arg0 *CloudAccountCreatePayload) (*CloudAccount, error) { +func (m *MockApiClientInterface) CloudAccountCreate(payload *CloudAccountCreatePayload) (*CloudAccount, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudAccountCreate", arg0) + ret := m.ctrl.Call(m, "CloudAccountCreate", payload) ret0, _ := ret[0].(*CloudAccount) ret1, _ := ret[1].(error) return ret0, ret1 } // CloudAccountCreate indicates an expected call of CloudAccountCreate. -func (mr *MockApiClientInterfaceMockRecorder) CloudAccountCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudAccountCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountCreate), payload) } // CloudAccountDelete mocks base method. -func (m *MockApiClientInterface) CloudAccountDelete(arg0 string) error { +func (m *MockApiClientInterface) CloudAccountDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudAccountDelete", arg0) + ret := m.ctrl.Call(m, "CloudAccountDelete", id) ret0, _ := ret[0].(error) return ret0 } // CloudAccountDelete indicates an expected call of CloudAccountDelete. -func (mr *MockApiClientInterfaceMockRecorder) CloudAccountDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudAccountDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountDelete), id) } // CloudAccountUpdate mocks base method. -func (m *MockApiClientInterface) CloudAccountUpdate(arg0 string, arg1 *CloudAccountUpdatePayload) (*CloudAccount, error) { +func (m *MockApiClientInterface) CloudAccountUpdate(id string, payload *CloudAccountUpdatePayload) (*CloudAccount, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudAccountUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "CloudAccountUpdate", id, payload) ret0, _ := ret[0].(*CloudAccount) ret1, _ := ret[1].(error) return ret0, ret1 } // CloudAccountUpdate indicates an expected call of CloudAccountUpdate. -func (mr *MockApiClientInterfaceMockRecorder) CloudAccountUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudAccountUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudAccountUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CloudAccountUpdate), id, payload) } // CloudAccounts mocks base method. @@ -380,47 +381,47 @@ func (mr *MockApiClientInterfaceMockRecorder) CloudAccounts() *gomock.Call { } // CloudCredentialIdsInProject mocks base method. -func (m *MockApiClientInterface) CloudCredentialIdsInProject(arg0 string) ([]string, error) { +func (m *MockApiClientInterface) CloudCredentialIdsInProject(projectId string) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudCredentialIdsInProject", arg0) + ret := m.ctrl.Call(m, "CloudCredentialIdsInProject", projectId) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // CloudCredentialIdsInProject indicates an expected call of CloudCredentialIdsInProject. -func (mr *MockApiClientInterfaceMockRecorder) CloudCredentialIdsInProject(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudCredentialIdsInProject(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialIdsInProject", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentialIdsInProject), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialIdsInProject", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentialIdsInProject), projectId) } // CloudCredentials mocks base method. -func (m *MockApiClientInterface) CloudCredentials(arg0 string) (Credentials, error) { +func (m *MockApiClientInterface) CloudCredentials(id string) (Credentials, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudCredentials", arg0) + ret := m.ctrl.Call(m, "CloudCredentials", id) ret0, _ := ret[0].(Credentials) ret1, _ := ret[1].(error) return ret0, ret1 } // CloudCredentials indicates an expected call of CloudCredentials. -func (mr *MockApiClientInterfaceMockRecorder) CloudCredentials(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudCredentials(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentials", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentials), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentials", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentials), id) } // CloudCredentialsDelete mocks base method. -func (m *MockApiClientInterface) CloudCredentialsDelete(arg0 string) error { +func (m *MockApiClientInterface) CloudCredentialsDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloudCredentialsDelete", arg0) + ret := m.ctrl.Call(m, "CloudCredentialsDelete", id) ret0, _ := ret[0].(error) return ret0 } // CloudCredentialsDelete indicates an expected call of CloudCredentialsDelete. -func (mr *MockApiClientInterfaceMockRecorder) CloudCredentialsDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CloudCredentialsDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentialsDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloudCredentialsDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CloudCredentialsDelete), id) } // CloudCredentialsList mocks base method. @@ -439,667 +440,667 @@ func (mr *MockApiClientInterfaceMockRecorder) CloudCredentialsList() *gomock.Cal } // ConfigurationSet mocks base method. -func (m *MockApiClientInterface) ConfigurationSet(arg0 string) (*ConfigurationSet, error) { +func (m *MockApiClientInterface) ConfigurationSet(id string) (*ConfigurationSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSet", arg0) + ret := m.ctrl.Call(m, "ConfigurationSet", id) ret0, _ := ret[0].(*ConfigurationSet) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationSet indicates an expected call of ConfigurationSet. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSet(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSet(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSet", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSet), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSet", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSet), id) } // ConfigurationSetCreate mocks base method. -func (m *MockApiClientInterface) ConfigurationSetCreate(arg0 *CreateConfigurationSetPayload) (*ConfigurationSet, error) { +func (m *MockApiClientInterface) ConfigurationSetCreate(payload *CreateConfigurationSetPayload) (*ConfigurationSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSetCreate", arg0) + ret := m.ctrl.Call(m, "ConfigurationSetCreate", payload) ret0, _ := ret[0].(*ConfigurationSet) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationSetCreate indicates an expected call of ConfigurationSetCreate. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetCreate), payload) } // ConfigurationSetDelete mocks base method. -func (m *MockApiClientInterface) ConfigurationSetDelete(arg0 string) error { +func (m *MockApiClientInterface) ConfigurationSetDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSetDelete", arg0) + ret := m.ctrl.Call(m, "ConfigurationSetDelete", id) ret0, _ := ret[0].(error) return ret0 } // ConfigurationSetDelete indicates an expected call of ConfigurationSetDelete. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetDelete), id) } // ConfigurationSetUpdate mocks base method. -func (m *MockApiClientInterface) ConfigurationSetUpdate(arg0 string, arg1 *UpdateConfigurationSetPayload) (*ConfigurationSet, error) { +func (m *MockApiClientInterface) ConfigurationSetUpdate(id string, payload *UpdateConfigurationSetPayload) (*ConfigurationSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSetUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "ConfigurationSetUpdate", id, payload) ret0, _ := ret[0].(*ConfigurationSet) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationSetUpdate indicates an expected call of ConfigurationSetUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetUpdate), id, payload) } // ConfigurationSets mocks base method. -func (m *MockApiClientInterface) ConfigurationSets(arg0, arg1 string) ([]ConfigurationSet, error) { +func (m *MockApiClientInterface) ConfigurationSets(scope, scopeId string) ([]ConfigurationSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSets", arg0, arg1) + ret := m.ctrl.Call(m, "ConfigurationSets", scope, scopeId) ret0, _ := ret[0].([]ConfigurationSet) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationSets indicates an expected call of ConfigurationSets. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSets(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSets(scope, scopeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSets), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSets), scope, scopeId) } // ConfigurationSetsAssignments mocks base method. -func (m *MockApiClientInterface) ConfigurationSetsAssignments(arg0, arg1 string) ([]ConfigurationSet, error) { +func (m *MockApiClientInterface) ConfigurationSetsAssignments(scope, scopeId string) ([]ConfigurationSet, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationSetsAssignments", arg0, arg1) + ret := m.ctrl.Call(m, "ConfigurationSetsAssignments", scope, scopeId) 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 { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationSetsAssignments(scope, scopeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetsAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetsAssignments), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationSetsAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationSetsAssignments), scope, scopeId) } // ConfigurationVariableCreate mocks base method. -func (m *MockApiClientInterface) ConfigurationVariableCreate(arg0 ConfigurationVariableCreateParams) (ConfigurationVariable, error) { +func (m *MockApiClientInterface) ConfigurationVariableCreate(params ConfigurationVariableCreateParams) (ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariableCreate", arg0) + ret := m.ctrl.Call(m, "ConfigurationVariableCreate", params) ret0, _ := ret[0].(ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationVariableCreate indicates an expected call of ConfigurationVariableCreate. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableCreate(params any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableCreate), params) } // ConfigurationVariableDelete mocks base method. -func (m *MockApiClientInterface) ConfigurationVariableDelete(arg0 string) error { +func (m *MockApiClientInterface) ConfigurationVariableDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariableDelete", arg0) + ret := m.ctrl.Call(m, "ConfigurationVariableDelete", id) ret0, _ := ret[0].(error) return ret0 } // ConfigurationVariableDelete indicates an expected call of ConfigurationVariableDelete. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableDelete), id) } // ConfigurationVariableUpdate mocks base method. -func (m *MockApiClientInterface) ConfigurationVariableUpdate(arg0 ConfigurationVariableUpdateParams) (ConfigurationVariable, error) { +func (m *MockApiClientInterface) ConfigurationVariableUpdate(params ConfigurationVariableUpdateParams) (ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariableUpdate", arg0) + ret := m.ctrl.Call(m, "ConfigurationVariableUpdate", params) ret0, _ := ret[0].(ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationVariableUpdate indicates an expected call of ConfigurationVariableUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableUpdate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariableUpdate(params any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableUpdate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariableUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariableUpdate), params) } // ConfigurationVariablesById mocks base method. -func (m *MockApiClientInterface) ConfigurationVariablesById(arg0 string) (ConfigurationVariable, error) { +func (m *MockApiClientInterface) ConfigurationVariablesById(id string) (ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariablesById", arg0) + ret := m.ctrl.Call(m, "ConfigurationVariablesById", id) ret0, _ := ret[0].(ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationVariablesById indicates an expected call of ConfigurationVariablesById. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesById(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesById(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesById", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesById), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesById", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesById), id) } // ConfigurationVariablesByScope mocks base method. -func (m *MockApiClientInterface) ConfigurationVariablesByScope(arg0 Scope, arg1 string) ([]ConfigurationVariable, error) { +func (m *MockApiClientInterface) ConfigurationVariablesByScope(scope Scope, scopeId string) ([]ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariablesByScope", arg0, arg1) + ret := m.ctrl.Call(m, "ConfigurationVariablesByScope", scope, scopeId) ret0, _ := ret[0].([]ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationVariablesByScope indicates an expected call of ConfigurationVariablesByScope. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesByScope(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesByScope(scope, scopeId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesByScope", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesByScope), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesByScope", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesByScope), scope, scopeId) } // ConfigurationVariablesBySetId mocks base method. -func (m *MockApiClientInterface) ConfigurationVariablesBySetId(arg0 string) ([]ConfigurationVariable, error) { +func (m *MockApiClientInterface) ConfigurationVariablesBySetId(setId string) ([]ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ConfigurationVariablesBySetId", arg0) + ret := m.ctrl.Call(m, "ConfigurationVariablesBySetId", setId) ret0, _ := ret[0].([]ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // ConfigurationVariablesBySetId indicates an expected call of ConfigurationVariablesBySetId. -func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesBySetId(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ConfigurationVariablesBySetId(setId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesBySetId", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesBySetId), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigurationVariablesBySetId", reflect.TypeOf((*MockApiClientInterface)(nil).ConfigurationVariablesBySetId), setId) } // CostCredentialIdsInProject mocks base method. -func (m *MockApiClientInterface) CostCredentialIdsInProject(arg0 string) ([]CostCredentialProjectAssignment, error) { +func (m *MockApiClientInterface) CostCredentialIdsInProject(projectId string) ([]CostCredentialProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CostCredentialIdsInProject", arg0) + ret := m.ctrl.Call(m, "CostCredentialIdsInProject", projectId) ret0, _ := ret[0].([]CostCredentialProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // CostCredentialIdsInProject indicates an expected call of CostCredentialIdsInProject. -func (mr *MockApiClientInterfaceMockRecorder) CostCredentialIdsInProject(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CostCredentialIdsInProject(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CostCredentialIdsInProject", reflect.TypeOf((*MockApiClientInterface)(nil).CostCredentialIdsInProject), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CostCredentialIdsInProject", reflect.TypeOf((*MockApiClientInterface)(nil).CostCredentialIdsInProject), projectId) } // CredentialsCreate mocks base method. -func (m *MockApiClientInterface) CredentialsCreate(arg0 CredentialCreatePayload) (Credentials, error) { +func (m *MockApiClientInterface) CredentialsCreate(request CredentialCreatePayload) (Credentials, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CredentialsCreate", arg0) + ret := m.ctrl.Call(m, "CredentialsCreate", request) ret0, _ := ret[0].(Credentials) ret1, _ := ret[1].(error) return ret0, ret1 } // CredentialsCreate indicates an expected call of CredentialsCreate. -func (mr *MockApiClientInterfaceMockRecorder) CredentialsCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CredentialsCreate(request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialsCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CredentialsCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialsCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CredentialsCreate), request) } // CredentialsUpdate mocks base method. -func (m *MockApiClientInterface) CredentialsUpdate(arg0 string, arg1 CredentialCreatePayload) (Credentials, error) { +func (m *MockApiClientInterface) CredentialsUpdate(id string, request CredentialCreatePayload) (Credentials, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CredentialsUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "CredentialsUpdate", id, request) ret0, _ := ret[0].(Credentials) ret1, _ := ret[1].(error) return ret0, ret1 } // CredentialsUpdate indicates an expected call of CredentialsUpdate. -func (mr *MockApiClientInterfaceMockRecorder) CredentialsUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CredentialsUpdate(id, request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialsUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CredentialsUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CredentialsUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CredentialsUpdate), id, request) } // CustomFlow mocks base method. -func (m *MockApiClientInterface) CustomFlow(arg0 string) (*CustomFlow, error) { +func (m *MockApiClientInterface) CustomFlow(id string) (*CustomFlow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlow", arg0) + ret := m.ctrl.Call(m, "CustomFlow", id) ret0, _ := ret[0].(*CustomFlow) ret1, _ := ret[1].(error) return ret0, ret1 } // CustomFlow indicates an expected call of CustomFlow. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlow(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlow(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlow", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlow), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlow", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlow), id) } // CustomFlowAssign mocks base method. -func (m *MockApiClientInterface) CustomFlowAssign(arg0 []CustomFlowAssignment) error { +func (m *MockApiClientInterface) CustomFlowAssign(assignments []CustomFlowAssignment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowAssign", arg0) + ret := m.ctrl.Call(m, "CustomFlowAssign", assignments) ret0, _ := ret[0].(error) return ret0 } // CustomFlowAssign indicates an expected call of CustomFlowAssign. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowAssign(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowAssign(assignments any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowAssign", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowAssign), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowAssign", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowAssign), assignments) } // CustomFlowCreate mocks base method. -func (m *MockApiClientInterface) CustomFlowCreate(arg0 CustomFlowCreatePayload) (*CustomFlow, error) { +func (m *MockApiClientInterface) CustomFlowCreate(payload CustomFlowCreatePayload) (*CustomFlow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowCreate", arg0) + ret := m.ctrl.Call(m, "CustomFlowCreate", payload) ret0, _ := ret[0].(*CustomFlow) ret1, _ := ret[1].(error) return ret0, ret1 } // CustomFlowCreate indicates an expected call of CustomFlowCreate. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowCreate", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowCreate), payload) } // CustomFlowDelete mocks base method. -func (m *MockApiClientInterface) CustomFlowDelete(arg0 string) error { +func (m *MockApiClientInterface) CustomFlowDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowDelete", arg0) + ret := m.ctrl.Call(m, "CustomFlowDelete", id) ret0, _ := ret[0].(error) return ret0 } // CustomFlowDelete indicates an expected call of CustomFlowDelete. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowDelete", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowDelete), id) } // CustomFlowGetAssignments mocks base method. -func (m *MockApiClientInterface) CustomFlowGetAssignments(arg0 []CustomFlowAssignment) ([]CustomFlowAssignment, error) { +func (m *MockApiClientInterface) CustomFlowGetAssignments(assignments []CustomFlowAssignment) ([]CustomFlowAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowGetAssignments", arg0) + ret := m.ctrl.Call(m, "CustomFlowGetAssignments", assignments) ret0, _ := ret[0].([]CustomFlowAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // CustomFlowGetAssignments indicates an expected call of CustomFlowGetAssignments. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowGetAssignments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowGetAssignments(assignments any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowGetAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowGetAssignments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowGetAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowGetAssignments), assignments) } // CustomFlowUnassign mocks base method. -func (m *MockApiClientInterface) CustomFlowUnassign(arg0 []CustomFlowAssignment) error { +func (m *MockApiClientInterface) CustomFlowUnassign(assignments []CustomFlowAssignment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowUnassign", arg0) + ret := m.ctrl.Call(m, "CustomFlowUnassign", assignments) ret0, _ := ret[0].(error) return ret0 } // CustomFlowUnassign indicates an expected call of CustomFlowUnassign. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowUnassign(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowUnassign(assignments any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowUnassign", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowUnassign), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowUnassign", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowUnassign), assignments) } // CustomFlowUpdate mocks base method. -func (m *MockApiClientInterface) CustomFlowUpdate(arg0 string, arg1 CustomFlowCreatePayload) (*CustomFlow, error) { +func (m *MockApiClientInterface) CustomFlowUpdate(id string, payload CustomFlowCreatePayload) (*CustomFlow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlowUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "CustomFlowUpdate", id, payload) ret0, _ := ret[0].(*CustomFlow) ret1, _ := ret[1].(error) return ret0, ret1 } // CustomFlowUpdate indicates an expected call of CustomFlowUpdate. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlowUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlowUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlowUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlowUpdate), id, payload) } // CustomFlows mocks base method. -func (m *MockApiClientInterface) CustomFlows(arg0 string) ([]CustomFlow, error) { +func (m *MockApiClientInterface) CustomFlows(name string) ([]CustomFlow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CustomFlows", arg0) + ret := m.ctrl.Call(m, "CustomFlows", name) ret0, _ := ret[0].([]CustomFlow) ret1, _ := ret[1].(error) return ret0, ret1 } // CustomFlows indicates an expected call of CustomFlows. -func (mr *MockApiClientInterfaceMockRecorder) CustomFlows(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) CustomFlows(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlows", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlows), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomFlows", reflect.TypeOf((*MockApiClientInterface)(nil).CustomFlows), name) } // DeleteEnvironmentDiscovery mocks base method. -func (m *MockApiClientInterface) DeleteEnvironmentDiscovery(arg0 string) error { +func (m *MockApiClientInterface) DeleteEnvironmentDiscovery(projectId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteEnvironmentDiscovery", arg0) + ret := m.ctrl.Call(m, "DeleteEnvironmentDiscovery", projectId) ret0, _ := ret[0].(error) return ret0 } // DeleteEnvironmentDiscovery indicates an expected call of DeleteEnvironmentDiscovery. -func (mr *MockApiClientInterfaceMockRecorder) DeleteEnvironmentDiscovery(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) DeleteEnvironmentDiscovery(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).DeleteEnvironmentDiscovery), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).DeleteEnvironmentDiscovery), projectId) } // Environment mocks base method. -func (m *MockApiClientInterface) Environment(arg0 string) (Environment, error) { +func (m *MockApiClientInterface) Environment(id string) (Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Environment", arg0) + ret := m.ctrl.Call(m, "Environment", id) ret0, _ := ret[0].(Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // Environment indicates an expected call of Environment. -func (mr *MockApiClientInterfaceMockRecorder) Environment(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Environment(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Environment", reflect.TypeOf((*MockApiClientInterface)(nil).Environment), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Environment", reflect.TypeOf((*MockApiClientInterface)(nil).Environment), id) } // EnvironmentCreate mocks base method. -func (m *MockApiClientInterface) EnvironmentCreate(arg0 EnvironmentCreate) (Environment, error) { +func (m *MockApiClientInterface) EnvironmentCreate(payload EnvironmentCreate) (Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentCreate", arg0) + ret := m.ctrl.Call(m, "EnvironmentCreate", payload) ret0, _ := ret[0].(Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentCreate indicates an expected call of EnvironmentCreate. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentCreate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentCreate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentCreate), payload) } // EnvironmentCreateWithoutTemplate mocks base method. -func (m *MockApiClientInterface) EnvironmentCreateWithoutTemplate(arg0 EnvironmentCreateWithoutTemplate) (Environment, error) { +func (m *MockApiClientInterface) EnvironmentCreateWithoutTemplate(payload EnvironmentCreateWithoutTemplate) (Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentCreateWithoutTemplate", arg0) + ret := m.ctrl.Call(m, "EnvironmentCreateWithoutTemplate", payload) ret0, _ := ret[0].(Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentCreateWithoutTemplate indicates an expected call of EnvironmentCreateWithoutTemplate. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentCreateWithoutTemplate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentCreateWithoutTemplate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentCreateWithoutTemplate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentCreateWithoutTemplate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentCreateWithoutTemplate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentCreateWithoutTemplate), payload) } // EnvironmentDeploy mocks base method. -func (m *MockApiClientInterface) EnvironmentDeploy(arg0 string, arg1 DeployRequest) (EnvironmentDeployResponse, error) { +func (m *MockApiClientInterface) EnvironmentDeploy(id string, payload DeployRequest) (EnvironmentDeployResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentDeploy", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentDeploy", id, payload) ret0, _ := ret[0].(EnvironmentDeployResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentDeploy indicates an expected call of EnvironmentDeploy. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDeploy(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDeploy(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDeploy", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDeploy), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDeploy", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDeploy), id, payload) } // EnvironmentDeploymentLog mocks base method. -func (m *MockApiClientInterface) EnvironmentDeploymentLog(arg0 string) (*DeploymentLog, error) { +func (m *MockApiClientInterface) EnvironmentDeploymentLog(id string) (*DeploymentLog, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentDeploymentLog", arg0) + ret := m.ctrl.Call(m, "EnvironmentDeploymentLog", id) ret0, _ := ret[0].(*DeploymentLog) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentDeploymentLog indicates an expected call of EnvironmentDeploymentLog. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDeploymentLog(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDeploymentLog(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDeploymentLog", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDeploymentLog), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDeploymentLog", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDeploymentLog), id) } // EnvironmentDestroy mocks base method. -func (m *MockApiClientInterface) EnvironmentDestroy(arg0 string) (*EnvironmentDestroyResponse, error) { +func (m *MockApiClientInterface) EnvironmentDestroy(id string) (*EnvironmentDestroyResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentDestroy", arg0) + ret := m.ctrl.Call(m, "EnvironmentDestroy", id) ret0, _ := ret[0].(*EnvironmentDestroyResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentDestroy indicates an expected call of EnvironmentDestroy. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDestroy(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDestroy(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDestroy", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDestroy), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDestroy", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDestroy), id) } // EnvironmentDriftDetection mocks base method. -func (m *MockApiClientInterface) EnvironmentDriftDetection(arg0 string) (EnvironmentSchedulingExpression, error) { +func (m *MockApiClientInterface) EnvironmentDriftDetection(environmentId string) (EnvironmentSchedulingExpression, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentDriftDetection", arg0) + ret := m.ctrl.Call(m, "EnvironmentDriftDetection", environmentId) ret0, _ := ret[0].(EnvironmentSchedulingExpression) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentDriftDetection indicates an expected call of EnvironmentDriftDetection. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDriftDetection(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentDriftDetection(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDriftDetection), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentDriftDetection), environmentId) } // EnvironmentMarkAsArchived mocks base method. -func (m *MockApiClientInterface) EnvironmentMarkAsArchived(arg0 string) error { +func (m *MockApiClientInterface) EnvironmentMarkAsArchived(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentMarkAsArchived", arg0) + ret := m.ctrl.Call(m, "EnvironmentMarkAsArchived", id) ret0, _ := ret[0].(error) return ret0 } // EnvironmentMarkAsArchived indicates an expected call of EnvironmentMarkAsArchived. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentMarkAsArchived(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentMarkAsArchived(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentMarkAsArchived", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentMarkAsArchived), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentMarkAsArchived", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentMarkAsArchived), id) } // EnvironmentMove mocks base method. -func (m *MockApiClientInterface) EnvironmentMove(arg0, arg1 string) error { +func (m *MockApiClientInterface) EnvironmentMove(id, projectId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentMove", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentMove", id, projectId) ret0, _ := ret[0].(error) return ret0 } // EnvironmentMove indicates an expected call of EnvironmentMove. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentMove(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentMove(id, projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentMove", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentMove), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentMove", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentMove), id, projectId) } // EnvironmentScheduling mocks base method. -func (m *MockApiClientInterface) EnvironmentScheduling(arg0 string) (EnvironmentScheduling, error) { +func (m *MockApiClientInterface) EnvironmentScheduling(environmentId string) (EnvironmentScheduling, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentScheduling", arg0) + ret := m.ctrl.Call(m, "EnvironmentScheduling", environmentId) ret0, _ := ret[0].(EnvironmentScheduling) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentScheduling indicates an expected call of EnvironmentScheduling. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentScheduling(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentScheduling(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentScheduling", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentScheduling), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentScheduling", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentScheduling), environmentId) } // EnvironmentSchedulingDelete mocks base method. -func (m *MockApiClientInterface) EnvironmentSchedulingDelete(arg0 string) error { +func (m *MockApiClientInterface) EnvironmentSchedulingDelete(environmentId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentSchedulingDelete", arg0) + ret := m.ctrl.Call(m, "EnvironmentSchedulingDelete", environmentId) ret0, _ := ret[0].(error) return ret0 } // EnvironmentSchedulingDelete indicates an expected call of EnvironmentSchedulingDelete. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentSchedulingDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentSchedulingDelete(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentSchedulingDelete", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentSchedulingDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentSchedulingDelete", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentSchedulingDelete), environmentId) } // EnvironmentSchedulingUpdate mocks base method. -func (m *MockApiClientInterface) EnvironmentSchedulingUpdate(arg0 string, arg1 EnvironmentScheduling) (EnvironmentScheduling, error) { +func (m *MockApiClientInterface) EnvironmentSchedulingUpdate(environmentId string, payload EnvironmentScheduling) (EnvironmentScheduling, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentSchedulingUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentSchedulingUpdate", environmentId, payload) ret0, _ := ret[0].(EnvironmentScheduling) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentSchedulingUpdate indicates an expected call of EnvironmentSchedulingUpdate. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentSchedulingUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentSchedulingUpdate(environmentId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentSchedulingUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentSchedulingUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentSchedulingUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentSchedulingUpdate), environmentId, payload) } // EnvironmentStopDriftDetection mocks base method. -func (m *MockApiClientInterface) EnvironmentStopDriftDetection(arg0 string) error { +func (m *MockApiClientInterface) EnvironmentStopDriftDetection(environmentId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentStopDriftDetection", arg0) + ret := m.ctrl.Call(m, "EnvironmentStopDriftDetection", environmentId) ret0, _ := ret[0].(error) return ret0 } // EnvironmentStopDriftDetection indicates an expected call of EnvironmentStopDriftDetection. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentStopDriftDetection(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentStopDriftDetection(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentStopDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentStopDriftDetection), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentStopDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentStopDriftDetection), environmentId) } // EnvironmentUpdate mocks base method. -func (m *MockApiClientInterface) EnvironmentUpdate(arg0 string, arg1 EnvironmentUpdate) (Environment, error) { +func (m *MockApiClientInterface) EnvironmentUpdate(id string, payload EnvironmentUpdate) (Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentUpdate", id, payload) ret0, _ := ret[0].(Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentUpdate indicates an expected call of EnvironmentUpdate. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdate), id, payload) } // EnvironmentUpdateDriftDetection mocks base method. -func (m *MockApiClientInterface) EnvironmentUpdateDriftDetection(arg0 string, arg1 EnvironmentSchedulingExpression) (EnvironmentSchedulingExpression, error) { +func (m *MockApiClientInterface) EnvironmentUpdateDriftDetection(environmentId string, payload EnvironmentSchedulingExpression) (EnvironmentSchedulingExpression, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentUpdateDriftDetection", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentUpdateDriftDetection", environmentId, payload) ret0, _ := ret[0].(EnvironmentSchedulingExpression) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentUpdateDriftDetection indicates an expected call of EnvironmentUpdateDriftDetection. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdateDriftDetection(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdateDriftDetection(environmentId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdateDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdateDriftDetection), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdateDriftDetection", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdateDriftDetection), environmentId, payload) } // EnvironmentUpdateTTL mocks base method. -func (m *MockApiClientInterface) EnvironmentUpdateTTL(arg0 string, arg1 TTL) (Environment, error) { +func (m *MockApiClientInterface) EnvironmentUpdateTTL(id string, payload TTL) (Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentUpdateTTL", arg0, arg1) + ret := m.ctrl.Call(m, "EnvironmentUpdateTTL", id, payload) ret0, _ := ret[0].(Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentUpdateTTL indicates an expected call of EnvironmentUpdateTTL. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdateTTL(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentUpdateTTL(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdateTTL", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdateTTL), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentUpdateTTL", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentUpdateTTL), id, payload) } // EnvironmentsByName mocks base method. -func (m *MockApiClientInterface) EnvironmentsByName(arg0 string) ([]Environment, error) { +func (m *MockApiClientInterface) EnvironmentsByName(name string) ([]Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentsByName", arg0) + ret := m.ctrl.Call(m, "EnvironmentsByName", name) ret0, _ := ret[0].([]Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // EnvironmentsByName indicates an expected call of EnvironmentsByName. -func (mr *MockApiClientInterfaceMockRecorder) EnvironmentsByName(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) EnvironmentsByName(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentsByName", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentsByName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentsByName", reflect.TypeOf((*MockApiClientInterface)(nil).EnvironmentsByName), name) } // GetEnvironmentDiscovery mocks base method. -func (m *MockApiClientInterface) GetEnvironmentDiscovery(arg0 string) (*EnvironmentDiscoveryPayload, error) { +func (m *MockApiClientInterface) GetEnvironmentDiscovery(projectId string) (*EnvironmentDiscoveryPayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetEnvironmentDiscovery", arg0) + ret := m.ctrl.Call(m, "GetEnvironmentDiscovery", projectId) ret0, _ := ret[0].(*EnvironmentDiscoveryPayload) ret1, _ := ret[1].(error) return ret0, ret1 } // GetEnvironmentDiscovery indicates an expected call of GetEnvironmentDiscovery. -func (mr *MockApiClientInterfaceMockRecorder) GetEnvironmentDiscovery(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GetEnvironmentDiscovery(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).GetEnvironmentDiscovery), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).GetEnvironmentDiscovery), projectId) } // GitToken mocks base method. -func (m *MockApiClientInterface) GitToken(arg0 string) (*GitToken, error) { +func (m *MockApiClientInterface) GitToken(id string) (*GitToken, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GitToken", arg0) + ret := m.ctrl.Call(m, "GitToken", id) ret0, _ := ret[0].(*GitToken) ret1, _ := ret[1].(error) return ret0, ret1 } // GitToken indicates an expected call of GitToken. -func (mr *MockApiClientInterfaceMockRecorder) GitToken(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GitToken(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitToken", reflect.TypeOf((*MockApiClientInterface)(nil).GitToken), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitToken", reflect.TypeOf((*MockApiClientInterface)(nil).GitToken), id) } // GitTokenCreate mocks base method. -func (m *MockApiClientInterface) GitTokenCreate(arg0 GitTokenCreatePayload) (*GitToken, error) { +func (m *MockApiClientInterface) GitTokenCreate(payload GitTokenCreatePayload) (*GitToken, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GitTokenCreate", arg0) + ret := m.ctrl.Call(m, "GitTokenCreate", payload) ret0, _ := ret[0].(*GitToken) ret1, _ := ret[1].(error) return ret0, ret1 } // GitTokenCreate indicates an expected call of GitTokenCreate. -func (mr *MockApiClientInterfaceMockRecorder) GitTokenCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GitTokenCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitTokenCreate", reflect.TypeOf((*MockApiClientInterface)(nil).GitTokenCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitTokenCreate", reflect.TypeOf((*MockApiClientInterface)(nil).GitTokenCreate), payload) } // GitTokenDelete mocks base method. -func (m *MockApiClientInterface) GitTokenDelete(arg0 string) error { +func (m *MockApiClientInterface) GitTokenDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GitTokenDelete", arg0) + ret := m.ctrl.Call(m, "GitTokenDelete", id) ret0, _ := ret[0].(error) return ret0 } // GitTokenDelete indicates an expected call of GitTokenDelete. -func (mr *MockApiClientInterfaceMockRecorder) GitTokenDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GitTokenDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitTokenDelete", reflect.TypeOf((*MockApiClientInterface)(nil).GitTokenDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GitTokenDelete", reflect.TypeOf((*MockApiClientInterface)(nil).GitTokenDelete), id) } // GitTokens mocks base method. @@ -1118,32 +1119,32 @@ func (mr *MockApiClientInterfaceMockRecorder) GitTokens() *gomock.Call { } // GpgKeyCreate mocks base method. -func (m *MockApiClientInterface) GpgKeyCreate(arg0 *GpgKeyCreatePayload) (*GpgKey, error) { +func (m *MockApiClientInterface) GpgKeyCreate(payload *GpgKeyCreatePayload) (*GpgKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GpgKeyCreate", arg0) + ret := m.ctrl.Call(m, "GpgKeyCreate", payload) ret0, _ := ret[0].(*GpgKey) ret1, _ := ret[1].(error) return ret0, ret1 } // GpgKeyCreate indicates an expected call of GpgKeyCreate. -func (mr *MockApiClientInterfaceMockRecorder) GpgKeyCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GpgKeyCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GpgKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).GpgKeyCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GpgKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).GpgKeyCreate), payload) } // GpgKeyDelete mocks base method. -func (m *MockApiClientInterface) GpgKeyDelete(arg0 string) error { +func (m *MockApiClientInterface) GpgKeyDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GpgKeyDelete", arg0) + ret := m.ctrl.Call(m, "GpgKeyDelete", id) ret0, _ := ret[0].(error) return ret0 } // GpgKeyDelete indicates an expected call of GpgKeyDelete. -func (mr *MockApiClientInterfaceMockRecorder) GpgKeyDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) GpgKeyDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GpgKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).GpgKeyDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GpgKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).GpgKeyDelete), id) } // GpgKeys mocks base method. @@ -1162,77 +1163,77 @@ func (mr *MockApiClientInterfaceMockRecorder) GpgKeys() *gomock.Call { } // KubernetesCredentialsCreate mocks base method. -func (m *MockApiClientInterface) KubernetesCredentialsCreate(arg0 *KubernetesCredentialsCreatePayload) (*Credentials, error) { +func (m *MockApiClientInterface) KubernetesCredentialsCreate(payload *KubernetesCredentialsCreatePayload) (*Credentials, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "KubernetesCredentialsCreate", arg0) + ret := m.ctrl.Call(m, "KubernetesCredentialsCreate", payload) ret0, _ := ret[0].(*Credentials) ret1, _ := ret[1].(error) return ret0, ret1 } // KubernetesCredentialsCreate indicates an expected call of KubernetesCredentialsCreate. -func (mr *MockApiClientInterfaceMockRecorder) KubernetesCredentialsCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) KubernetesCredentialsCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KubernetesCredentialsCreate", reflect.TypeOf((*MockApiClientInterface)(nil).KubernetesCredentialsCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KubernetesCredentialsCreate", reflect.TypeOf((*MockApiClientInterface)(nil).KubernetesCredentialsCreate), payload) } // KubernetesCredentialsUpdate mocks base method. -func (m *MockApiClientInterface) KubernetesCredentialsUpdate(arg0 string, arg1 *KubernetesCredentialsUpdatePayload) (*Credentials, error) { +func (m *MockApiClientInterface) KubernetesCredentialsUpdate(id string, payload *KubernetesCredentialsUpdatePayload) (*Credentials, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "KubernetesCredentialsUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "KubernetesCredentialsUpdate", id, payload) ret0, _ := ret[0].(*Credentials) ret1, _ := ret[1].(error) return ret0, ret1 } // KubernetesCredentialsUpdate indicates an expected call of KubernetesCredentialsUpdate. -func (mr *MockApiClientInterfaceMockRecorder) KubernetesCredentialsUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) KubernetesCredentialsUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KubernetesCredentialsUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).KubernetesCredentialsUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KubernetesCredentialsUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).KubernetesCredentialsUpdate), id, payload) } // Module mocks base method. -func (m *MockApiClientInterface) Module(arg0 string) (*Module, error) { +func (m *MockApiClientInterface) Module(id string) (*Module, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Module", arg0) + ret := m.ctrl.Call(m, "Module", id) ret0, _ := ret[0].(*Module) ret1, _ := ret[1].(error) return ret0, ret1 } // Module indicates an expected call of Module. -func (mr *MockApiClientInterfaceMockRecorder) Module(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Module(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Module", reflect.TypeOf((*MockApiClientInterface)(nil).Module), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Module", reflect.TypeOf((*MockApiClientInterface)(nil).Module), id) } // ModuleCreate mocks base method. -func (m *MockApiClientInterface) ModuleCreate(arg0 ModuleCreatePayload) (*Module, error) { +func (m *MockApiClientInterface) ModuleCreate(payload ModuleCreatePayload) (*Module, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModuleCreate", arg0) + ret := m.ctrl.Call(m, "ModuleCreate", payload) ret0, _ := ret[0].(*Module) ret1, _ := ret[1].(error) return ret0, ret1 } // ModuleCreate indicates an expected call of ModuleCreate. -func (mr *MockApiClientInterfaceMockRecorder) ModuleCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ModuleCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleCreate), payload) } // ModuleDelete mocks base method. -func (m *MockApiClientInterface) ModuleDelete(arg0 string) error { +func (m *MockApiClientInterface) ModuleDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModuleDelete", arg0) + ret := m.ctrl.Call(m, "ModuleDelete", id) ret0, _ := ret[0].(error) return ret0 } // ModuleDelete indicates an expected call of ModuleDelete. -func (mr *MockApiClientInterfaceMockRecorder) ModuleDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ModuleDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleDelete), id) } // ModuleTestingProject mocks base method. @@ -1251,18 +1252,18 @@ func (mr *MockApiClientInterfaceMockRecorder) ModuleTestingProject() *gomock.Cal } // ModuleUpdate mocks base method. -func (m *MockApiClientInterface) ModuleUpdate(arg0 string, arg1 ModuleUpdatePayload) (*Module, error) { +func (m *MockApiClientInterface) ModuleUpdate(id string, payload ModuleUpdatePayload) (*Module, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModuleUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "ModuleUpdate", id, payload) ret0, _ := ret[0].(*Module) ret1, _ := ret[1].(error) return ret0, ret1 } // ModuleUpdate indicates an expected call of ModuleUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ModuleUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ModuleUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModuleUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ModuleUpdate), id, payload) } // Modules mocks base method. @@ -1281,77 +1282,77 @@ func (mr *MockApiClientInterfaceMockRecorder) Modules() *gomock.Call { } // NotificationCreate mocks base method. -func (m *MockApiClientInterface) NotificationCreate(arg0 NotificationCreatePayload) (*Notification, error) { +func (m *MockApiClientInterface) NotificationCreate(payload NotificationCreatePayload) (*Notification, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NotificationCreate", arg0) + ret := m.ctrl.Call(m, "NotificationCreate", payload) ret0, _ := ret[0].(*Notification) ret1, _ := ret[1].(error) return ret0, ret1 } // NotificationCreate indicates an expected call of NotificationCreate. -func (mr *MockApiClientInterfaceMockRecorder) NotificationCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) NotificationCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationCreate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationCreate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationCreate), payload) } // NotificationDelete mocks base method. -func (m *MockApiClientInterface) NotificationDelete(arg0 string) error { +func (m *MockApiClientInterface) NotificationDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NotificationDelete", arg0) + ret := m.ctrl.Call(m, "NotificationDelete", id) ret0, _ := ret[0].(error) return ret0 } // NotificationDelete indicates an expected call of NotificationDelete. -func (mr *MockApiClientInterfaceMockRecorder) NotificationDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) NotificationDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationDelete", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationDelete", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationDelete), id) } // NotificationProjectAssignmentUpdate mocks base method. -func (m *MockApiClientInterface) NotificationProjectAssignmentUpdate(arg0, arg1 string, arg2 NotificationProjectAssignmentUpdatePayload) (*NotificationProjectAssignment, error) { +func (m *MockApiClientInterface) NotificationProjectAssignmentUpdate(projectId, endpointId string, payload NotificationProjectAssignmentUpdatePayload) (*NotificationProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NotificationProjectAssignmentUpdate", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "NotificationProjectAssignmentUpdate", projectId, endpointId, payload) ret0, _ := ret[0].(*NotificationProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // NotificationProjectAssignmentUpdate indicates an expected call of NotificationProjectAssignmentUpdate. -func (mr *MockApiClientInterfaceMockRecorder) NotificationProjectAssignmentUpdate(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) NotificationProjectAssignmentUpdate(projectId, endpointId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationProjectAssignmentUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationProjectAssignmentUpdate), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationProjectAssignmentUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationProjectAssignmentUpdate), projectId, endpointId, payload) } // NotificationProjectAssignments mocks base method. -func (m *MockApiClientInterface) NotificationProjectAssignments(arg0 string) ([]NotificationProjectAssignment, error) { +func (m *MockApiClientInterface) NotificationProjectAssignments(projectId string) ([]NotificationProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NotificationProjectAssignments", arg0) + ret := m.ctrl.Call(m, "NotificationProjectAssignments", projectId) ret0, _ := ret[0].([]NotificationProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // NotificationProjectAssignments indicates an expected call of NotificationProjectAssignments. -func (mr *MockApiClientInterfaceMockRecorder) NotificationProjectAssignments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) NotificationProjectAssignments(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationProjectAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationProjectAssignments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationProjectAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationProjectAssignments), projectId) } // NotificationUpdate mocks base method. -func (m *MockApiClientInterface) NotificationUpdate(arg0 string, arg1 NotificationUpdatePayload) (*Notification, error) { +func (m *MockApiClientInterface) NotificationUpdate(id string, payload NotificationUpdatePayload) (*Notification, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NotificationUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "NotificationUpdate", id, payload) ret0, _ := ret[0].(*Notification) ret1, _ := ret[1].(error) return ret0, ret1 } // NotificationUpdate indicates an expected call of NotificationUpdate. -func (mr *MockApiClientInterfaceMockRecorder) NotificationUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) NotificationUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotificationUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).NotificationUpdate), id, payload) } // Notifications mocks base method. @@ -1430,179 +1431,179 @@ func (mr *MockApiClientInterfaceMockRecorder) OrganizationPolicyUpdate(arg0 any) } // OrganizationUserUpdateRole mocks base method. -func (m *MockApiClientInterface) OrganizationUserUpdateRole(arg0, arg1 string) error { +func (m *MockApiClientInterface) OrganizationUserUpdateRole(userId, roleId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "OrganizationUserUpdateRole", arg0, arg1) + ret := m.ctrl.Call(m, "OrganizationUserUpdateRole", userId, roleId) ret0, _ := ret[0].(error) return ret0 } // OrganizationUserUpdateRole indicates an expected call of OrganizationUserUpdateRole. -func (mr *MockApiClientInterfaceMockRecorder) OrganizationUserUpdateRole(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) OrganizationUserUpdateRole(userId, roleId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrganizationUserUpdateRole", reflect.TypeOf((*MockApiClientInterface)(nil).OrganizationUserUpdateRole), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OrganizationUserUpdateRole", reflect.TypeOf((*MockApiClientInterface)(nil).OrganizationUserUpdateRole), userId, roleId) } // Policy mocks base method. -func (m *MockApiClientInterface) Policy(arg0 string) (Policy, error) { +func (m *MockApiClientInterface) Policy(projectId string) (Policy, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Policy", arg0) + ret := m.ctrl.Call(m, "Policy", projectId) ret0, _ := ret[0].(Policy) ret1, _ := ret[1].(error) return ret0, ret1 } // Policy indicates an expected call of Policy. -func (mr *MockApiClientInterfaceMockRecorder) Policy(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Policy(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Policy", reflect.TypeOf((*MockApiClientInterface)(nil).Policy), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Policy", reflect.TypeOf((*MockApiClientInterface)(nil).Policy), projectId) } // PolicyUpdate mocks base method. -func (m *MockApiClientInterface) PolicyUpdate(arg0 PolicyUpdatePayload) (Policy, error) { +func (m *MockApiClientInterface) PolicyUpdate(payload PolicyUpdatePayload) (Policy, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PolicyUpdate", arg0) + ret := m.ctrl.Call(m, "PolicyUpdate", payload) ret0, _ := ret[0].(Policy) ret1, _ := ret[1].(error) return ret0, ret1 } // PolicyUpdate indicates an expected call of PolicyUpdate. -func (mr *MockApiClientInterfaceMockRecorder) PolicyUpdate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) PolicyUpdate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).PolicyUpdate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PolicyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).PolicyUpdate), payload) } // Project mocks base method. -func (m *MockApiClientInterface) Project(arg0 string) (Project, error) { +func (m *MockApiClientInterface) Project(id string) (Project, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Project", arg0) + ret := m.ctrl.Call(m, "Project", id) ret0, _ := ret[0].(Project) ret1, _ := ret[1].(error) return ret0, ret1 } // Project indicates an expected call of Project. -func (mr *MockApiClientInterfaceMockRecorder) Project(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Project(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Project", reflect.TypeOf((*MockApiClientInterface)(nil).Project), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Project", reflect.TypeOf((*MockApiClientInterface)(nil).Project), id) } // ProjectBudget mocks base method. -func (m *MockApiClientInterface) ProjectBudget(arg0 string) (*ProjectBudget, error) { +func (m *MockApiClientInterface) ProjectBudget(projectId string) (*ProjectBudget, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectBudget", arg0) + ret := m.ctrl.Call(m, "ProjectBudget", projectId) ret0, _ := ret[0].(*ProjectBudget) ret1, _ := ret[1].(error) return ret0, ret1 } // ProjectBudget indicates an expected call of ProjectBudget. -func (mr *MockApiClientInterfaceMockRecorder) ProjectBudget(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectBudget(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudget", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudget), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudget", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudget), projectId) } // ProjectBudgetDelete mocks base method. -func (m *MockApiClientInterface) ProjectBudgetDelete(arg0 string) error { +func (m *MockApiClientInterface) ProjectBudgetDelete(projectId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectBudgetDelete", arg0) + ret := m.ctrl.Call(m, "ProjectBudgetDelete", projectId) ret0, _ := ret[0].(error) return ret0 } // ProjectBudgetDelete indicates an expected call of ProjectBudgetDelete. -func (mr *MockApiClientInterfaceMockRecorder) ProjectBudgetDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectBudgetDelete(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudgetDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudgetDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudgetDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudgetDelete), projectId) } // ProjectBudgetUpdate mocks base method. -func (m *MockApiClientInterface) ProjectBudgetUpdate(arg0 string, arg1 *ProjectBudgetUpdatePayload) (*ProjectBudget, error) { +func (m *MockApiClientInterface) ProjectBudgetUpdate(projectId string, payload *ProjectBudgetUpdatePayload) (*ProjectBudget, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectBudgetUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "ProjectBudgetUpdate", projectId, payload) ret0, _ := ret[0].(*ProjectBudget) ret1, _ := ret[1].(error) return ret0, ret1 } // ProjectBudgetUpdate indicates an expected call of ProjectBudgetUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ProjectBudgetUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectBudgetUpdate(projectId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudgetUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudgetUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectBudgetUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectBudgetUpdate), projectId, payload) } // ProjectCreate mocks base method. -func (m *MockApiClientInterface) ProjectCreate(arg0 ProjectCreatePayload) (Project, error) { +func (m *MockApiClientInterface) ProjectCreate(payload ProjectCreatePayload) (Project, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectCreate", arg0) + ret := m.ctrl.Call(m, "ProjectCreate", payload) ret0, _ := ret[0].(Project) ret1, _ := ret[1].(error) return ret0, ret1 } // ProjectCreate indicates an expected call of ProjectCreate. -func (mr *MockApiClientInterfaceMockRecorder) ProjectCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectCreate), payload) } // ProjectDelete mocks base method. -func (m *MockApiClientInterface) ProjectDelete(arg0 string) error { +func (m *MockApiClientInterface) ProjectDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectDelete", arg0) + ret := m.ctrl.Call(m, "ProjectDelete", id) ret0, _ := ret[0].(error) return ret0 } // ProjectDelete indicates an expected call of ProjectDelete. -func (mr *MockApiClientInterfaceMockRecorder) ProjectDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectDelete), id) } // ProjectEnvironments mocks base method. -func (m *MockApiClientInterface) ProjectEnvironments(arg0 string) ([]Environment, error) { +func (m *MockApiClientInterface) ProjectEnvironments(projectId string) ([]Environment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectEnvironments", arg0) + ret := m.ctrl.Call(m, "ProjectEnvironments", projectId) ret0, _ := ret[0].([]Environment) ret1, _ := ret[1].(error) return ret0, ret1 } // ProjectEnvironments indicates an expected call of ProjectEnvironments. -func (mr *MockApiClientInterfaceMockRecorder) ProjectEnvironments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectEnvironments(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectEnvironments", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectEnvironments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectEnvironments", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectEnvironments), projectId) } // ProjectMove mocks base method. -func (m *MockApiClientInterface) ProjectMove(arg0, arg1 string) error { +func (m *MockApiClientInterface) ProjectMove(id, targetProjectId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectMove", arg0, arg1) + ret := m.ctrl.Call(m, "ProjectMove", id, targetProjectId) ret0, _ := ret[0].(error) return ret0 } // ProjectMove indicates an expected call of ProjectMove. -func (mr *MockApiClientInterfaceMockRecorder) ProjectMove(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectMove(id, targetProjectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectMove", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectMove), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectMove", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectMove), id, targetProjectId) } // ProjectUpdate mocks base method. -func (m *MockApiClientInterface) ProjectUpdate(arg0 string, arg1 ProjectUpdatePayload) (Project, error) { +func (m *MockApiClientInterface) ProjectUpdate(id string, payload ProjectUpdatePayload) (Project, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "ProjectUpdate", id, payload) ret0, _ := ret[0].(Project) ret1, _ := ret[1].(error) return ret0, ret1 } // ProjectUpdate indicates an expected call of ProjectUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ProjectUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProjectUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProjectUpdate), id, payload) } // Projects mocks base method. @@ -1636,62 +1637,62 @@ func (mr *MockApiClientInterfaceMockRecorder) ProjectsAgentsAssignments() *gomoc } // Provider mocks base method. -func (m *MockApiClientInterface) Provider(arg0 string) (*Provider, error) { +func (m *MockApiClientInterface) Provider(providerId string) (*Provider, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Provider", arg0) + ret := m.ctrl.Call(m, "Provider", providerId) ret0, _ := ret[0].(*Provider) ret1, _ := ret[1].(error) return ret0, ret1 } // Provider indicates an expected call of Provider. -func (mr *MockApiClientInterfaceMockRecorder) Provider(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Provider(providerId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockApiClientInterface)(nil).Provider), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockApiClientInterface)(nil).Provider), providerId) } // ProviderCreate mocks base method. -func (m *MockApiClientInterface) ProviderCreate(arg0 ProviderCreatePayload) (*Provider, error) { +func (m *MockApiClientInterface) ProviderCreate(payload ProviderCreatePayload) (*Provider, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProviderCreate", arg0) + ret := m.ctrl.Call(m, "ProviderCreate", payload) ret0, _ := ret[0].(*Provider) ret1, _ := ret[1].(error) return ret0, ret1 } // ProviderCreate indicates an expected call of ProviderCreate. -func (mr *MockApiClientInterfaceMockRecorder) ProviderCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProviderCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderCreate", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderCreate), payload) } // ProviderDelete mocks base method. -func (m *MockApiClientInterface) ProviderDelete(arg0 string) error { +func (m *MockApiClientInterface) ProviderDelete(providerId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProviderDelete", arg0) + ret := m.ctrl.Call(m, "ProviderDelete", providerId) ret0, _ := ret[0].(error) return ret0 } // ProviderDelete indicates an expected call of ProviderDelete. -func (mr *MockApiClientInterfaceMockRecorder) ProviderDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProviderDelete(providerId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderDelete", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderDelete), providerId) } // ProviderUpdate mocks base method. -func (m *MockApiClientInterface) ProviderUpdate(arg0 string, arg1 ProviderUpdatePayload) (*Provider, error) { +func (m *MockApiClientInterface) ProviderUpdate(providerId string, payload ProviderUpdatePayload) (*Provider, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProviderUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "ProviderUpdate", providerId, payload) ret0, _ := ret[0].(*Provider) ret1, _ := ret[1].(error) return ret0, ret1 } // ProviderUpdate indicates an expected call of ProviderUpdate. -func (mr *MockApiClientInterfaceMockRecorder) ProviderUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) ProviderUpdate(providerId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProviderUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).ProviderUpdate), providerId, payload) } // Providers mocks base method. @@ -1710,191 +1711,191 @@ func (mr *MockApiClientInterfaceMockRecorder) Providers() *gomock.Call { } // PutEnvironmentDiscovery mocks base method. -func (m *MockApiClientInterface) PutEnvironmentDiscovery(arg0 string, arg1 *EnvironmentDiscoveryPutPayload) (*EnvironmentDiscoveryPayload, error) { +func (m *MockApiClientInterface) PutEnvironmentDiscovery(projectId string, payload *EnvironmentDiscoveryPutPayload) (*EnvironmentDiscoveryPayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PutEnvironmentDiscovery", arg0, arg1) + ret := m.ctrl.Call(m, "PutEnvironmentDiscovery", projectId, payload) ret0, _ := ret[0].(*EnvironmentDiscoveryPayload) ret1, _ := ret[1].(error) return ret0, ret1 } // PutEnvironmentDiscovery indicates an expected call of PutEnvironmentDiscovery. -func (mr *MockApiClientInterfaceMockRecorder) PutEnvironmentDiscovery(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) PutEnvironmentDiscovery(projectId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).PutEnvironmentDiscovery), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutEnvironmentDiscovery", reflect.TypeOf((*MockApiClientInterface)(nil).PutEnvironmentDiscovery), projectId, payload) } // RemoteStateAccessConfiguration mocks base method. -func (m *MockApiClientInterface) RemoteStateAccessConfiguration(arg0 string) (*RemoteStateAccessConfiguration, error) { +func (m *MockApiClientInterface) RemoteStateAccessConfiguration(environmentId string) (*RemoteStateAccessConfiguration, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoteStateAccessConfiguration", arg0) + ret := m.ctrl.Call(m, "RemoteStateAccessConfiguration", environmentId) ret0, _ := ret[0].(*RemoteStateAccessConfiguration) ret1, _ := ret[1].(error) return ret0, ret1 } // RemoteStateAccessConfiguration indicates an expected call of RemoteStateAccessConfiguration. -func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfiguration(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfiguration(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfiguration", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfiguration), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfiguration", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfiguration), environmentId) } // RemoteStateAccessConfigurationCreate mocks base method. -func (m *MockApiClientInterface) RemoteStateAccessConfigurationCreate(arg0 string, arg1 RemoteStateAccessConfigurationCreate) (*RemoteStateAccessConfiguration, error) { +func (m *MockApiClientInterface) RemoteStateAccessConfigurationCreate(environmentId string, payload RemoteStateAccessConfigurationCreate) (*RemoteStateAccessConfiguration, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoteStateAccessConfigurationCreate", arg0, arg1) + ret := m.ctrl.Call(m, "RemoteStateAccessConfigurationCreate", environmentId, payload) ret0, _ := ret[0].(*RemoteStateAccessConfiguration) ret1, _ := ret[1].(error) return ret0, ret1 } // RemoteStateAccessConfigurationCreate indicates an expected call of RemoteStateAccessConfigurationCreate. -func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfigurationCreate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfigurationCreate(environmentId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfigurationCreate", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfigurationCreate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfigurationCreate", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfigurationCreate), environmentId, payload) } // RemoteStateAccessConfigurationDelete mocks base method. -func (m *MockApiClientInterface) RemoteStateAccessConfigurationDelete(arg0 string) error { +func (m *MockApiClientInterface) RemoteStateAccessConfigurationDelete(environmentId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoteStateAccessConfigurationDelete", arg0) + ret := m.ctrl.Call(m, "RemoteStateAccessConfigurationDelete", environmentId) ret0, _ := ret[0].(error) return ret0 } // RemoteStateAccessConfigurationDelete indicates an expected call of RemoteStateAccessConfigurationDelete. -func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfigurationDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoteStateAccessConfigurationDelete(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfigurationDelete", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfigurationDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteStateAccessConfigurationDelete", reflect.TypeOf((*MockApiClientInterface)(nil).RemoteStateAccessConfigurationDelete), environmentId) } // RemoveCloudCredentialsFromProject mocks base method. -func (m *MockApiClientInterface) RemoveCloudCredentialsFromProject(arg0, arg1 string) error { +func (m *MockApiClientInterface) RemoveCloudCredentialsFromProject(projectId, credentialId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveCloudCredentialsFromProject", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveCloudCredentialsFromProject", projectId, credentialId) ret0, _ := ret[0].(error) return ret0 } // RemoveCloudCredentialsFromProject indicates an expected call of RemoveCloudCredentialsFromProject. -func (mr *MockApiClientInterfaceMockRecorder) RemoveCloudCredentialsFromProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoveCloudCredentialsFromProject(projectId, credentialId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredentialsFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveCloudCredentialsFromProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCloudCredentialsFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveCloudCredentialsFromProject), projectId, credentialId) } // RemoveCostCredentialsFromProject mocks base method. -func (m *MockApiClientInterface) RemoveCostCredentialsFromProject(arg0, arg1 string) error { +func (m *MockApiClientInterface) RemoveCostCredentialsFromProject(projectId, credentialId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveCostCredentialsFromProject", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveCostCredentialsFromProject", projectId, credentialId) ret0, _ := ret[0].(error) return ret0 } // RemoveCostCredentialsFromProject indicates an expected call of RemoveCostCredentialsFromProject. -func (mr *MockApiClientInterfaceMockRecorder) RemoveCostCredentialsFromProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoveCostCredentialsFromProject(projectId, credentialId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCostCredentialsFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveCostCredentialsFromProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveCostCredentialsFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveCostCredentialsFromProject), projectId, credentialId) } // RemoveTemplateFromProject mocks base method. -func (m *MockApiClientInterface) RemoveTemplateFromProject(arg0, arg1 string) error { +func (m *MockApiClientInterface) RemoveTemplateFromProject(templateId, projectId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveTemplateFromProject", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveTemplateFromProject", templateId, projectId) ret0, _ := ret[0].(error) return ret0 } // RemoveTemplateFromProject indicates an expected call of RemoveTemplateFromProject. -func (mr *MockApiClientInterfaceMockRecorder) RemoveTemplateFromProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoveTemplateFromProject(templateId, projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveTemplateFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveTemplateFromProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveTemplateFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveTemplateFromProject), templateId, projectId) } // RemoveUserFromProject mocks base method. -func (m *MockApiClientInterface) RemoveUserFromProject(arg0, arg1 string) error { +func (m *MockApiClientInterface) RemoveUserFromProject(projectId, userId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveUserFromProject", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveUserFromProject", projectId, userId) ret0, _ := ret[0].(error) return ret0 } // RemoveUserFromProject indicates an expected call of RemoveUserFromProject. -func (mr *MockApiClientInterfaceMockRecorder) RemoveUserFromProject(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoveUserFromProject(projectId, userId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUserFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveUserFromProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUserFromProject", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveUserFromProject), projectId, userId) } // RemoveUserRoleFromEnvironment mocks base method. -func (m *MockApiClientInterface) RemoveUserRoleFromEnvironment(arg0, arg1 string) error { +func (m *MockApiClientInterface) RemoveUserRoleFromEnvironment(environmentId, userId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveUserRoleFromEnvironment", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveUserRoleFromEnvironment", environmentId, userId) ret0, _ := ret[0].(error) return ret0 } // RemoveUserRoleFromEnvironment indicates an expected call of RemoveUserRoleFromEnvironment. -func (mr *MockApiClientInterfaceMockRecorder) RemoveUserRoleFromEnvironment(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RemoveUserRoleFromEnvironment(environmentId, userId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUserRoleFromEnvironment", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveUserRoleFromEnvironment), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveUserRoleFromEnvironment", reflect.TypeOf((*MockApiClientInterface)(nil).RemoveUserRoleFromEnvironment), environmentId, userId) } // Role mocks base method. -func (m *MockApiClientInterface) Role(arg0 string) (*Role, error) { +func (m *MockApiClientInterface) Role(id string) (*Role, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Role", arg0) + ret := m.ctrl.Call(m, "Role", id) ret0, _ := ret[0].(*Role) ret1, _ := ret[1].(error) return ret0, ret1 } // Role indicates an expected call of Role. -func (mr *MockApiClientInterfaceMockRecorder) Role(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Role(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Role", reflect.TypeOf((*MockApiClientInterface)(nil).Role), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Role", reflect.TypeOf((*MockApiClientInterface)(nil).Role), id) } // RoleCreate mocks base method. -func (m *MockApiClientInterface) RoleCreate(arg0 RoleCreatePayload) (*Role, error) { +func (m *MockApiClientInterface) RoleCreate(payload RoleCreatePayload) (*Role, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RoleCreate", arg0) + ret := m.ctrl.Call(m, "RoleCreate", payload) ret0, _ := ret[0].(*Role) ret1, _ := ret[1].(error) return ret0, ret1 } // RoleCreate indicates an expected call of RoleCreate. -func (mr *MockApiClientInterfaceMockRecorder) RoleCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RoleCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleCreate", reflect.TypeOf((*MockApiClientInterface)(nil).RoleCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleCreate", reflect.TypeOf((*MockApiClientInterface)(nil).RoleCreate), payload) } // RoleDelete mocks base method. -func (m *MockApiClientInterface) RoleDelete(arg0 string) error { +func (m *MockApiClientInterface) RoleDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RoleDelete", arg0) + ret := m.ctrl.Call(m, "RoleDelete", id) ret0, _ := ret[0].(error) return ret0 } // RoleDelete indicates an expected call of RoleDelete. -func (mr *MockApiClientInterfaceMockRecorder) RoleDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RoleDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleDelete", reflect.TypeOf((*MockApiClientInterface)(nil).RoleDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleDelete", reflect.TypeOf((*MockApiClientInterface)(nil).RoleDelete), id) } // RoleUpdate mocks base method. -func (m *MockApiClientInterface) RoleUpdate(arg0 string, arg1 RoleUpdatePayload) (*Role, error) { +func (m *MockApiClientInterface) RoleUpdate(id string, payload RoleUpdatePayload) (*Role, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RoleUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "RoleUpdate", id, payload) ret0, _ := ret[0].(*Role) ret1, _ := ret[1].(error) return ret0, ret1 } // RoleUpdate indicates an expected call of RoleUpdate. -func (mr *MockApiClientInterfaceMockRecorder) RoleUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) RoleUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).RoleUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).RoleUpdate), id, payload) } // Roles mocks base method. @@ -1913,47 +1914,47 @@ func (mr *MockApiClientInterfaceMockRecorder) Roles() *gomock.Call { } // SshKeyCreate mocks base method. -func (m *MockApiClientInterface) SshKeyCreate(arg0 SshKeyCreatePayload) (*SshKey, error) { +func (m *MockApiClientInterface) SshKeyCreate(payload SshKeyCreatePayload) (*SshKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SshKeyCreate", arg0) + ret := m.ctrl.Call(m, "SshKeyCreate", payload) ret0, _ := ret[0].(*SshKey) ret1, _ := ret[1].(error) return ret0, ret1 } // SshKeyCreate indicates an expected call of SshKeyCreate. -func (mr *MockApiClientInterfaceMockRecorder) SshKeyCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) SshKeyCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyCreate", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyCreate), payload) } // SshKeyDelete mocks base method. -func (m *MockApiClientInterface) SshKeyDelete(arg0 string) error { +func (m *MockApiClientInterface) SshKeyDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SshKeyDelete", arg0) + ret := m.ctrl.Call(m, "SshKeyDelete", id) ret0, _ := ret[0].(error) return ret0 } // SshKeyDelete indicates an expected call of SshKeyDelete. -func (mr *MockApiClientInterfaceMockRecorder) SshKeyDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) SshKeyDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyDelete", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyDelete), id) } // SshKeyUpdate mocks base method. -func (m *MockApiClientInterface) SshKeyUpdate(arg0 string, arg1 *SshKeyUpdatePayload) (*SshKey, error) { +func (m *MockApiClientInterface) SshKeyUpdate(id string, payload *SshKeyUpdatePayload) (*SshKey, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SshKeyUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "SshKeyUpdate", id, payload) ret0, _ := ret[0].(*SshKey) ret1, _ := ret[1].(error) return ret0, ret1 } // SshKeyUpdate indicates an expected call of SshKeyUpdate. -func (mr *MockApiClientInterfaceMockRecorder) SshKeyUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) SshKeyUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SshKeyUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).SshKeyUpdate), id, payload) } // SshKeys mocks base method. @@ -1972,120 +1973,120 @@ func (mr *MockApiClientInterfaceMockRecorder) SshKeys() *gomock.Call { } // SubscribeWorkflowTrigger mocks base method. -func (m *MockApiClientInterface) SubscribeWorkflowTrigger(arg0 string, arg1 WorkflowTriggerEnvironments) error { +func (m *MockApiClientInterface) SubscribeWorkflowTrigger(environmentId string, payload WorkflowTriggerEnvironments) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubscribeWorkflowTrigger", arg0, arg1) + ret := m.ctrl.Call(m, "SubscribeWorkflowTrigger", environmentId, payload) ret0, _ := ret[0].(error) return ret0 } // SubscribeWorkflowTrigger indicates an expected call of SubscribeWorkflowTrigger. -func (mr *MockApiClientInterfaceMockRecorder) SubscribeWorkflowTrigger(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) SubscribeWorkflowTrigger(environmentId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeWorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).SubscribeWorkflowTrigger), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeWorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).SubscribeWorkflowTrigger), environmentId, payload) } // Team mocks base method. -func (m *MockApiClientInterface) Team(arg0 string) (Team, error) { +func (m *MockApiClientInterface) Team(id string) (Team, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Team", arg0) + ret := m.ctrl.Call(m, "Team", id) ret0, _ := ret[0].(Team) ret1, _ := ret[1].(error) return ret0, ret1 } // Team indicates an expected call of Team. -func (mr *MockApiClientInterfaceMockRecorder) Team(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Team(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Team", reflect.TypeOf((*MockApiClientInterface)(nil).Team), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Team", reflect.TypeOf((*MockApiClientInterface)(nil).Team), id) } // TeamCreate mocks base method. -func (m *MockApiClientInterface) TeamCreate(arg0 TeamCreatePayload) (Team, error) { +func (m *MockApiClientInterface) TeamCreate(payload TeamCreatePayload) (Team, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamCreate", arg0) + ret := m.ctrl.Call(m, "TeamCreate", payload) ret0, _ := ret[0].(Team) ret1, _ := ret[1].(error) return ret0, ret1 } // TeamCreate indicates an expected call of TeamCreate. -func (mr *MockApiClientInterfaceMockRecorder) TeamCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamCreate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamCreate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamCreate), payload) } // TeamDelete mocks base method. -func (m *MockApiClientInterface) TeamDelete(arg0 string) error { +func (m *MockApiClientInterface) TeamDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamDelete", arg0) + ret := m.ctrl.Call(m, "TeamDelete", id) ret0, _ := ret[0].(error) return ret0 } // TeamDelete indicates an expected call of TeamDelete. -func (mr *MockApiClientInterfaceMockRecorder) TeamDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TeamDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TeamDelete), id) } // TeamRoleAssignmentCreateOrUpdate mocks base method. -func (m *MockApiClientInterface) TeamRoleAssignmentCreateOrUpdate(arg0 *TeamRoleAssignmentCreateOrUpdatePayload) (*TeamRoleAssignmentPayload, error) { +func (m *MockApiClientInterface) TeamRoleAssignmentCreateOrUpdate(payload *TeamRoleAssignmentCreateOrUpdatePayload) (*TeamRoleAssignmentPayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamRoleAssignmentCreateOrUpdate", arg0) + ret := m.ctrl.Call(m, "TeamRoleAssignmentCreateOrUpdate", payload) ret0, _ := ret[0].(*TeamRoleAssignmentPayload) ret1, _ := ret[1].(error) return ret0, ret1 } // TeamRoleAssignmentCreateOrUpdate indicates an expected call of TeamRoleAssignmentCreateOrUpdate. -func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignmentCreateOrUpdate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignmentCreateOrUpdate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignmentCreateOrUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignmentCreateOrUpdate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignmentCreateOrUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignmentCreateOrUpdate), payload) } // TeamRoleAssignmentDelete mocks base method. -func (m *MockApiClientInterface) TeamRoleAssignmentDelete(arg0 *TeamRoleAssignmentDeletePayload) error { +func (m *MockApiClientInterface) TeamRoleAssignmentDelete(payload *TeamRoleAssignmentDeletePayload) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamRoleAssignmentDelete", arg0) + ret := m.ctrl.Call(m, "TeamRoleAssignmentDelete", payload) ret0, _ := ret[0].(error) return ret0 } // TeamRoleAssignmentDelete indicates an expected call of TeamRoleAssignmentDelete. -func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignmentDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignmentDelete(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignmentDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignmentDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignmentDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignmentDelete), payload) } // TeamRoleAssignments mocks base method. -func (m *MockApiClientInterface) TeamRoleAssignments(arg0 *TeamRoleAssignmentListPayload) ([]TeamRoleAssignmentPayload, error) { +func (m *MockApiClientInterface) TeamRoleAssignments(payload *TeamRoleAssignmentListPayload) ([]TeamRoleAssignmentPayload, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamRoleAssignments", arg0) + ret := m.ctrl.Call(m, "TeamRoleAssignments", payload) ret0, _ := ret[0].([]TeamRoleAssignmentPayload) ret1, _ := ret[1].(error) return ret0, ret1 } // TeamRoleAssignments indicates an expected call of TeamRoleAssignments. -func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamRoleAssignments(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamRoleAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).TeamRoleAssignments), payload) } // TeamUpdate mocks base method. -func (m *MockApiClientInterface) TeamUpdate(arg0 string, arg1 TeamUpdatePayload) (Team, error) { +func (m *MockApiClientInterface) TeamUpdate(id string, payload TeamUpdatePayload) (Team, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "TeamUpdate", id, payload) ret0, _ := ret[0].(Team) ret1, _ := ret[1].(error) return ret0, ret1 } // TeamUpdate indicates an expected call of TeamUpdate. -func (mr *MockApiClientInterfaceMockRecorder) TeamUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TeamUpdate), id, payload) } // Teams mocks base method. @@ -2104,77 +2105,77 @@ func (mr *MockApiClientInterfaceMockRecorder) Teams() *gomock.Call { } // TeamsByName mocks base method. -func (m *MockApiClientInterface) TeamsByName(arg0 string) ([]Team, error) { +func (m *MockApiClientInterface) TeamsByName(name string) ([]Team, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TeamsByName", arg0) + ret := m.ctrl.Call(m, "TeamsByName", name) ret0, _ := ret[0].([]Team) ret1, _ := ret[1].(error) return ret0, ret1 } // TeamsByName indicates an expected call of TeamsByName. -func (mr *MockApiClientInterfaceMockRecorder) TeamsByName(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TeamsByName(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamsByName", reflect.TypeOf((*MockApiClientInterface)(nil).TeamsByName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeamsByName", reflect.TypeOf((*MockApiClientInterface)(nil).TeamsByName), name) } // Template mocks base method. -func (m *MockApiClientInterface) Template(arg0 string) (Template, error) { +func (m *MockApiClientInterface) Template(id string) (Template, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Template", arg0) + ret := m.ctrl.Call(m, "Template", id) ret0, _ := ret[0].(Template) ret1, _ := ret[1].(error) return ret0, ret1 } // Template indicates an expected call of Template. -func (mr *MockApiClientInterfaceMockRecorder) Template(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) Template(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Template", reflect.TypeOf((*MockApiClientInterface)(nil).Template), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Template", reflect.TypeOf((*MockApiClientInterface)(nil).Template), id) } // TemplateCreate mocks base method. -func (m *MockApiClientInterface) TemplateCreate(arg0 TemplateCreatePayload) (Template, error) { +func (m *MockApiClientInterface) TemplateCreate(payload TemplateCreatePayload) (Template, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TemplateCreate", arg0) + ret := m.ctrl.Call(m, "TemplateCreate", payload) ret0, _ := ret[0].(Template) ret1, _ := ret[1].(error) return ret0, ret1 } // TemplateCreate indicates an expected call of TemplateCreate. -func (mr *MockApiClientInterfaceMockRecorder) TemplateCreate(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TemplateCreate(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateCreate", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateCreate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateCreate", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateCreate), payload) } // TemplateDelete mocks base method. -func (m *MockApiClientInterface) TemplateDelete(arg0 string) error { +func (m *MockApiClientInterface) TemplateDelete(id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TemplateDelete", arg0) + ret := m.ctrl.Call(m, "TemplateDelete", id) ret0, _ := ret[0].(error) return ret0 } // TemplateDelete indicates an expected call of TemplateDelete. -func (mr *MockApiClientInterfaceMockRecorder) TemplateDelete(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TemplateDelete(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateDelete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateDelete", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateDelete), id) } // TemplateUpdate mocks base method. -func (m *MockApiClientInterface) TemplateUpdate(arg0 string, arg1 TemplateCreatePayload) (Template, error) { +func (m *MockApiClientInterface) TemplateUpdate(id string, payload TemplateCreatePayload) (Template, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TemplateUpdate", arg0, arg1) + ret := m.ctrl.Call(m, "TemplateUpdate", id, payload) ret0, _ := ret[0].(Template) ret1, _ := ret[1].(error) return ret0, ret1 } // TemplateUpdate indicates an expected call of TemplateUpdate. -func (mr *MockApiClientInterfaceMockRecorder) TemplateUpdate(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) TemplateUpdate(id, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateUpdate), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplateUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).TemplateUpdate), id, payload) } // Templates mocks base method. @@ -2193,76 +2194,76 @@ func (mr *MockApiClientInterfaceMockRecorder) Templates() *gomock.Call { } // UnassignConfigurationSets mocks base method. -func (m *MockApiClientInterface) UnassignConfigurationSets(arg0, arg1 string, arg2 []string) error { +func (m *MockApiClientInterface) UnassignConfigurationSets(scope, scopeId string, sets []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnassignConfigurationSets", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "UnassignConfigurationSets", scope, scopeId, sets) ret0, _ := ret[0].(error) return ret0 } // UnassignConfigurationSets indicates an expected call of UnassignConfigurationSets. -func (mr *MockApiClientInterfaceMockRecorder) UnassignConfigurationSets(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) UnassignConfigurationSets(scope, scopeId, sets any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnassignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).UnassignConfigurationSets), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnassignConfigurationSets", reflect.TypeOf((*MockApiClientInterface)(nil).UnassignConfigurationSets), scope, scopeId, sets) } // UnsubscribeWorkflowTrigger mocks base method. -func (m *MockApiClientInterface) UnsubscribeWorkflowTrigger(arg0 string, arg1 WorkflowTriggerEnvironments) error { +func (m *MockApiClientInterface) UnsubscribeWorkflowTrigger(environmentId string, payload WorkflowTriggerEnvironments) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UnsubscribeWorkflowTrigger", arg0, arg1) + ret := m.ctrl.Call(m, "UnsubscribeWorkflowTrigger", environmentId, payload) ret0, _ := ret[0].(error) return ret0 } // UnsubscribeWorkflowTrigger indicates an expected call of UnsubscribeWorkflowTrigger. -func (mr *MockApiClientInterfaceMockRecorder) UnsubscribeWorkflowTrigger(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) UnsubscribeWorkflowTrigger(environmentId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsubscribeWorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).UnsubscribeWorkflowTrigger), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsubscribeWorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).UnsubscribeWorkflowTrigger), environmentId, payload) } // UpdateUserProjectAssignment mocks base method. -func (m *MockApiClientInterface) UpdateUserProjectAssignment(arg0, arg1 string, arg2 *UpdateUserProjectAssignmentPayload) (*UserProjectAssignment, error) { +func (m *MockApiClientInterface) UpdateUserProjectAssignment(projectId, userId string, payload *UpdateUserProjectAssignmentPayload) (*UserProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateUserProjectAssignment", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "UpdateUserProjectAssignment", projectId, userId, payload) ret0, _ := ret[0].(*UserProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // UpdateUserProjectAssignment indicates an expected call of UpdateUserProjectAssignment. -func (mr *MockApiClientInterfaceMockRecorder) UpdateUserProjectAssignment(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) UpdateUserProjectAssignment(projectId, userId, payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserProjectAssignment", reflect.TypeOf((*MockApiClientInterface)(nil).UpdateUserProjectAssignment), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserProjectAssignment", reflect.TypeOf((*MockApiClientInterface)(nil).UpdateUserProjectAssignment), projectId, userId, payload) } // UserProjectAssignments mocks base method. -func (m *MockApiClientInterface) UserProjectAssignments(arg0 string) ([]UserProjectAssignment, error) { +func (m *MockApiClientInterface) UserProjectAssignments(projectId string) ([]UserProjectAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UserProjectAssignments", arg0) + ret := m.ctrl.Call(m, "UserProjectAssignments", projectId) ret0, _ := ret[0].([]UserProjectAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // UserProjectAssignments indicates an expected call of UserProjectAssignments. -func (mr *MockApiClientInterfaceMockRecorder) UserProjectAssignments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) UserProjectAssignments(projectId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserProjectAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).UserProjectAssignments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserProjectAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).UserProjectAssignments), projectId) } // UserRoleEnvironmentAssignments mocks base method. -func (m *MockApiClientInterface) UserRoleEnvironmentAssignments(arg0 string) ([]UserRoleEnvironmentAssignment, error) { +func (m *MockApiClientInterface) UserRoleEnvironmentAssignments(environmentId string) ([]UserRoleEnvironmentAssignment, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UserRoleEnvironmentAssignments", arg0) + ret := m.ctrl.Call(m, "UserRoleEnvironmentAssignments", environmentId) ret0, _ := ret[0].([]UserRoleEnvironmentAssignment) ret1, _ := ret[1].(error) return ret0, ret1 } // UserRoleEnvironmentAssignments indicates an expected call of UserRoleEnvironmentAssignments. -func (mr *MockApiClientInterfaceMockRecorder) UserRoleEnvironmentAssignments(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) UserRoleEnvironmentAssignments(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserRoleEnvironmentAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).UserRoleEnvironmentAssignments), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserRoleEnvironmentAssignments", reflect.TypeOf((*MockApiClientInterface)(nil).UserRoleEnvironmentAssignments), environmentId) } // Users mocks base method. @@ -2281,61 +2282,135 @@ func (mr *MockApiClientInterfaceMockRecorder) Users() *gomock.Call { } // VariablesFromRepository mocks base method. -func (m *MockApiClientInterface) VariablesFromRepository(arg0 *VariablesFromRepositoryPayload) ([]ConfigurationVariable, error) { +func (m *MockApiClientInterface) VariablesFromRepository(payload *VariablesFromRepositoryPayload) ([]ConfigurationVariable, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VariablesFromRepository", arg0) + ret := m.ctrl.Call(m, "VariablesFromRepository", payload) ret0, _ := ret[0].([]ConfigurationVariable) ret1, _ := ret[1].(error) return ret0, ret1 } // VariablesFromRepository indicates an expected call of VariablesFromRepository. -func (mr *MockApiClientInterfaceMockRecorder) VariablesFromRepository(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) VariablesFromRepository(payload any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VariablesFromRepository", reflect.TypeOf((*MockApiClientInterface)(nil).VariablesFromRepository), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VariablesFromRepository", reflect.TypeOf((*MockApiClientInterface)(nil).VariablesFromRepository), payload) +} + +// VcsConnection mocks base method. +func (m *MockApiClientInterface) VcsConnection(id string) (*VcsConnection, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VcsConnection", id) + ret0, _ := ret[0].(*VcsConnection) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VcsConnection indicates an expected call of VcsConnection. +func (mr *MockApiClientInterfaceMockRecorder) VcsConnection(id any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsConnection", reflect.TypeOf((*MockApiClientInterface)(nil).VcsConnection), id) +} + +// VcsConnectionCreate mocks base method. +func (m *MockApiClientInterface) VcsConnectionCreate(payload VcsConnectionCreatePayload) (*VcsConnection, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VcsConnectionCreate", payload) + ret0, _ := ret[0].(*VcsConnection) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VcsConnectionCreate indicates an expected call of VcsConnectionCreate. +func (mr *MockApiClientInterfaceMockRecorder) VcsConnectionCreate(payload any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsConnectionCreate", reflect.TypeOf((*MockApiClientInterface)(nil).VcsConnectionCreate), payload) +} + +// VcsConnectionDelete mocks base method. +func (m *MockApiClientInterface) VcsConnectionDelete(id string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VcsConnectionDelete", id) + ret0, _ := ret[0].(error) + return ret0 +} + +// VcsConnectionDelete indicates an expected call of VcsConnectionDelete. +func (mr *MockApiClientInterfaceMockRecorder) VcsConnectionDelete(id any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsConnectionDelete", reflect.TypeOf((*MockApiClientInterface)(nil).VcsConnectionDelete), id) +} + +// VcsConnectionUpdate mocks base method. +func (m *MockApiClientInterface) VcsConnectionUpdate(id string, payload VcsConnectionUpdatePayload) (*VcsConnection, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VcsConnectionUpdate", id, payload) + ret0, _ := ret[0].(*VcsConnection) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VcsConnectionUpdate indicates an expected call of VcsConnectionUpdate. +func (mr *MockApiClientInterfaceMockRecorder) VcsConnectionUpdate(id, payload any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsConnectionUpdate", reflect.TypeOf((*MockApiClientInterface)(nil).VcsConnectionUpdate), id, payload) +} + +// VcsConnections mocks base method. +func (m *MockApiClientInterface) VcsConnections() ([]VcsConnection, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VcsConnections") + ret0, _ := ret[0].([]VcsConnection) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VcsConnections indicates an expected call of VcsConnections. +func (mr *MockApiClientInterfaceMockRecorder) VcsConnections() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsConnections", reflect.TypeOf((*MockApiClientInterface)(nil).VcsConnections)) } // VcsToken mocks base method. -func (m *MockApiClientInterface) VcsToken(arg0, arg1 string) (*VscToken, error) { +func (m *MockApiClientInterface) VcsToken(vcsType, repository string) (*VscToken, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VcsToken", arg0, arg1) + ret := m.ctrl.Call(m, "VcsToken", vcsType, repository) ret0, _ := ret[0].(*VscToken) ret1, _ := ret[1].(error) return ret0, ret1 } // VcsToken indicates an expected call of VcsToken. -func (mr *MockApiClientInterfaceMockRecorder) VcsToken(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) VcsToken(vcsType, repository any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsToken", reflect.TypeOf((*MockApiClientInterface)(nil).VcsToken), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VcsToken", reflect.TypeOf((*MockApiClientInterface)(nil).VcsToken), vcsType, repository) } // WorkflowTrigger mocks base method. -func (m *MockApiClientInterface) WorkflowTrigger(arg0 string) ([]WorkflowTrigger, error) { +func (m *MockApiClientInterface) WorkflowTrigger(environmentId string) ([]WorkflowTrigger, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WorkflowTrigger", arg0) + ret := m.ctrl.Call(m, "WorkflowTrigger", environmentId) ret0, _ := ret[0].([]WorkflowTrigger) ret1, _ := ret[1].(error) return ret0, ret1 } // WorkflowTrigger indicates an expected call of WorkflowTrigger. -func (mr *MockApiClientInterfaceMockRecorder) WorkflowTrigger(arg0 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) WorkflowTrigger(environmentId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).WorkflowTrigger), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkflowTrigger", reflect.TypeOf((*MockApiClientInterface)(nil).WorkflowTrigger), environmentId) } // WorkflowTriggerUpsert mocks base method. -func (m *MockApiClientInterface) WorkflowTriggerUpsert(arg0 string, arg1 WorkflowTriggerUpsertPayload) ([]WorkflowTrigger, error) { +func (m *MockApiClientInterface) WorkflowTriggerUpsert(environmentId string, request WorkflowTriggerUpsertPayload) ([]WorkflowTrigger, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WorkflowTriggerUpsert", arg0, arg1) + ret := m.ctrl.Call(m, "WorkflowTriggerUpsert", environmentId, request) ret0, _ := ret[0].([]WorkflowTrigger) ret1, _ := ret[1].(error) return ret0, ret1 } // WorkflowTriggerUpsert indicates an expected call of WorkflowTriggerUpsert. -func (mr *MockApiClientInterfaceMockRecorder) WorkflowTriggerUpsert(arg0, arg1 any) *gomock.Call { +func (mr *MockApiClientInterfaceMockRecorder) WorkflowTriggerUpsert(environmentId, request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkflowTriggerUpsert", reflect.TypeOf((*MockApiClientInterface)(nil).WorkflowTriggerUpsert), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WorkflowTriggerUpsert", reflect.TypeOf((*MockApiClientInterface)(nil).WorkflowTriggerUpsert), environmentId, request) } diff --git a/client/http/client_mock.go b/client/http/client_mock.go index 151a2b73..b70ec782 100644 --- a/client/http/client_mock.go +++ b/client/http/client_mock.go @@ -19,6 +19,7 @@ import ( type MockHttpClientInterface struct { ctrl *gomock.Controller recorder *MockHttpClientInterfaceMockRecorder + isgomock struct{} } // MockHttpClientInterfaceMockRecorder is the mock recorder for MockHttpClientInterface. @@ -39,71 +40,71 @@ func (m *MockHttpClientInterface) EXPECT() *MockHttpClientInterfaceMockRecorder } // Delete mocks base method. -func (m *MockHttpClientInterface) Delete(arg0 string, arg1 map[string]string) error { +func (m *MockHttpClientInterface) Delete(path string, params map[string]string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", path, params) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockHttpClientInterfaceMockRecorder) Delete(arg0, arg1 any) *gomock.Call { +func (mr *MockHttpClientInterfaceMockRecorder) Delete(path, params any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockHttpClientInterface)(nil).Delete), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockHttpClientInterface)(nil).Delete), path, params) } // Get mocks base method. -func (m *MockHttpClientInterface) Get(arg0 string, arg1 map[string]string, arg2 any) error { +func (m *MockHttpClientInterface) Get(path string, params map[string]string, response any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Get", path, params, response) ret0, _ := ret[0].(error) return ret0 } // Get indicates an expected call of Get. -func (mr *MockHttpClientInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHttpClientInterfaceMockRecorder) Get(path, params, response any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHttpClientInterface)(nil).Get), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHttpClientInterface)(nil).Get), path, params, response) } // Patch mocks base method. -func (m *MockHttpClientInterface) Patch(arg0 string, arg1, arg2 any) error { +func (m *MockHttpClientInterface) Patch(path string, request, response any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Patch", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Patch", path, request, response) ret0, _ := ret[0].(error) return ret0 } // Patch indicates an expected call of Patch. -func (mr *MockHttpClientInterfaceMockRecorder) Patch(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHttpClientInterfaceMockRecorder) Patch(path, request, response any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockHttpClientInterface)(nil).Patch), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockHttpClientInterface)(nil).Patch), path, request, response) } // Post mocks base method. -func (m *MockHttpClientInterface) Post(arg0 string, arg1, arg2 any) error { +func (m *MockHttpClientInterface) Post(path string, request, response any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Post", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Post", path, request, response) ret0, _ := ret[0].(error) return ret0 } // Post indicates an expected call of Post. -func (mr *MockHttpClientInterfaceMockRecorder) Post(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHttpClientInterfaceMockRecorder) Post(path, request, response any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockHttpClientInterface)(nil).Post), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockHttpClientInterface)(nil).Post), path, request, response) } // Put mocks base method. -func (m *MockHttpClientInterface) Put(arg0 string, arg1, arg2 any) error { +func (m *MockHttpClientInterface) Put(path string, request, response any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Put", path, request, response) ret0, _ := ret[0].(error) return ret0 } // Put indicates an expected call of Put. -func (mr *MockHttpClientInterfaceMockRecorder) Put(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockHttpClientInterfaceMockRecorder) Put(path, request, response any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockHttpClientInterface)(nil).Put), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockHttpClientInterface)(nil).Put), path, request, response) } diff --git a/client/vcs_connection.go b/client/vcs_connection.go new file mode 100644 index 00000000..6c9a4a31 --- /dev/null +++ b/client/vcs_connection.go @@ -0,0 +1,81 @@ +package client + +type VcsConnection struct { + Id string `json:"id"` + Name string `json:"name"` + Type string `json:"type"` + Url string `json:"url"` + VcsAgentKey string `json:"vcsAgentKey"` +} + +type VcsConnectionCreatePayload struct { + Name string `json:"name"` + Type string `json:"type"` + Url string `json:"url"` + VcsAgentKey string `json:"vcsAgentKey,omitempty"` +} + +type VcsConnectionUpdatePayload struct { + Name string `json:"name"` + VcsAgentKey string `json:"vcsAgentKey,omitempty"` +} + +func (client *ApiClient) VcsConnection(id string) (*VcsConnection, error) { + var result VcsConnection + + if err := client.http.Get("/vcs/connections/"+id, nil, &result); err != nil { + return nil, err + } + + return &result, nil +} + +func (client *ApiClient) VcsConnectionCreate(payload VcsConnectionCreatePayload) (*VcsConnection, error) { + organizationId, err := client.OrganizationId() + if err != nil { + return nil, err + } + + payloadWithOrg := struct { + VcsConnectionCreatePayload + OrganizationId string `json:"organizationId"` + }{ + VcsConnectionCreatePayload: payload, + OrganizationId: organizationId, + } + + var result VcsConnection + if err := client.http.Post("/vcs/connections", payloadWithOrg, &result); err != nil { + return nil, err + } + + return &result, nil +} + +func (client *ApiClient) VcsConnectionUpdate(id string, payload VcsConnectionUpdatePayload) (*VcsConnection, error) { + var result VcsConnection + + if err := client.http.Put("/vcs/connections/"+id, payload, &result); err != nil { + return nil, err + } + + return &result, nil +} + +func (client *ApiClient) VcsConnectionDelete(id string) error { + return client.http.Delete("/vcs/connections/"+id, nil) +} + +func (client *ApiClient) VcsConnections() ([]VcsConnection, error) { + organizationId, err := client.OrganizationId() + if err != nil { + return nil, err + } + + var result []VcsConnection + if err := client.http.Get("/vcs/connections", map[string]string{"organizationId": organizationId}, &result); err != nil { + return nil, err + } + + return result, nil +} diff --git a/client/vcs_connection_test.go b/client/vcs_connection_test.go new file mode 100644 index 00000000..5eb03bd1 --- /dev/null +++ b/client/vcs_connection_test.go @@ -0,0 +1,171 @@ +package client_test + +import ( + . "github.com/env0/terraform-provider-env0/client" + "github.com/jinzhu/copier" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "go.uber.org/mock/gomock" +) + +var _ = Describe("VcsConnection Client", func() { + mockVcsConnection := VcsConnection{ + Id: "id0", + Name: "test-connection", + Type: "GitHubEnterprise", + Url: "https://github.example.com", + VcsAgentKey: "ENV0_DEFAULT", + } + + Describe("Get VcsConnection", func() { + var returnedVcsConnection *VcsConnection + var err error + + BeforeEach(func() { + httpCall = mockHttpClient.EXPECT(). + Get("/vcs/connections/"+mockVcsConnection.Id, nil, gomock.Any()). + Do(func(path string, request interface{}, response *VcsConnection) { + *response = mockVcsConnection + }) + returnedVcsConnection, err = apiClient.VcsConnection(mockVcsConnection.Id) + }) + + It("Should send GET request", func() { + httpCall.Times(1) + }) + + It("Should return vcs connection", func() { + Expect(*returnedVcsConnection).To(Equal(mockVcsConnection)) + }) + + It("Should not return error", func() { + Expect(err).To(BeNil()) + }) + }) + + Describe("Create VcsConnection", func() { + var createdVcsConnection *VcsConnection + var err error + + BeforeEach(func() { + mockOrganizationIdCall() + + createPayload := VcsConnectionCreatePayload{} + _ = copier.Copy(&createPayload, &mockVcsConnection) + + expectedCreateRequest := struct { + VcsConnectionCreatePayload + OrganizationId string `json:"organizationId"` + }{ + VcsConnectionCreatePayload: createPayload, + OrganizationId: organizationId, + } + + httpCall = mockHttpClient.EXPECT(). + Post("/vcs/connections", expectedCreateRequest, gomock.Any()). + Do(func(path string, request interface{}, response *VcsConnection) { + *response = mockVcsConnection + }) + + createdVcsConnection, err = apiClient.VcsConnectionCreate(createPayload) + }) + + It("Should get organization id", func() { + organizationIdCall.Times(1) + }) + + It("Should send POST request with params", func() { + httpCall.Times(1) + }) + + It("Should not return error", func() { + Expect(err).To(BeNil()) + }) + + It("Should return created vcs connection", func() { + Expect(*createdVcsConnection).To(Equal(mockVcsConnection)) + }) + }) + + Describe("Update VcsConnection", func() { + var updatedVcsConnection *VcsConnection + var err error + + BeforeEach(func() { + updatePayload := VcsConnectionUpdatePayload{ + Name: mockVcsConnection.Name, + VcsAgentKey: mockVcsConnection.VcsAgentKey, + } + + httpCall = mockHttpClient.EXPECT(). + Put("/vcs/connections/"+mockVcsConnection.Id, updatePayload, gomock.Any()). + Do(func(path string, request interface{}, response *VcsConnection) { + *response = mockVcsConnection + }) + + updatedVcsConnection, err = apiClient.VcsConnectionUpdate(mockVcsConnection.Id, updatePayload) + }) + + It("Should send PUT request with params", func() { + httpCall.Times(1) + }) + + It("Should not return error", func() { + Expect(err).To(BeNil()) + }) + + It("Should return updated vcs connection", func() { + Expect(*updatedVcsConnection).To(Equal(mockVcsConnection)) + }) + }) + + Describe("Delete VcsConnection", func() { + var err error + + BeforeEach(func() { + httpCall = mockHttpClient.EXPECT().Delete("/vcs/connections/"+mockVcsConnection.Id, nil) + err = apiClient.VcsConnectionDelete(mockVcsConnection.Id) + }) + + It("Should send DELETE request", func() { + httpCall.Times(1) + }) + + It("Should not return error", func() { + Expect(err).To(BeNil()) + }) + }) + + Describe("List VcsConnections", func() { + var returnedVcsConnections []VcsConnection + var err error + mockVcsConnections := []VcsConnection{mockVcsConnection} + + BeforeEach(func() { + mockOrganizationIdCall() + + httpCall = mockHttpClient.EXPECT(). + Get("/vcs/connections", map[string]string{"organizationId": organizationId}, gomock.Any()). + Do(func(path string, request interface{}, response *[]VcsConnection) { + *response = mockVcsConnections + }) + returnedVcsConnections, err = apiClient.VcsConnections() + }) + + It("Should get organization id", func() { + organizationIdCall.Times(1) + }) + + It("Should send GET request", func() { + httpCall.Times(1) + }) + + It("Should return vcs connections", func() { + Expect(returnedVcsConnections).To(Equal(mockVcsConnections)) + }) + + It("Should not return error", func() { + Expect(err).To(BeNil()) + }) + }) +}) diff --git a/env0/provider.go b/env0/provider.go index 4c69efa1..e2cf0e8b 100644 --- a/env0/provider.go +++ b/env0/provider.go @@ -162,6 +162,7 @@ func Provider(version string) plugin.ProviderFunc { "env0_variable_set_assignment": resourceVariableSetAssignment(), "env0_environment_output_configuration_variable": resourceEnvironmentOutputConfigurationVariable(), "env0_aws_cloud_configuration": resourceAwsCloudConfiguration(), + "env0_vcs_connection": resourceVcsConnection(), }, } diff --git a/env0/resource_vcs_connection.go b/env0/resource_vcs_connection.go new file mode 100644 index 00000000..69eb1edb --- /dev/null +++ b/env0/resource_vcs_connection.go @@ -0,0 +1,162 @@ +package env0 + +import ( + "context" + "fmt" + + "github.com/env0/terraform-provider-env0/client" + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func resourceVcsConnection() *schema.Resource { + return &schema.Resource{ + CreateContext: resourceVcsConnectionCreate, + ReadContext: resourceVcsConnectionRead, + UpdateContext: resourceVcsConnectionUpdate, + DeleteContext: resourceVcsConnectionDelete, + + Importer: &schema.ResourceImporter{StateContext: resourceVcsConnectionImport}, + + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + Description: "the VCS type (BitBucketServer, GitLabEnterprise, or GitHubEnterprise)", + ValidateDiagFunc: NewStringInValidator([]string{ + "BitBucketServer", + "GitLabEnterprise", + "GitHubEnterprise", + }), + }, + "name": { + Type: schema.TypeString, + Required: true, + Description: "name of the VCS connection", + }, + "url": { + Type: schema.TypeString, + Required: true, + Description: "URL of the VCS server", + ValidateDiagFunc: ValidateUrl, + }, + "vcs_agent_key": { + Type: schema.TypeString, + Optional: true, + Description: "VCS agent key. Use a custom agent key or 'ENV0_DEFAULT' to use the default env0 agent", + }, + }, + } +} + +func resourceVcsConnectionCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + apiClient := meta.(client.ApiClientInterface) + + var payload client.VcsConnectionCreatePayload + if err := readResourceData(&payload, d); err != nil { + return diag.Errorf("schema resource data deserialization failed: %v", err) + } + + vcsConnection, err := apiClient.VcsConnectionCreate(payload) + if err != nil { + return diag.Errorf("could not create VCS connection: %v", err) + } + + d.SetId(vcsConnection.Id) + + return nil +} + +func resourceVcsConnectionRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + apiClient := meta.(client.ApiClientInterface) + + vcsConnection, err := apiClient.VcsConnection(d.Id()) + if err != nil { + return diag.Errorf("could not get VCS connection: %v", err) + } + + if err := writeResourceData(vcsConnection, d); err != nil { + return diag.Errorf("schema resource data serialization failed: %v", err) + } + + return nil +} + +func resourceVcsConnectionUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + apiClient := meta.(client.ApiClientInterface) + + var payload client.VcsConnectionUpdatePayload + if err := readResourceData(&payload, d); err != nil { + return diag.Errorf("schema resource data deserialization failed: %v", err) + } + + if _, err := apiClient.VcsConnectionUpdate(d.Id(), payload); err != nil { + return diag.Errorf("could not update VCS connection: %v", err) + } + + return resourceVcsConnectionRead(ctx, d, meta) +} + +func resourceVcsConnectionDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + apiClient := meta.(client.ApiClientInterface) + + if err := apiClient.VcsConnectionDelete(d.Id()); err != nil { + return diag.Errorf("could not delete VCS connection: %v", err) + } + + return nil +} + +func getVcsConnectionByName(name string, meta interface{}) (*client.VcsConnection, error) { + apiClient := meta.(client.ApiClientInterface) + + vcsConnections, err := apiClient.VcsConnections() + if err != nil { + return nil, err + } + + var foundConnections []client.VcsConnection + + for _, connection := range vcsConnections { + if connection.Name == name { + foundConnections = append(foundConnections, connection) + } + } + + if len(foundConnections) == 0 { + return nil, fmt.Errorf("VCS connection with name %v not found", name) + } + + if len(foundConnections) > 1 { + return nil, fmt.Errorf("found multiple VCS connections with name: %s. Use id instead or make sure VCS connection names are unique %v", name, foundConnections) + } + + return &foundConnections[0], nil +} + +func getVcsConnection(ctx context.Context, id string, meta interface{}) (*client.VcsConnection, error) { + if _, err := uuid.Parse(id); err == nil { + tflog.Info(ctx, "Resolving VCS connection by id", map[string]interface{}{"id": id}) + + return meta.(client.ApiClientInterface).VcsConnection(id) + } + + tflog.Info(ctx, "Resolving VCS connection by name", map[string]interface{}{"name": id}) + + return getVcsConnectionByName(id, meta) +} + +func resourceVcsConnectionImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + vcsConnection, err := getVcsConnection(ctx, d.Id(), meta) + if err != nil { + return nil, err + } + + if err := writeResourceData(vcsConnection, d); err != nil { + return nil, fmt.Errorf("schema resource data serialization failed: %w", err) + } + + return []*schema.ResourceData{d}, nil +} diff --git a/env0/resource_vcs_connection_test.go b/env0/resource_vcs_connection_test.go new file mode 100644 index 00000000..79711047 --- /dev/null +++ b/env0/resource_vcs_connection_test.go @@ -0,0 +1,225 @@ +package env0 + +import ( + "errors" + "regexp" + "testing" + + "github.com/env0/terraform-provider-env0/client" + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "go.uber.org/mock/gomock" +) + +func TestUnitVcsConnectionResource(t *testing.T) { + resourceType := "env0_vcs_connection" + resourceName := "test" + resourceNameImport := resourceType + "." + resourceName + accessor := resourceAccessor(resourceType, resourceName) + + vcsConnection := client.VcsConnection{ + Id: uuid.NewString(), + Name: "test-connection", + Type: "GitHubEnterprise", + Url: "https://github.example.com", + VcsAgentKey: "ENV0_DEFAULT", + } + + updatedVcsConnection := client.VcsConnection{ + Id: vcsConnection.Id, + Name: "updated-connection", + Type: vcsConnection.Type, + Url: vcsConnection.Url, + VcsAgentKey: "custom-agent", + } + + t.Run("Success", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(accessor, "id", vcsConnection.Id), + resource.TestCheckResourceAttr(accessor, "name", vcsConnection.Name), + resource.TestCheckResourceAttr(accessor, "type", vcsConnection.Type), + resource.TestCheckResourceAttr(accessor, "url", vcsConnection.Url), + resource.TestCheckResourceAttr(accessor, "vcs_agent_key", vcsConnection.VcsAgentKey), + ), + }, + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": updatedVcsConnection.Name, + "type": updatedVcsConnection.Type, + "url": updatedVcsConnection.Url, + "vcs_agent_key": updatedVcsConnection.VcsAgentKey, + }), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr(accessor, "id", updatedVcsConnection.Id), + resource.TestCheckResourceAttr(accessor, "name", updatedVcsConnection.Name), + resource.TestCheckResourceAttr(accessor, "type", updatedVcsConnection.Type), + resource.TestCheckResourceAttr(accessor, "url", updatedVcsConnection.Url), + resource.TestCheckResourceAttr(accessor, "vcs_agent_key", updatedVcsConnection.VcsAgentKey), + ), + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + gomock.InOrder( + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(2).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnectionUpdate(vcsConnection.Id, gomock.Any()).Times(1).Return(&updatedVcsConnection, nil), + mock.EXPECT().VcsConnection(updatedVcsConnection.Id).Times(2).Return(&updatedVcsConnection, nil), + mock.EXPECT().VcsConnectionDelete(updatedVcsConnection.Id).Times(1), + ) + }) + }) + + t.Run("Create Failure", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + ExpectError: regexp.MustCompile("could not create VCS connection: error"), + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + mock.EXPECT().OrganizationId().Times(1).Return("org-1", nil) + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(nil, errors.New("error")) + }) + }) + + t.Run("Import By Id", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + }, + { + ResourceName: resourceNameImport, + ImportState: true, + ImportStateId: vcsConnection.Id, + ImportStateVerify: true, + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + gomock.InOrder( + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(3).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnectionDelete(vcsConnection.Id).Times(1), + ) + }) + }) + + t.Run("Import By Name", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + }, + { + ResourceName: resourceNameImport, + ImportState: true, + ImportStateId: vcsConnection.Name, + ImportStateVerify: true, + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + gomock.InOrder( + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(1).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnections().Times(1).Return([]client.VcsConnection{vcsConnection}, nil), + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(1).Return(&vcsConnection, nil), + mock.EXPECT().VcsConnectionDelete(vcsConnection.Id).Times(1), + ) + }) + }) + + t.Run("Import By Name - Multiple Found", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + }, + { + ResourceName: resourceNameImport, + ImportState: true, + ImportStateId: vcsConnection.Name, + ExpectError: regexp.MustCompile("found multiple VCS connections with name: .* Use id instead or make sure VCS connection names are unique"), + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + duplicateConnection := vcsConnection + duplicateConnection.Id = "different-id" + + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(&vcsConnection, nil) + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(1).Return(&vcsConnection, nil) + mock.EXPECT().VcsConnections().Times(1).Return( + []client.VcsConnection{vcsConnection, duplicateConnection}, + nil, + ) + mock.EXPECT().VcsConnectionDelete(vcsConnection.Id).Times(1) + }) + }) + + t.Run("Import By Name - Not Found", func(t *testing.T) { + testCase := resource.TestCase{ + Steps: []resource.TestStep{ + { + Config: resourceConfigCreate(resourceType, resourceName, map[string]interface{}{ + "name": vcsConnection.Name, + "type": vcsConnection.Type, + "url": vcsConnection.Url, + "vcs_agent_key": vcsConnection.VcsAgentKey, + }), + }, + { + ResourceName: resourceNameImport, + ImportState: true, + ImportStateId: "non-existent-name", + ExpectError: regexp.MustCompile("VCS connection with name .* not found"), + }, + }, + } + + runUnitTest(t, testCase, func(mock *client.MockApiClientInterface) { + mock.EXPECT().VcsConnectionCreate(gomock.Any()).Times(1).Return(&vcsConnection, nil) + mock.EXPECT().VcsConnection(vcsConnection.Id).Times(1).Return(&vcsConnection, nil) + mock.EXPECT().VcsConnections().Times(1).Return([]client.VcsConnection{}, nil) + mock.EXPECT().VcsConnectionDelete(vcsConnection.Id).Times(1) + }) + }) +} diff --git a/env0/validators.go b/env0/validators.go index a509f5a1..9b66a435 100644 --- a/env0/validators.go +++ b/env0/validators.go @@ -2,6 +2,7 @@ package env0 import ( "fmt" + "net/url" "regexp" "strings" @@ -145,3 +146,14 @@ func NewRoleValidator(supportedBuiltInRoles []string) schema.SchemaValidateDiagF return diag.Errorf("the following built-in role '%s' is not supported for this resource, must be one of %s", role, "["+strings.Join(supportedBuiltInRoles, ",")+"]") } } + +func ValidateUrl(i interface{}, path cty.Path) diag.Diagnostics { + v := i.(string) + _, err := url.ParseRequestURI(v) + + if err != nil { + return diag.Errorf("must be a valid URL: %v", err) + } + + return nil +} diff --git a/env0/validators_test.go b/env0/validators_test.go new file mode 100644 index 00000000..239939b6 --- /dev/null +++ b/env0/validators_test.go @@ -0,0 +1,169 @@ +package env0 + +import ( + "testing" + + "github.com/hashicorp/go-cty/cty" + "github.com/stretchr/testify/assert" +) + +func TestValidateUrl(t *testing.T) { + tests := []struct { + name string + url string + expectError bool + }{ + { + name: "valid http url", + url: "http://example.com", + expectError: false, + }, + { + name: "valid https url", + url: "https://example.com", + expectError: false, + }, + { + name: "valid url with path", + url: "https://example.com/path/to/something", + expectError: false, + }, + { + name: "invalid url - missing protocol", + url: "example.com", + expectError: true, + }, + { + name: "invalid url - malformed", + url: "not-a-url", + expectError: true, + }, + { + name: "empty url", + url: "", + expectError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + diags := ValidateUrl(tt.url, cty.Path{}) + hasError := diags.HasError() + assert.Equal(t, tt.expectError, hasError) + }) + } +} + +func TestNewStringInValidator(t *testing.T) { + allowedValues := []string{"one", "two", "three"} + validator := NewStringInValidator(allowedValues) + + tests := []struct { + name string + value string + expectError bool + }{ + { + name: "valid value", + value: "one", + expectError: false, + }, + { + name: "another valid value", + value: "two", + expectError: false, + }, + { + name: "invalid value", + value: "four", + expectError: true, + }, + { + name: "empty string", + value: "", + expectError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + diags := validator(tt.value, cty.Path{}) + hasError := diags.HasError() + assert.Equal(t, tt.expectError, hasError) + }) + } +} + +func TestValidateNotEmptyString(t *testing.T) { + tests := []struct { + name string + value string + expectError bool + }{ + { + name: "non-empty string", + value: "valid", + expectError: false, + }, + { + name: "empty string", + value: "", + expectError: true, + }, + { + name: "whitespace string", + value: " ", + expectError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + diags := ValidateNotEmptyString(tt.value, cty.Path{}) + hasError := diags.HasError() + assert.Equal(t, tt.expectError, hasError) + }) + } +} + +func TestValidateRetries(t *testing.T) { + tests := []struct { + name string + value int + expectError bool + }{ + { + name: "valid retries - 1", + value: 1, + expectError: false, + }, + { + name: "valid retries - 2", + value: 2, + expectError: false, + }, + { + name: "valid retries - 3", + value: 3, + expectError: false, + }, + { + name: "invalid retries - too low", + value: 0, + expectError: true, + }, + { + name: "invalid retries - too high", + value: 4, + expectError: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + diags := ValidateRetries(tt.value, cty.Path{}) + hasError := diags.HasError() + assert.Equal(t, tt.expectError, hasError) + }) + } +} diff --git a/examples/resources/env0_vcs_connection/resource.tf b/examples/resources/env0_vcs_connection/resource.tf new file mode 100644 index 00000000..168e444a --- /dev/null +++ b/examples/resources/env0_vcs_connection/resource.tf @@ -0,0 +1,23 @@ +# Create a GitHub Enterprise VCS connection with default agent +resource "env0_vcs_connection" "github_enterprise" { + name = "github-enterprise" + type = "GitHubEnterprise" + url = "https://github.example.com" + vcs_agent_key = "ENV0_DEFAULT" +} + +# Create a GitLab Enterprise VCS connection with custom agent +resource "env0_vcs_connection" "gitlab_enterprise" { + name = "gitlab-enterprise" + type = "GitLabEnterprise" + url = "https://gitlab.example.com" + vcs_agent_key = "my-custom-agent" +} + +# Create a BitBucket Server VCS connection +resource "env0_vcs_connection" "bitbucket_server" { + name = "bitbucket-server" + type = "BitBucketServer" + url = "https://bitbucket.example.com" +} + diff --git a/examples/resources/env0_workflow_triggers copy/resource.tf b/examples/resources/env0_workflow_triggers copy/resource.tf deleted file mode 100644 index 672bdef8..00000000 --- a/examples/resources/env0_workflow_triggers copy/resource.tf +++ /dev/null @@ -1,31 +0,0 @@ -data "env0_template" "template" { - name = "Template Name" -} - -data "env0_project" "project" { - name = "Default Organization Project" -} - -resource "env0_environment" "environment" { - name = "environment" - project_id = data.env0_project.project.id - template_id = data.env0_template.template.id -} - -resource "env0_api_key" "api_key" { - name = "user-api-key-sample" - organization_role = "User" -} - -resource "env0_custom_role" "custom_role" { - name = "custom-role-sample" - permissions = [ - "VIEW_ENVIRONMENT" - ] -} - -resource "env0_user_environment_assignment" "assignment" { - user_id = env0_api_key.api_key.id - environment_id = env0_environment.environment.id - role_id = env0_custom_role.custom_role.id -} diff --git a/tests/integration/037_vcs_connection/conf.tf b/tests/integration/037_vcs_connection/conf.tf new file mode 100644 index 00000000..8d6d2954 --- /dev/null +++ b/tests/integration/037_vcs_connection/conf.tf @@ -0,0 +1,15 @@ +terraform { + backend "local" { + } + required_providers { + env0 = { + source = "terraform-registry.env0.com/env0/env0" + } + } +} + +provider "env0" {} + +variable "second_run" { + default = false +} diff --git a/tests/integration/037_vcs_connection/expected_outputs.json b/tests/integration/037_vcs_connection/expected_outputs.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tests/integration/037_vcs_connection/expected_outputs.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/integration/037_vcs_connection/main.tf b/tests/integration/037_vcs_connection/main.tf new file mode 100644 index 00000000..24e99144 --- /dev/null +++ b/tests/integration/037_vcs_connection/main.tf @@ -0,0 +1,16 @@ +provider "random" {} + +resource "random_string" "random" { + length = 8 + special = false + min_lower = 8 +} + +resource "env0_vcs_connection" "github" { + name = "github-enterprise-${random_string.random.result}" + type = "GitHubEnterprise" + url = "https://github.example.com" + vcs_agent_key = var.second_run ? "ENV0_DEFAULT" : "custom-agent-key" +} + + From fc9b03b8b64ad94b9770539f42e4e4eb0d7907f2 Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Fri, 27 Dec 2024 08:10:41 -0600 Subject: [PATCH 2/3] disable integration test --- tests/integration/037_vcs_connection/main.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/037_vcs_connection/main.tf b/tests/integration/037_vcs_connection/main.tf index 24e99144..4040ae82 100644 --- a/tests/integration/037_vcs_connection/main.tf +++ b/tests/integration/037_vcs_connection/main.tf @@ -6,11 +6,11 @@ resource "random_string" "random" { min_lower = 8 } -resource "env0_vcs_connection" "github" { - name = "github-enterprise-${random_string.random.result}" - type = "GitHubEnterprise" - url = "https://github.example.com" - vcs_agent_key = var.second_run ? "ENV0_DEFAULT" : "custom-agent-key" -} +# resource "env0_vcs_connection" "github" { +# name = "github-enterprise-${random_string.random.result}" +# type = "GitHubEnterprise" +# url = "https://github.example.com" +# vcs_agent_key = var.second_run ? "ENV0_DEFAULT" : "custom-agent-key" +# } From eb792a3d367be36b9914904519f34c52f446ec64 Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Thu, 2 Jan 2025 11:06:06 -0600 Subject: [PATCH 3/3] update description --- env0/resource_vcs_connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env0/resource_vcs_connection.go b/env0/resource_vcs_connection.go index 69eb1edb..a3721797 100644 --- a/env0/resource_vcs_connection.go +++ b/env0/resource_vcs_connection.go @@ -39,7 +39,7 @@ func resourceVcsConnection() *schema.Resource { "url": { Type: schema.TypeString, Required: true, - Description: "URL of the VCS server", + Description: "URL of the VCS server. This can either be a 'VCS URL' (e.g.: https://github.com) or 'Repository URL' (E.g.: https://github.com/env0/myrepo)", ValidateDiagFunc: ValidateUrl, }, "vcs_agent_key": {