// This file is auto-generated by @hey-api/openapi-ts

import {
  type Client,
  formDataBodySerializer,
  type Options as Options2,
  type TDataShape,
} from './client';
import { client } from './client.gen';
import type {
  AuthenticateUserData,
  AuthenticateUserErrors,
  AuthenticateUserResponses,
  BackupData,
  BackupErrors,
  BackupResponses,
  CreateKubernetesIngressData,
  CreateKubernetesIngressErrors,
  CreateKubernetesIngressResponses,
  CreateKubernetesNamespaceData,
  CreateKubernetesNamespaceErrors,
  CreateKubernetesNamespaceResponses,
  CreateKubernetesServiceData,
  CreateKubernetesServiceErrors,
  CreateKubernetesServiceResponses,
  CurrentUserInspectData,
  CurrentUserInspectErrors,
  CurrentUserInspectResponses,
  CustomTemplateCreateFileData,
  CustomTemplateCreateFileErrors,
  CustomTemplateCreateFileResponses,
  CustomTemplateCreateRepositoryData,
  CustomTemplateCreateRepositoryErrors,
  CustomTemplateCreateRepositoryResponses,
  CustomTemplateCreateStringData,
  CustomTemplateCreateStringErrors,
  CustomTemplateCreateStringResponses,
  CustomTemplateDeleteData,
  CustomTemplateDeleteErrors,
  CustomTemplateDeleteResponses,
  CustomTemplateFileData,
  CustomTemplateFileErrors,
  CustomTemplateFileResponses,
  CustomTemplateGitFetchData,
  CustomTemplateGitFetchErrors,
  CustomTemplateGitFetchResponses,
  CustomTemplateInspectData,
  CustomTemplateInspectErrors,
  CustomTemplateInspectResponses,
  CustomTemplateListData,
  CustomTemplateListErrors,
  CustomTemplateListResponses,
  CustomTemplateUpdateData,
  CustomTemplateUpdateErrors,
  CustomTemplateUpdateResponses,
  DeleteClusterRoleBindingsData,
  DeleteClusterRoleBindingsErrors,
  DeleteClusterRoleBindingsResponses,
  DeleteClusterRolesData,
  DeleteClusterRolesErrors,
  DeleteClusterRolesResponses,
  DeleteCronJobsData,
  DeleteCronJobsErrors,
  DeleteCronJobsResponses,
  DeleteJobsData,
  DeleteJobsErrors,
  DeleteJobsResponses,
  DeleteKubernetesIngressesData,
  DeleteKubernetesIngressesErrors,
  DeleteKubernetesIngressesResponses,
  DeleteKubernetesNamespaceData,
  DeleteKubernetesNamespaceErrors,
  DeleteKubernetesNamespaceResponses,
  DeleteKubernetesPersistentVolumeClaimsData,
  DeleteKubernetesPersistentVolumeClaimsErrors,
  DeleteKubernetesPersistentVolumeClaimsResponses,
  DeleteKubernetesPersistentVolumesData,
  DeleteKubernetesPersistentVolumesErrors,
  DeleteKubernetesPersistentVolumesResponses,
  DeleteKubernetesPodData,
  DeleteKubernetesPodErrors,
  DeleteKubernetesPodResponses,
  DeleteKubernetesServicesData,
  DeleteKubernetesServicesErrors,
  DeleteKubernetesServicesResponses,
  DeleteKubernetesStorageClassesData,
  DeleteKubernetesStorageClassesErrors,
  DeleteKubernetesStorageClassesResponses,
  DeleteRoleBindingsData,
  DeleteRoleBindingsErrors,
  DeleteRoleBindingsResponses,
  DeleteRolesData,
  DeleteRolesErrors,
  DeleteRolesResponses,
  DeleteServiceAccountsData,
  DeleteServiceAccountsErrors,
  DeleteServiceAccountsResponses,
  DeleteWebhooksByIdData,
  DeleteWebhooksByIdErrors,
  DeleteWebhooksByIdResponses,
  DescribeResourceData,
  DescribeResourceErrors,
  DescribeResourceResponses,
  DockerContainerGpusInspectData,
  DockerContainerGpusInspectErrors,
  DockerContainerGpusInspectResponses,
  DockerDashboardData,
  DockerDashboardErrors,
  DockerDashboardResponses,
  DockerImagesListData,
  DockerImagesListErrors,
  DockerImagesListResponses,
  DrainNodeData,
  DrainNodeErrors,
  DrainNodeResponses,
  EdgeGroupCreateData,
  EdgeGroupCreateErrors,
  EdgeGroupCreateResponses,
  EdgeGroupDeleteData,
  EdgeGroupDeleteErrors,
  EdgeGroupDeleteResponses,
  EdgeGroupInspectData,
  EdgeGroupInspectErrors,
  EdgeGroupInspectResponses,
  EdgeGroupListData,
  EdgeGroupListErrors,
  EdgeGroupListResponses,
  EdgeGroupUpdateData,
  EdgeGroupUpdateErrors,
  EdgeGroupUpdateResponses,
  EdgeJobCreateFileData,
  EdgeJobCreateFileErrors,
  EdgeJobCreateFileResponses,
  EdgeJobCreateStringData,
  EdgeJobCreateStringErrors,
  EdgeJobCreateStringResponses,
  EdgeJobDeleteData,
  EdgeJobDeleteErrors,
  EdgeJobDeleteResponses,
  EdgeJobFileData,
  EdgeJobFileErrors,
  EdgeJobFileResponses,
  EdgeJobInspectData,
  EdgeJobInspectErrors,
  EdgeJobInspectResponses,
  EdgeJobListData,
  EdgeJobListErrors,
  EdgeJobListResponses,
  EdgeJobTaskLogsInspectData,
  EdgeJobTaskLogsInspectErrors,
  EdgeJobTaskLogsInspectResponses,
  EdgeJobTasksClearData,
  EdgeJobTasksClearErrors,
  EdgeJobTasksClearResponses,
  EdgeJobTasksCollectData,
  EdgeJobTasksCollectErrors,
  EdgeJobTasksCollectResponses,
  EdgeJobTasksListData,
  EdgeJobTasksListErrors,
  EdgeJobTasksListResponses,
  EdgeJobUpdateData,
  EdgeJobUpdateErrors,
  EdgeJobUpdateResponses,
  EdgeStackCreateFileData,
  EdgeStackCreateFileErrors,
  EdgeStackCreateFileResponses,
  EdgeStackCreateRepositoryData,
  EdgeStackCreateRepositoryErrors,
  EdgeStackCreateRepositoryResponses,
  EdgeStackCreateStringData,
  EdgeStackCreateStringErrors,
  EdgeStackCreateStringResponses,
  EdgeStackDeleteData,
  EdgeStackDeleteErrors,
  EdgeStackDeleteResponses,
  EdgeStackFileData,
  EdgeStackFileErrors,
  EdgeStackFileResponses,
  EdgeStackInspectData,
  EdgeStackInspectErrors,
  EdgeStackInspectResponses,
  EdgeStackListData,
  EdgeStackListErrors,
  EdgeStackListResponses,
  EdgeStackStatusUpdateData,
  EdgeStackStatusUpdateErrors,
  EdgeStackStatusUpdateResponses,
  EdgeStackUpdateData,
  EdgeStackUpdateErrors,
  EdgeStackUpdateResponses,
  EndpointAssociationDeleteData,
  EndpointAssociationDeleteErrors,
  EndpointAssociationDeleteResponses,
  EndpointCreateData,
  EndpointCreateErrors,
  EndpointCreateGlobalKeyData,
  EndpointCreateGlobalKeyErrors,
  EndpointCreateGlobalKeyResponses,
  EndpointCreateResponses,
  EndpointDeleteBatchData,
  EndpointDeleteBatchErrors,
  EndpointDeleteBatchResponses,
  EndpointDeleteData,
  EndpointDeleteErrors,
  EndpointDeleteResponses,
  EndpointDockerhubStatusData,
  EndpointDockerhubStatusErrors,
  EndpointDockerhubStatusResponses,
  EndpointForceUpdateServiceData,
  EndpointForceUpdateServiceErrors,
  EndpointForceUpdateServiceResponses,
  EndpointGroupAddEndpointData,
  EndpointGroupAddEndpointErrors,
  EndpointGroupAddEndpointResponses,
  EndpointGroupDeleteData,
  EndpointGroupDeleteEndpointData,
  EndpointGroupDeleteEndpointErrors,
  EndpointGroupDeleteEndpointResponses,
  EndpointGroupDeleteErrors,
  EndpointGroupDeleteResponses,
  EndpointGroupListData,
  EndpointGroupListErrors,
  EndpointGroupListResponses,
  EndpointGroupUpdateData,
  EndpointGroupUpdateErrors,
  EndpointGroupUpdateResponses,
  EndpointInspectData,
  EndpointInspectErrors,
  EndpointInspectResponses,
  EndpointListData,
  EndpointListErrors,
  EndpointListResponses,
  EndpointRegistriesListData,
  EndpointRegistriesListErrors,
  EndpointRegistriesListResponses,
  EndpointRegistryAccessData,
  EndpointRegistryAccessErrors,
  EndpointRegistryAccessResponses,
  EndpointSettingsUpdateData,
  EndpointSettingsUpdateErrors,
  EndpointSettingsUpdateResponses,
  EndpointSnapshotData,
  EndpointSnapshotErrors,
  EndpointSnapshotResponses,
  EndpointSnapshotsData,
  EndpointSnapshotsErrors,
  EndpointSnapshotsResponses,
  EndpointSummaryCountsData,
  EndpointSummaryCountsErrors,
  EndpointSummaryCountsResponses,
  EndpointUpdateData,
  EndpointUpdateErrors,
  EndpointUpdateRelationsData,
  EndpointUpdateRelationsErrors,
  EndpointUpdateRelationsResponses,
  EndpointUpdateResponses,
  GetAllKubernetesApplicationsCountData,
  GetAllKubernetesApplicationsCountErrors,
  GetAllKubernetesApplicationsCountResponses,
  GetAllKubernetesApplicationsData,
  GetAllKubernetesApplicationsErrors,
  GetAllKubernetesApplicationsResponses,
  GetAllKubernetesClusterIngressesCountData,
  GetAllKubernetesClusterIngressesCountErrors,
  GetAllKubernetesClusterIngressesCountResponses,
  GetAllKubernetesClusterIngressesData,
  GetAllKubernetesClusterIngressesErrors,
  GetAllKubernetesClusterIngressesResponses,
  GetAllKubernetesClusterRoleBindingsData,
  GetAllKubernetesClusterRoleBindingsErrors,
  GetAllKubernetesClusterRoleBindingsResponses,
  GetAllKubernetesClusterRolesData,
  GetAllKubernetesClusterRolesErrors,
  GetAllKubernetesClusterRolesResponses,
  GetAllKubernetesConfigMapsCountData,
  GetAllKubernetesConfigMapsCountErrors,
  GetAllKubernetesConfigMapsCountResponses,
  GetAllKubernetesConfigMapsData,
  GetAllKubernetesConfigMapsErrors,
  GetAllKubernetesConfigMapsResponses,
  GetAllKubernetesEventsData,
  GetAllKubernetesEventsErrors,
  GetAllKubernetesEventsResponses,
  GetAllKubernetesIngressControllersData,
  GetAllKubernetesIngressControllersErrors,
  GetAllKubernetesIngressControllersResponses,
  GetAllKubernetesIngressesData,
  GetAllKubernetesIngressesErrors,
  GetAllKubernetesIngressesResponses,
  GetAllKubernetesPersistentVolumeClaimsData,
  GetAllKubernetesPersistentVolumeClaimsErrors,
  GetAllKubernetesPersistentVolumeClaimsResponses,
  GetAllKubernetesPersistentVolumesData,
  GetAllKubernetesPersistentVolumesErrors,
  GetAllKubernetesPersistentVolumesResponses,
  GetAllKubernetesServicesCountData,
  GetAllKubernetesServicesCountErrors,
  GetAllKubernetesServicesCountResponses,
  GetAllKubernetesStorageClassesData,
  GetAllKubernetesStorageClassesErrors,
  GetAllKubernetesStorageClassesResponses,
  GetAllKubernetesVolumesCountData,
  GetAllKubernetesVolumesCountErrors,
  GetAllKubernetesVolumesCountResponses,
  GetAllKubernetesVolumesData,
  GetAllKubernetesVolumesErrors,
  GetAllKubernetesVolumesResponses,
  GetApplicationsResourcesData,
  GetApplicationsResourcesErrors,
  GetApplicationsResourcesResponses,
  GetEndpointGroupsByIdData,
  GetEndpointGroupsByIdErrors,
  GetEndpointGroupsByIdResponses,
  GetKubernetesConfigData,
  GetKubernetesConfigErrors,
  GetKubernetesConfigMapData,
  GetKubernetesConfigMapErrors,
  GetKubernetesConfigMapResponses,
  GetKubernetesConfigResponses,
  GetKubernetesCronJobsData,
  GetKubernetesCronJobsErrors,
  GetKubernetesCronJobsResponses,
  GetKubernetesDashboardData,
  GetKubernetesDashboardErrors,
  GetKubernetesDashboardResponses,
  GetKubernetesEventsForNamespaceData,
  GetKubernetesEventsForNamespaceErrors,
  GetKubernetesEventsForNamespaceResponses,
  GetKubernetesIngressControllersByNamespaceData,
  GetKubernetesIngressControllersByNamespaceErrors,
  GetKubernetesIngressControllersByNamespaceResponses,
  GetKubernetesIngressData,
  GetKubernetesIngressErrors,
  GetKubernetesIngressResponses,
  GetKubernetesJobsData,
  GetKubernetesJobsErrors,
  GetKubernetesJobsResponses,
  GetKubernetesMaxResourceLimitsData,
  GetKubernetesMaxResourceLimitsErrors,
  GetKubernetesMaxResourceLimitsResponses,
  GetKubernetesMetricsForAllNodesData,
  GetKubernetesMetricsForAllNodesErrors,
  GetKubernetesMetricsForAllNodesResponses,
  GetKubernetesMetricsForAllPodsData,
  GetKubernetesMetricsForAllPodsErrors,
  GetKubernetesMetricsForAllPodsResponses,
  GetKubernetesMetricsForNodeData,
  GetKubernetesMetricsForNodeErrors,
  GetKubernetesMetricsForNodeResponses,
  GetKubernetesMetricsForPodData,
  GetKubernetesMetricsForPodErrors,
  GetKubernetesMetricsForPodResponses,
  GetKubernetesNamespaceData,
  GetKubernetesNamespaceErrors,
  GetKubernetesNamespaceResponses,
  GetKubernetesNamespacesCountData,
  GetKubernetesNamespacesCountErrors,
  GetKubernetesNamespacesCountResponses,
  GetKubernetesNamespacesData,
  GetKubernetesNamespacesErrors,
  GetKubernetesNamespacesResponses,
  GetKubernetesNodesData,
  GetKubernetesNodesErrors,
  GetKubernetesNodesLimitsData,
  GetKubernetesNodesLimitsErrors,
  GetKubernetesNodesLimitsResponses,
  GetKubernetesNodesResponses,
  GetKubernetesPersistentVolumeClaimData,
  GetKubernetesPersistentVolumeClaimErrors,
  GetKubernetesPersistentVolumeClaimResponses,
  GetKubernetesPersistentVolumeClaimsInNamespaceData,
  GetKubernetesPersistentVolumeClaimsInNamespaceErrors,
  GetKubernetesPersistentVolumeClaimsInNamespaceResponses,
  GetKubernetesPersistentVolumeData,
  GetKubernetesPersistentVolumeErrors,
  GetKubernetesPersistentVolumeResponses,
  GetKubernetesRbacStatusData,
  GetKubernetesRbacStatusErrors,
  GetKubernetesRbacStatusResponses,
  GetKubernetesRoleBindingsData,
  GetKubernetesRoleBindingsErrors,
  GetKubernetesRoleBindingsResponses,
  GetKubernetesRolesData,
  GetKubernetesRolesErrors,
  GetKubernetesRolesResponses,
  GetKubernetesSecretData,
  GetKubernetesSecretErrors,
  GetKubernetesSecretResponses,
  GetKubernetesSecretsCountData,
  GetKubernetesSecretsCountErrors,
  GetKubernetesSecretsCountResponses,
  GetKubernetesSecretsData,
  GetKubernetesSecretsErrors,
  GetKubernetesSecretsResponses,
  GetKubernetesServiceAccountData,
  GetKubernetesServiceAccountErrors,
  GetKubernetesServiceAccountResponses,
  GetKubernetesServiceAccountsData,
  GetKubernetesServiceAccountsErrors,
  GetKubernetesServiceAccountsResponses,
  GetKubernetesServicesByNamespaceData,
  GetKubernetesServicesByNamespaceErrors,
  GetKubernetesServicesByNamespaceResponses,
  GetKubernetesServicesData,
  GetKubernetesServicesErrors,
  GetKubernetesServicesResponses,
  GetKubernetesStorageClassData,
  GetKubernetesStorageClassErrors,
  GetKubernetesStorageClassResponses,
  GetKubernetesVersionData,
  GetKubernetesVersionErrors,
  GetKubernetesVersionResponses,
  GetKubernetesVolumeData,
  GetKubernetesVolumeErrors,
  GetKubernetesVolumeResponses,
  GetKubernetesVolumesInNamespaceData,
  GetKubernetesVolumesInNamespaceErrors,
  GetKubernetesVolumesInNamespaceResponses,
  GetWebhooksData,
  GetWebhooksErrors,
  GetWebhooksResponses,
  GetWebsocketAttachData,
  GetWebsocketAttachErrors,
  GetWebsocketAttachResponses,
  GetWebsocketExecData,
  GetWebsocketExecErrors,
  GetWebsocketExecResponses,
  GetWebsocketKubernetesShellData,
  GetWebsocketKubernetesShellErrors,
  GetWebsocketKubernetesShellResponses,
  GetWebsocketPodData,
  GetWebsocketPodErrors,
  GetWebsocketPodResponses,
  GitOperationRepoFilePreviewData,
  GitOperationRepoFilePreviewErrors,
  GitOperationRepoFilePreviewResponses,
  GitOpsSourceGetData,
  GitOpsSourceGetErrors,
  GitOpsSourceGetResponses,
  GitOpsSourcesCreateGitData,
  GitOpsSourcesCreateGitErrors,
  GitOpsSourcesCreateGitResponses,
  GitOpsSourcesDeleteData,
  GitOpsSourcesDeleteErrors,
  GitOpsSourcesDeleteResponses,
  GitOpsSourcesListData,
  GitOpsSourcesListErrors,
  GitOpsSourcesListResponses,
  GitOpsSourcesSummaryData,
  GitOpsSourcesSummaryErrors,
  GitOpsSourcesSummaryResponses,
  GitOpsSourcesTestByIdData,
  GitOpsSourcesTestByIdErrors,
  GitOpsSourcesTestByIdResponses,
  GitOpsSourcesTestData,
  GitOpsSourcesTestErrors,
  GitOpsSourcesTestResponses,
  GitOpsSourcesUpdateGitData,
  GitOpsSourcesUpdateGitErrors,
  GitOpsSourcesUpdateGitResponses,
  GitOpsWorkflowsListData,
  GitOpsWorkflowsListErrors,
  GitOpsWorkflowsListResponses,
  GitOpsWorkflowsSummaryData,
  GitOpsWorkflowsSummaryErrors,
  GitOpsWorkflowsSummaryResponses,
  HelmDeleteData,
  HelmDeleteErrors,
  HelmDeleteResponses,
  HelmGetData,
  HelmGetErrors,
  HelmGetHistoryData,
  HelmGetHistoryErrors,
  HelmGetHistoryResponses,
  HelmGetResponses,
  HelmInstallData,
  HelmInstallErrors,
  HelmInstallResponses,
  HelmListData,
  HelmListErrors,
  HelmListResponses,
  HelmRepoSearchData,
  HelmRepoSearchErrors,
  HelmRepoSearchResponses,
  HelmRollbackData,
  HelmRollbackErrors,
  HelmRollbackResponses,
  HelmShowData,
  HelmShowErrors,
  HelmShowResponses,
  HelmUserRepositoriesListData,
  HelmUserRepositoriesListErrors,
  HelmUserRepositoriesListResponses,
  HelmUserRepositoryCreateData,
  HelmUserRepositoryCreateErrors,
  HelmUserRepositoryCreateResponses,
  HelmUserRepositoryDeleteData,
  HelmUserRepositoryDeleteErrors,
  HelmUserRepositoryDeleteResponses,
  KubernetesNamespacesToggleSystemData,
  KubernetesNamespacesToggleSystemErrors,
  KubernetesNamespacesToggleSystemResponses,
  LdapCheckData,
  LdapCheckErrors,
  LdapCheckResponses,
  LogoutData,
  LogoutErrors,
  LogoutResponses,
  MotdData,
  MotdResponses,
  PostEndpointGroupsData,
  PostEndpointGroupsErrors,
  PostEndpointGroupsResponses,
  PostEndpointsByIdDockerV2BrowsePutData,
  PostEndpointsByIdDockerV2BrowsePutErrors,
  PostEndpointsByIdDockerV2BrowsePutResponses,
  PostWebhooksByIdData,
  PostWebhooksByIdErrors,
  PostWebhooksByIdResponses,
  PostWebhooksData,
  PostWebhooksErrors,
  PostWebhooksResponses,
  PutWebhooksByIdData,
  PutWebhooksByIdErrors,
  PutWebhooksByIdResponses,
  RegistryConfigureData,
  RegistryConfigureErrors,
  RegistryConfigureResponses,
  RegistryCreateData,
  RegistryCreateErrors,
  RegistryCreateResponses,
  RegistryDeleteData,
  RegistryDeleteErrors,
  RegistryDeleteResponses,
  RegistryInspectData,
  RegistryInspectErrors,
  RegistryInspectResponses,
  RegistryListData,
  RegistryListErrors,
  RegistryListResponses,
  RegistryPingData,
  RegistryPingErrors,
  RegistryPingResponses,
  RegistryUpdateData,
  RegistryUpdateErrors,
  RegistryUpdateResponses,
  ResizeKubernetesPersistentVolumeClaimData,
  ResizeKubernetesPersistentVolumeClaimErrors,
  ResizeKubernetesPersistentVolumeClaimResponses,
  ResourceControlCreateData,
  ResourceControlCreateErrors,
  ResourceControlCreateResponses,
  ResourceControlDeleteData,
  ResourceControlDeleteErrors,
  ResourceControlDeleteResponses,
  ResourceControlUpdateData,
  ResourceControlUpdateErrors,
  ResourceControlUpdateResponses,
  RestartKubernetesPodData,
  RestartKubernetesPodErrors,
  RestartKubernetesPodResponses,
  RestoreData,
  RestoreErrors,
  RestoreResponses,
  RoleListData,
  RoleListErrors,
  RoleListResponses,
  SetDefaultKubernetesStorageClassData,
  SetDefaultKubernetesStorageClassErrors,
  SetDefaultKubernetesStorageClassResponses,
  SettingsInspectData,
  SettingsInspectErrors,
  SettingsInspectResponses,
  SettingsPublicData,
  SettingsPublicErrors,
  SettingsPublicResponses,
  SettingsUpdateData,
  SettingsUpdateErrors,
  SettingsUpdateResponses,
  SslInspectData,
  SslInspectErrors,
  SslInspectResponses,
  SslUpdateData,
  SslUpdateErrors,
  SslUpdateResponses,
  StackAssociateData,
  StackAssociateErrors,
  StackAssociateResponses,
  StackCreateDockerStandaloneFileData,
  StackCreateDockerStandaloneFileErrors,
  StackCreateDockerStandaloneFileResponses,
  StackCreateDockerStandaloneRepositoryData,
  StackCreateDockerStandaloneRepositoryErrors,
  StackCreateDockerStandaloneRepositoryResponses,
  StackCreateDockerStandaloneStringData,
  StackCreateDockerStandaloneStringErrors,
  StackCreateDockerStandaloneStringResponses,
  StackCreateDockerSwarmFileData,
  StackCreateDockerSwarmFileErrors,
  StackCreateDockerSwarmFileResponses,
  StackCreateDockerSwarmRepositoryData,
  StackCreateDockerSwarmRepositoryErrors,
  StackCreateDockerSwarmRepositoryResponses,
  StackCreateDockerSwarmStringData,
  StackCreateDockerSwarmStringErrors,
  StackCreateDockerSwarmStringResponses,
  StackCreateKubernetesFileData,
  StackCreateKubernetesFileErrors,
  StackCreateKubernetesFileResponses,
  StackCreateKubernetesGitData,
  StackCreateKubernetesGitErrors,
  StackCreateKubernetesGitResponses,
  StackCreateKubernetesUrlData,
  StackCreateKubernetesUrlErrors,
  StackCreateKubernetesUrlResponses,
  StackDeleteData,
  StackDeleteErrors,
  StackDeleteKubernetesByNameData,
  StackDeleteKubernetesByNameErrors,
  StackDeleteKubernetesByNameResponses,
  StackDeleteResponses,
  StackFileInspectData,
  StackFileInspectErrors,
  StackFileInspectResponses,
  StackGitRedeployData,
  StackGitRedeployErrors,
  StackGitRedeployResponses,
  StackInspectData,
  StackInspectErrors,
  StackInspectResponses,
  StackListData,
  StackListErrors,
  StackListResponses,
  StackMigrateData,
  StackMigrateErrors,
  StackMigrateResponses,
  StackStartData,
  StackStartErrors,
  StackStartResponses,
  StackStopData,
  StackStopErrors,
  StackStopResponses,
  StackUpdateData,
  StackUpdateErrors,
  StackUpdateGitData,
  StackUpdateGitErrors,
  StackUpdateGitResponses,
  StackUpdateResponses,
  SystemInfoData,
  SystemInfoErrors,
  SystemInfoResponses,
  SystemNodesCountData,
  SystemNodesCountErrors,
  SystemNodesCountResponses,
  SystemStatusData,
  SystemStatusResponses,
  SystemUpgradeData,
  SystemUpgradeResponses,
  SystemVersionData,
  SystemVersionResponses,
  TagCreateData,
  TagCreateErrors,
  TagCreateResponses,
  TagDeleteData,
  TagDeleteErrors,
  TagDeleteResponses,
  TagListData,
  TagListErrors,
  TagListResponses,
  TeamCreateData,
  TeamCreateErrors,
  TeamCreateResponses,
  TeamDeleteData,
  TeamDeleteErrors,
  TeamDeleteResponses,
  TeamInspectData,
  TeamInspectErrors,
  TeamInspectResponses,
  TeamListData,
  TeamListErrors,
  TeamListResponses,
  TeamMembershipCreateData,
  TeamMembershipCreateErrors,
  TeamMembershipCreateResponses,
  TeamMembershipDeleteData,
  TeamMembershipDeleteErrors,
  TeamMembershipDeleteResponses,
  TeamMembershipListData,
  TeamMembershipListErrors,
  TeamMembershipListResponses,
  TeamMembershipsData,
  TeamMembershipsErrors,
  TeamMembershipsResponses,
  TeamMembershipUpdateData,
  TeamMembershipUpdateErrors,
  TeamMembershipUpdateResponses,
  TeamUpdateData,
  TeamUpdateErrors,
  TeamUpdateResponses,
  TemplateFileData,
  TemplateFileErrors,
  TemplateFileResponses,
  TemplateListData,
  TemplateListErrors,
  TemplateListResponses,
  UpdateKubernetesIngressControllersByNamespaceData,
  UpdateKubernetesIngressControllersByNamespaceErrors,
  UpdateKubernetesIngressControllersByNamespaceResponses,
  UpdateKubernetesIngressControllersData,
  UpdateKubernetesIngressControllersErrors,
  UpdateKubernetesIngressControllersResponses,
  UpdateKubernetesIngressData,
  UpdateKubernetesIngressErrors,
  UpdateKubernetesIngressResponses,
  UpdateKubernetesNamespaceData,
  UpdateKubernetesNamespaceDeprecatedData,
  UpdateKubernetesNamespaceDeprecatedErrors,
  UpdateKubernetesNamespaceDeprecatedResponses,
  UpdateKubernetesNamespaceErrors,
  UpdateKubernetesNamespaceResponses,
  UpdateKubernetesPersistentVolumeReclaimPolicyData,
  UpdateKubernetesPersistentVolumeReclaimPolicyErrors,
  UpdateKubernetesPersistentVolumeReclaimPolicyResponses,
  UpdateKubernetesServiceAccountImagePullSecretsData,
  UpdateKubernetesServiceAccountImagePullSecretsErrors,
  UpdateKubernetesServiceAccountImagePullSecretsResponses,
  UpdateKubernetesServiceData,
  UpdateKubernetesServiceErrors,
  UpdateKubernetesServiceResponses,
  UploadTlsData,
  UploadTlsErrors,
  UploadTlsResponses,
  UserAdminCheckData,
  UserAdminCheckErrors,
  UserAdminCheckResponses,
  UserAdminInitData,
  UserAdminInitErrors,
  UserAdminInitResponses,
  UserCreateData,
  UserCreateErrors,
  UserCreateResponses,
  UserDeleteData,
  UserDeleteErrors,
  UserDeleteResponses,
  UserEffectiveAccessInspectData,
  UserEffectiveAccessInspectErrors,
  UserEffectiveAccessInspectResponses,
  UserGenerateApiKeyData,
  UserGenerateApiKeyErrors,
  UserGenerateApiKeyResponses,
  UserGetApiKeysData,
  UserGetApiKeysErrors,
  UserGetApiKeysResponses,
  UserInspectData,
  UserInspectErrors,
  UserInspectResponses,
  UserListData,
  UserListErrors,
  UserListResponses,
  UserMembershipsInspectData,
  UserMembershipsInspectErrors,
  UserMembershipsInspectResponses,
  UserRemoveApiKeyData,
  UserRemoveApiKeyErrors,
  UserRemoveApiKeyResponses,
  UserUpdateData,
  UserUpdateErrors,
  UserUpdatePasswordData,
  UserUpdatePasswordErrors,
  UserUpdatePasswordResponses,
  UserUpdateResponses,
  ValidateOAuthData,
  ValidateOAuthErrors,
  ValidateOAuthResponses,
  WebhookInvokeData,
  WebhookInvokeErrors,
  WebhookInvokeResponses,
} from './types.gen';

export type Options<
  TData extends TDataShape = TDataShape,
  ThrowOnError extends boolean = boolean,
  TResponse = unknown,
> = Options2<TData, ThrowOnError, TResponse> & {
  /**
   * You can provide a client instance returned by `createClient()` instead of
   * individual options. This might be also useful if you want to implement a
   * custom client.
   */
  client?: Client;
  /**
   * You can pass arbitrary values through the `meta` object. This can be
   * used to access values that aren't defined as part of the SDK function.
   */
  meta?: Record<string, unknown>;
};

/**
 * Authenticate
 *
 * **Access policy**: public
 * Use this environment(endpoint) to authenticate against Portainer using a username and password.
 */
export const authenticateUser = <ThrowOnError extends boolean = true>(
  options: Options<AuthenticateUserData, ThrowOnError>
) =>
  (options.client ?? client).post<
    AuthenticateUserResponses,
    AuthenticateUserErrors,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/auth',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Logout
 *
 * **Access policy**: public
 */
export const logout = <ThrowOnError extends boolean = true>(
  options?: Options<LogoutData, ThrowOnError>
) =>
  (options?.client ?? client).post<LogoutResponses, LogoutErrors, ThrowOnError>(
    {
      security: [
        { name: 'X-API-KEY', type: 'apiKey' },
        { name: 'Authorization', type: 'apiKey' },
      ],
      url: '/auth/logout',
      ...options,
    }
  );

/**
 * Authenticate with OAuth
 *
 * **Access policy**: public
 */
export const validateOAuth = <ThrowOnError extends boolean = true>(
  options: Options<ValidateOAuthData, ThrowOnError>
) =>
  (options.client ?? client).post<
    ValidateOAuthResponses,
    ValidateOAuthErrors,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/auth/oauth/validate',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Creates an archive with a system data snapshot that could be used to restore the system.
 *
 * Creates an archive with a system data snapshot that could be used to restore the system.
 * **Access policy**: admin
 */
export const backup = <ThrowOnError extends boolean = true>(
  options?: Options<BackupData, ThrowOnError>
) =>
  (options?.client ?? client).post<BackupResponses, BackupErrors, ThrowOnError>(
    {
      security: [
        { name: 'X-API-KEY', type: 'apiKey' },
        { name: 'Authorization', type: 'apiKey' },
      ],
      url: '/backup',
      ...options,
      headers: {
        'Content-Type': 'application/json',
        ...options?.headers,
      },
    }
  );

/**
 * List available custom templates
 *
 * List available custom templates.
 * **Access policy**: authenticated
 */
export const customTemplateList = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    CustomTemplateListResponses,
    CustomTemplateListErrors,
    ThrowOnError
  >({
    querySerializer: { parameters: { type: { array: { explode: false } } } },
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates',
    ...options,
  });

/**
 * Remove a template
 *
 * Remove a template.
 * **Access policy**: authenticated
 */
export const customTemplateDelete = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    CustomTemplateDeleteResponses,
    CustomTemplateDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/{id}',
    ...options,
  });

/**
 * Inspect a custom template
 *
 * Retrieve details about a template.
 * **Access policy**: authenticated
 */
export const customTemplateInspect = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    CustomTemplateInspectResponses,
    CustomTemplateInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/{id}',
    ...options,
  });

/**
 * Update a template
 *
 * Update a template.
 * **Access policy**: authenticated
 */
export const customTemplateUpdate = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    CustomTemplateUpdateResponses,
    CustomTemplateUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get Template stack file content.
 *
 * Retrieve the content of the Stack file for the specified custom template
 * **Access policy**: authenticated
 */
export const customTemplateFile = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateFileData, ThrowOnError>
) =>
  (options.client ?? client).get<
    CustomTemplateFileResponses,
    CustomTemplateFileErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/{id}/file',
    ...options,
  });

/**
 * Fetch the latest config file content based on custom template's git repository configuration
 *
 * Retrieve details about a template created from git repository method.
 * **Access policy**: authenticated
 */
export const customTemplateGitFetch = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateGitFetchData, ThrowOnError>
) =>
  (options.client ?? client).put<
    CustomTemplateGitFetchResponses,
    CustomTemplateGitFetchErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/{id}/git_fetch',
    ...options,
  });

/**
 * Create a custom template
 *
 * Create a custom template.
 * **Access policy**: authenticated
 */
export const customTemplateCreateFile = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateCreateFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CustomTemplateCreateFileResponses,
    CustomTemplateCreateFileErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/create/file',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Create a custom template
 *
 * Create a custom template.
 * **Access policy**: authenticated
 */
export const customTemplateCreateRepository = <
  ThrowOnError extends boolean = true,
>(
  options: Options<CustomTemplateCreateRepositoryData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CustomTemplateCreateRepositoryResponses,
    CustomTemplateCreateRepositoryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/create/repository',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create a custom template
 *
 * Create a custom template.
 * **Access policy**: authenticated
 */
export const customTemplateCreateString = <ThrowOnError extends boolean = true>(
  options: Options<CustomTemplateCreateStringData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CustomTemplateCreateStringResponses,
    CustomTemplateCreateStringErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/custom_templates/create/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Fetch container gpus data
 *
 * **Access policy**:
 */
export const dockerContainerGpusInspect = <ThrowOnError extends boolean = true>(
  options: Options<DockerContainerGpusInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    DockerContainerGpusInspectResponses,
    DockerContainerGpusInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [{ name: 'Authorization', type: 'apiKey' }],
    url: '/docker/{environmentId}/containers/{containerId}/gpus',
    ...options,
  });

/**
 * Get counters for the dashboard
 *
 * **Access policy**: restricted
 */
export const dockerDashboard = <ThrowOnError extends boolean = true>(
  options: Options<DockerDashboardData, ThrowOnError>
) =>
  (options.client ?? client).get<
    DockerDashboardResponses,
    DockerDashboardErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [{ name: 'Authorization', type: 'apiKey' }],
    url: '/docker/{environmentId}/dashboard',
    ...options,
  });

/**
 * Fetch images
 *
 * **Access policy**:
 */
export const dockerImagesList = <ThrowOnError extends boolean = true>(
  options: Options<DockerImagesListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    DockerImagesListResponses,
    DockerImagesListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [{ name: 'Authorization', type: 'apiKey' }],
    url: '/docker/{environmentId}/images',
    ...options,
  });

/**
 * list EdgeGroups
 *
 * **Access policy**: administrator
 */
export const edgeGroupList = <ThrowOnError extends boolean = true>(
  options?: Options<EdgeGroupListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EdgeGroupListResponses,
    EdgeGroupListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_groups',
    ...options,
  });

/**
 * Create an EdgeGroup
 *
 * **Access policy**: administrator
 */
export const edgeGroupCreate = <ThrowOnError extends boolean = true>(
  options: Options<EdgeGroupCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeGroupCreateResponses,
    EdgeGroupCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_groups',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deletes an EdgeGroup
 *
 * **Access policy**: administrator
 */
export const edgeGroupDelete = <ThrowOnError extends boolean = true>(
  options: Options<EdgeGroupDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EdgeGroupDeleteResponses,
    EdgeGroupDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_groups/{id}',
    ...options,
  });

/**
 * Inspects an EdgeGroup
 *
 * **Access policy**: administrator
 */
export const edgeGroupInspect = <ThrowOnError extends boolean = true>(
  options: Options<EdgeGroupInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeGroupInspectResponses,
    EdgeGroupInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_groups/{id}',
    ...options,
  });

/**
 * Updates an EdgeGroup
 *
 * **Access policy**: administrator
 */
export const edgeGroupUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EdgeGroupUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EdgeGroupUpdateResponses,
    EdgeGroupUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_groups/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Fetch EdgeJobs list
 *
 * **Access policy**: administrator
 */
export const edgeJobList = <ThrowOnError extends boolean = true>(
  options?: Options<EdgeJobListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EdgeJobListResponses,
    EdgeJobListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs',
    ...options,
  });

/**
 * Delete an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobDelete = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EdgeJobDeleteResponses,
    EdgeJobDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}',
    ...options,
  });

/**
 * Inspect an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobInspect = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeJobInspectResponses,
    EdgeJobInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}',
    ...options,
  });

/**
 * Update an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EdgeJobUpdateResponses,
    EdgeJobUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Fetch a file of an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobFile = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobFileData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeJobFileResponses,
    EdgeJobFileErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}/file',
    ...options,
  });

/**
 * Fetch the list of tasks on an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobTasksList = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobTasksListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeJobTasksListResponses,
    EdgeJobTasksListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}/tasks',
    ...options,
  });

/**
 * Clear the log for a specifc task on an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobTasksClear = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobTasksClearData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EdgeJobTasksClearResponses,
    EdgeJobTasksClearErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}/tasks/{taskID}/logs',
    ...options,
  });

/**
 * Fetch the log for a specifc task on an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobTaskLogsInspect = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobTaskLogsInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeJobTaskLogsInspectResponses,
    EdgeJobTaskLogsInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}/tasks/{taskID}/logs',
    ...options,
  });

/**
 * Collect the log for a specifc task on an EdgeJob
 *
 * **Access policy**: administrator
 */
export const edgeJobTasksCollect = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobTasksCollectData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeJobTasksCollectResponses,
    EdgeJobTasksCollectErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/{id}/tasks/{taskID}/logs',
    ...options,
  });

/**
 * Create an EdgeJob from a file
 *
 * **Access policy**: administrator
 */
export const edgeJobCreateFile = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobCreateFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeJobCreateFileResponses,
    EdgeJobCreateFileErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/create/file',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Create an EdgeJob from a text
 *
 * **Access policy**: administrator
 */
export const edgeJobCreateString = <ThrowOnError extends boolean = true>(
  options: Options<EdgeJobCreateStringData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeJobCreateStringResponses,
    EdgeJobCreateStringErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_jobs/create/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Fetches the list of EdgeStacks
 *
 * **Access policy**: administrator
 */
export const edgeStackList = <ThrowOnError extends boolean = true>(
  options?: Options<EdgeStackListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EdgeStackListResponses,
    EdgeStackListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks',
    ...options,
  });

/**
 * Delete an EdgeStack
 *
 * **Access policy**: administrator
 */
export const edgeStackDelete = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EdgeStackDeleteResponses,
    EdgeStackDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/{id}',
    ...options,
  });

/**
 * Inspect an EdgeStack
 *
 * **Access policy**: administrator
 */
export const edgeStackInspect = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeStackInspectResponses,
    EdgeStackInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/{id}',
    ...options,
  });

/**
 * Update an EdgeStack
 *
 * **Access policy**: administrator
 */
export const edgeStackUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EdgeStackUpdateResponses,
    EdgeStackUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Fetches the stack file for an EdgeStack
 *
 * **Access policy**: administrator
 */
export const edgeStackFile = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackFileData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EdgeStackFileResponses,
    EdgeStackFileErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/{id}/file',
    ...options,
  });

/**
 * Update an EdgeStack status
 *
 * Authorized only if the request is done by an Edge Environment(Endpoint)
 */
export const edgeStackStatusUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackStatusUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EdgeStackStatusUpdateResponses,
    EdgeStackStatusUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/edge_stacks/{id}/status',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create an EdgeStack from file
 *
 * **Access policy**: administrator
 */
export const edgeStackCreateFile = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackCreateFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeStackCreateFileResponses,
    EdgeStackCreateFileErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/create/file',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Create an EdgeStack from a git repository
 *
 * **Access policy**: administrator
 */
export const edgeStackCreateRepository = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackCreateRepositoryData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeStackCreateRepositoryResponses,
    EdgeStackCreateRepositoryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/create/repository',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create an EdgeStack from a text
 *
 * **Access policy**: administrator
 */
export const edgeStackCreateString = <ThrowOnError extends boolean = true>(
  options: Options<EdgeStackCreateStringData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EdgeStackCreateStringResponses,
    EdgeStackCreateStringErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/edge_stacks/create/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List Environment(Endpoint) groups
 *
 * List all environment(endpoint) groups based on the current user authorizations. Will
 * return all environment(endpoint) groups if using an administrator account otherwise it will
 * only return authorized environment(endpoint) groups.
 * **Access policy**: restricted
 */
export const endpointGroupList = <ThrowOnError extends boolean = true>(
  options?: Options<EndpointGroupListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EndpointGroupListResponses,
    EndpointGroupListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups',
    ...options,
  });

/**
 * Create an Environment(Endpoint) Group
 *
 * Create a new environment(endpoint) group.
 * **Access policy**: administrator
 */
export const postEndpointGroups = <ThrowOnError extends boolean = true>(
  options: Options<PostEndpointGroupsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    PostEndpointGroupsResponses,
    PostEndpointGroupsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove an environment(endpoint) group
 *
 * Remove an environment(endpoint) group.
 * **Access policy**: administrator
 */
export const endpointGroupDelete = <ThrowOnError extends boolean = true>(
  options: Options<EndpointGroupDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EndpointGroupDeleteResponses,
    EndpointGroupDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups/{id}',
    ...options,
  });

/**
 * Inspect an Environment(Endpoint) group
 *
 * Retrieve details abont an environment(endpoint) group.
 * **Access policy**: administrator
 */
export const getEndpointGroupsById = <ThrowOnError extends boolean = true>(
  options: Options<GetEndpointGroupsByIdData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetEndpointGroupsByIdResponses,
    GetEndpointGroupsByIdErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups/{id}',
    ...options,
  });

/**
 * Update an environment(endpoint) group
 *
 * Update an environment(endpoint) group.
 * **Access policy**: administrator
 */
export const endpointGroupUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EndpointGroupUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointGroupUpdateResponses,
    EndpointGroupUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Removes environment(endpoint) from an environment(endpoint) group
 *
 * **Access policy**: administrator
 */
export const endpointGroupDeleteEndpoint = <
  ThrowOnError extends boolean = true,
>(
  options: Options<EndpointGroupDeleteEndpointData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EndpointGroupDeleteEndpointResponses,
    EndpointGroupDeleteEndpointErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups/{id}/endpoints/{endpointId}',
    ...options,
  });

/**
 * Add an environment(endpoint) to an environment(endpoint) group
 *
 * Add an environment(endpoint) to an environment(endpoint) group
 * **Access policy**: administrator
 */
export const endpointGroupAddEndpoint = <ThrowOnError extends boolean = true>(
  options: Options<EndpointGroupAddEndpointData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointGroupAddEndpointResponses,
    EndpointGroupAddEndpointErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoint_groups/{id}/endpoints/{endpointId}',
    ...options,
  });

/**
 * List environments(endpoints)
 *
 * List all environments(endpoints) based on the current user authorizations. Will
 * return all environments(endpoints) if using an administrator or team leader account otherwise it will
 * only return authorized environments(endpoints).
 * **Access policy**: restricted
 */
export const endpointList = <ThrowOnError extends boolean = true>(
  options?: Options<EndpointListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EndpointListResponses,
    EndpointListErrors,
    ThrowOnError
  >({
    querySerializer: {
      parameters: {
        groupIds: { array: { explode: false } },
        status: { array: { explode: false } },
        types: { array: { explode: false } },
        platformTypes: { array: { explode: false } },
        excludeGroupIds: { array: { explode: false } },
        tagIds: { array: { explode: false } },
        endpointIds: { array: { explode: false } },
        excludeIds: { array: { explode: false } },
        agentVersions: { array: { explode: false } },
        edgeGroupIds: { array: { explode: false } },
        excludeEdgeGroupIds: { array: { explode: false } },
      },
    },
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints',
    ...options,
  });

/**
 * Create a new environment(endpoint)
 *
 * Create a new environment(endpoint) that will be used to manage an environment(endpoint).
 * **Access policy**: administrator
 */
export const endpointCreate = <ThrowOnError extends boolean = true>(
  options: Options<EndpointCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EndpointCreateResponses,
    EndpointCreateErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Remove an environment
 *
 * Remove the environment associated to the specified identifier and optionally clean-up associated resources.
 * **Access policy**: Administrator only.
 */
export const endpointDelete = <ThrowOnError extends boolean = true>(
  options: Options<EndpointDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    EndpointDeleteResponses,
    EndpointDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}',
    ...options,
  });

/**
 * Inspect an environment(endpoint)
 *
 * Retrieve details about an environment(endpoint).
 * **Access policy**: restricted
 */
export const endpointInspect = <ThrowOnError extends boolean = true>(
  options: Options<EndpointInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EndpointInspectResponses,
    EndpointInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}',
    ...options,
  });

/**
 * Update an environment(endpoint)
 *
 * Update an environment(endpoint).
 * **Access policy**: authenticated
 */
export const endpointUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EndpointUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointUpdateResponses,
    EndpointUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * De-association an edge environment(endpoint)
 *
 * De-association an edge environment(endpoint).
 * **Access policy**: administrator
 */
export const endpointAssociationDelete = <ThrowOnError extends boolean = true>(
  options: Options<EndpointAssociationDeleteData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointAssociationDeleteResponses,
    EndpointAssociationDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/association',
    ...options,
  });

/**
 * Upload a file under a specific path on the file system of an environment (endpoint)
 *
 * Use this environment(endpoint) to upload TLS files.
 * **Access policy**: administrator
 */
export const postEndpointsByIdDockerV2BrowsePut = <
  ThrowOnError extends boolean = true,
>(
  options: Options<PostEndpointsByIdDockerV2BrowsePutData, ThrowOnError>
) =>
  (options.client ?? client).post<
    PostEndpointsByIdDockerV2BrowsePutResponses,
    PostEndpointsByIdDockerV2BrowsePutErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/docker/v2/browse/put',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * fetch docker pull limits
 *
 * get docker pull limits for a docker hub registry in the environment
 * **Access policy**:
 */
export const endpointDockerhubStatus = <ThrowOnError extends boolean = true>(
  options: Options<EndpointDockerhubStatusData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EndpointDockerhubStatusResponses,
    EndpointDockerhubStatusErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/dockerhub/{registryId}',
    ...options,
  });

/**
 * force update a docker service
 *
 * force update a docker service
 * **Access policy**: authenticated
 */
export const endpointForceUpdateService = <ThrowOnError extends boolean = true>(
  options: Options<EndpointForceUpdateServiceData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointForceUpdateServiceResponses,
    EndpointForceUpdateServiceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/forceupdateservice',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List Helm Releases
 *
 * **Access policy**: authenticated
 */
export const helmList = <ThrowOnError extends boolean = true>(
  options: Options<HelmListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    HelmListResponses,
    HelmListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/kubernetes/helm',
    ...options,
  });

/**
 * Install Helm Chart
 *
 * **Access policy**: authenticated
 */
export const helmInstall = <ThrowOnError extends boolean = true>(
  options: Options<HelmInstallData, ThrowOnError>
) =>
  (options.client ?? client).post<
    HelmInstallResponses,
    HelmInstallErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/kubernetes/helm',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Delete Helm Release
 *
 * **Access policy**: authenticated
 */
export const helmDelete = <ThrowOnError extends boolean = true>(
  options: Options<HelmDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    HelmDeleteResponses,
    HelmDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/kubernetes/helm/{release}',
    ...options,
  });

/**
 * Get a helm release
 *
 * Get details of a helm release by release name
 * **Access policy**: authenticated
 */
export const helmGet = <ThrowOnError extends boolean = true>(
  options: Options<HelmGetData, ThrowOnError>
) =>
  (options.client ?? client).get<HelmGetResponses, HelmGetErrors, ThrowOnError>(
    {
      responseType: 'json',
      security: [
        { name: 'X-API-KEY', type: 'apiKey' },
        { name: 'Authorization', type: 'apiKey' },
      ],
      url: '/endpoints/{id}/kubernetes/helm/{release}',
      ...options,
    }
  );

/**
 * Get a historical list of releases
 *
 * Get a historical list of releases by release name
 * **Access policy**: authenticated
 */
export const helmGetHistory = <ThrowOnError extends boolean = true>(
  options: Options<HelmGetHistoryData, ThrowOnError>
) =>
  (options.client ?? client).get<
    HelmGetHistoryResponses,
    HelmGetHistoryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/kubernetes/helm/{release}/history',
    ...options,
  });

/**
 * Rollback a helm release
 *
 * Rollback a helm release to a previous revision
 * **Access policy**: authenticated
 */
export const helmRollback = <ThrowOnError extends boolean = true>(
  options: Options<HelmRollbackData, ThrowOnError>
) =>
  (options.client ?? client).post<
    HelmRollbackResponses,
    HelmRollbackErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/kubernetes/helm/{release}/rollback',
    ...options,
  });

/**
 * List Registries on environment
 *
 * List all registries based on the current user authorizations in current environment.
 * **Access policy**: authenticated
 */
export const endpointRegistriesList = <ThrowOnError extends boolean = true>(
  options: Options<EndpointRegistriesListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    EndpointRegistriesListResponses,
    EndpointRegistriesListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/registries',
    ...options,
  });

/**
 * update registry access for environment
 *
 * **Access policy**: authenticated
 */
export const endpointRegistryAccess = <ThrowOnError extends boolean = true>(
  options: Options<EndpointRegistryAccessData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointRegistryAccessResponses,
    EndpointRegistryAccessErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/registries/{registryId}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Update settings for an environment(endpoint)
 *
 * Update settings for an environment(endpoint).
 * **Access policy**: authenticated
 */
export const endpointSettingsUpdate = <ThrowOnError extends boolean = true>(
  options: Options<EndpointSettingsUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointSettingsUpdateResponses,
    EndpointSettingsUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/settings',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Snapshots an environment(endpoint)
 *
 * Snapshots an environment(endpoint)
 * **Access policy**: administrator
 */
export const endpointSnapshot = <ThrowOnError extends boolean = true>(
  options: Options<EndpointSnapshotData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EndpointSnapshotResponses,
    EndpointSnapshotErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/{id}/snapshot',
    ...options,
  });

/**
 * Remove multiple environments
 *
 * Remove multiple environments and optionally clean-up associated resources.
 * **Access policy**: Administrator only.
 */
export const endpointDeleteBatch = <ThrowOnError extends boolean = true>(
  options: Options<EndpointDeleteBatchData, ThrowOnError>
) =>
  (options.client ?? client).post<
    EndpointDeleteBatchResponses,
    EndpointDeleteBatchErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create or retrieve the endpoint for an EdgeID
 */
export const endpointCreateGlobalKey = <ThrowOnError extends boolean = true>(
  options?: Options<EndpointCreateGlobalKeyData, ThrowOnError>
) =>
  (options?.client ?? client).post<
    EndpointCreateGlobalKeyResponses,
    EndpointCreateGlobalKeyErrors,
    ThrowOnError
  >({ url: '/endpoints/global-key', ...options });

/**
 * Update relations for a list of environments
 *
 * Update relations for a list of environments
 * Edge groups, tags and environment group can be updated.
 *
 * **Access policy**: administrator
 */
export const endpointUpdateRelations = <ThrowOnError extends boolean = true>(
  options: Options<EndpointUpdateRelationsData, ThrowOnError>
) =>
  (options.client ?? client).put<
    EndpointUpdateRelationsResponses,
    EndpointUpdateRelationsErrors,
    ThrowOnError
  >({
    security: [{ name: 'Authorization', type: 'apiKey' }],
    url: '/endpoints/relations',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Snapshot all environments(endpoints)
 *
 * Snapshot all environments(endpoints)
 * **Access policy**: administrator
 */
export const endpointSnapshots = <ThrowOnError extends boolean = true>(
  options?: Options<EndpointSnapshotsData, ThrowOnError>
) =>
  (options?.client ?? client).post<
    EndpointSnapshotsResponses,
    EndpointSnapshotsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/snapshot',
    ...options,
  });

/**
 * Get environment summary counts
 *
 * Returns counts of environments by status (up, down) and ungrouped environments (unassigned), plus breakdowns by group, type, and health.
 * **Access policy**: restricted
 */
export const endpointSummaryCounts = <ThrowOnError extends boolean = true>(
  options?: Options<EndpointSummaryCountsData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    EndpointSummaryCountsResponses,
    EndpointSummaryCountsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/endpoints/summary',
    ...options,
  });

/**
 * preview the content of target file in the git repository
 *
 * Retrieve the compose file content based on git repository configuration
 * **Access policy**: authenticated
 */
export const gitOperationRepoFilePreview = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GitOperationRepoFilePreviewData, ThrowOnError>
) =>
  (options.client ?? client).post<
    GitOperationRepoFilePreviewResponses,
    GitOperationRepoFilePreviewErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/repo/file/preview',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List all GitOps sources
 *
 * Returns a deduplicated list of git repositories used across all GitOps workflows.
 * **Access policy**: authenticated
 */
export const gitOpsSourcesList = <ThrowOnError extends boolean = true>(
  options?: Options<GitOpsSourcesListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GitOpsSourcesListResponses,
    GitOpsSourcesListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources',
    ...options,
  });

/**
 * Delete a source
 *
 * Deletes an existing GitOps source. Returns 409 if the source is referenced by any workflow or custom template.
 * **Access policy**: admin
 */
export const gitOpsSourcesDelete = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourcesDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    GitOpsSourcesDeleteResponses,
    GitOpsSourcesDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/{id}',
    ...options,
  });

/**
 * Get a GitOps source by ID
 *
 * Returns a single GitOps source with its connection settings and linked workflows.
 * **Access policy**: authenticated
 */
export const gitOpsSourceGet = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourceGetData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GitOpsSourceGetResponses,
    GitOpsSourceGetErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/{id}',
    ...options,
  });

/**
 * Update a Git source
 *
 * Updates an existing GitOps source backed by a Git repository.
 * **Access policy**: administrator
 */
export const gitOpsSourcesUpdateGit = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourcesUpdateGitData, ThrowOnError>
) =>
  (options.client ?? client).put<
    GitOpsSourcesUpdateGitResponses,
    GitOpsSourcesUpdateGitErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Test the connection of a stored source
 *
 * Tests connectivity for a GitOps source, applying optional overrides to the stored configuration.
 * **Access policy**: administrator
 */
export const gitOpsSourcesTestById = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourcesTestByIdData, ThrowOnError>
) =>
  (options.client ?? client).post<
    GitOpsSourcesTestByIdResponses,
    GitOpsSourcesTestByIdErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/{id}/test',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create a Git source
 *
 * Creates a new GitOps source backed by a Git repository.
 * **Access policy**: administrator
 */
export const gitOpsSourcesCreateGit = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourcesCreateGitData, ThrowOnError>
) =>
  (options.client ?? client).post<
    GitOpsSourcesCreateGitResponses,
    GitOpsSourcesCreateGitErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/git',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Summarize GitOps source status counts
 *
 * Returns a count of sources per status.
 * **Access policy**: authenticated
 */
export const gitOpsSourcesSummary = <ThrowOnError extends boolean = true>(
  options?: Options<GitOpsSourcesSummaryData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GitOpsSourcesSummaryResponses,
    GitOpsSourcesSummaryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/summary',
    ...options,
  });

/**
 * Test a Git source connection
 *
 * Tests connectivity for Git connection details that have not been persisted yet.
 * **Access policy**: administrator
 */
export const gitOpsSourcesTest = <ThrowOnError extends boolean = true>(
  options: Options<GitOpsSourcesTestData, ThrowOnError>
) =>
  (options.client ?? client).post<
    GitOpsSourcesTestResponses,
    GitOpsSourcesTestErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/sources/test',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List all GitOps workflows
 *
 * Returns a unified list of all stacks that have GitOps (GitConfig) configured.
 * **Access policy**: authenticated
 */
export const gitOpsWorkflowsList = <ThrowOnError extends boolean = true>(
  options?: Options<GitOpsWorkflowsListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GitOpsWorkflowsListResponses,
    GitOpsWorkflowsListErrors,
    ThrowOnError
  >({
    querySerializer: {
      parameters: { endpointIds: { array: { explode: false } } },
    },
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/workflows',
    ...options,
  });

/**
 * Summarize GitOps workflow status counts
 *
 * Returns a count of workflows per status across all environments.
 * **Access policy**: authenticated
 */
export const gitOpsWorkflowsSummary = <ThrowOnError extends boolean = true>(
  options?: Options<GitOpsWorkflowsSummaryData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GitOpsWorkflowsSummaryResponses,
    GitOpsWorkflowsSummaryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/gitops/workflows/summary',
    ...options,
  });

/**
 * Get a list of applications across all namespaces in the cluster. If the nodeName is provided, it will return the applications running on that node.
 *
 * Get a list of applications across all namespaces in the cluster. If the nodeName is provided, it will return the applications running on that node.
 * **Access policy**: authenticated
 */
export const getAllKubernetesApplications = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesApplicationsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesApplicationsResponses,
    GetAllKubernetesApplicationsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/applications',
    ...options,
  });

/**
 * Get Applications count
 *
 * Get the count of Applications across all namespaces in the cluster. If the nodeName is provided, it will return the count of applications running on that node.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesApplicationsCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesApplicationsCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesApplicationsCountResponses,
    GetAllKubernetesApplicationsCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/applications/count',
    ...options,
  });

/**
 * Delete cluster role bindings
 *
 * Delete the provided list of cluster role bindings.
 * **Access policy**: Authenticated user.
 */
export const deleteClusterRoleBindings = <ThrowOnError extends boolean = true>(
  options: Options<DeleteClusterRoleBindingsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteClusterRoleBindingsResponses,
    DeleteClusterRoleBindingsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/cluster_role_bindings/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Delete cluster roles
 *
 * Delete the provided list of cluster roles.
 * **Access policy**: Authenticated user.
 */
export const deleteClusterRoles = <ThrowOnError extends boolean = true>(
  options: Options<DeleteClusterRolesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteClusterRolesResponses,
    DeleteClusterRolesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/cluster_roles/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of kubernetes cluster role bindings
 *
 * Get a list of kubernetes cluster role bindings within the given environment at the cluster level.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesClusterRoleBindings = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesClusterRoleBindingsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesClusterRoleBindingsResponses,
    GetAllKubernetesClusterRoleBindingsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/clusterrolebindings',
    ...options,
  });

/**
 * Get a list of kubernetes cluster roles
 *
 * Get a list of kubernetes cluster roles within the given environment at the cluster level.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesClusterRoles = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesClusterRolesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesClusterRolesResponses,
    GetAllKubernetesClusterRolesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/clusterroles',
    ...options,
  });

/**
 * Get a list of ConfigMaps
 *
 * Get a list of ConfigMaps across all namespaces in the cluster. For non-admin users, it will only return ConfigMaps based on the namespaces that they have access to.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesConfigMaps = <ThrowOnError extends boolean = true>(
  options: Options<GetAllKubernetesConfigMapsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesConfigMapsResponses,
    GetAllKubernetesConfigMapsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/configmaps',
    ...options,
  });

/**
 * Get ConfigMaps count
 *
 * Get the count of ConfigMaps across all namespaces in the cluster. For non-admin users, it will only return the count of ConfigMaps based on the namespaces that they have access to.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesConfigMapsCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesConfigMapsCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesConfigMapsCountResponses,
    GetAllKubernetesConfigMapsCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/configmaps/count',
    ...options,
  });

/**
 * Get a list of kubernetes Cron Jobs
 *
 * Get a list of kubernetes Cron Jobs that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesCronJobs = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesCronJobsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesCronJobsResponses,
    GetKubernetesCronJobsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/cron_jobs',
    ...options,
  });

/**
 * Delete Cron Jobs
 *
 * Delete the provided list of Cron Jobs.
 * **Access policy**: Authenticated user.
 */
export const deleteCronJobs = <ThrowOnError extends boolean = true>(
  options: Options<DeleteCronJobsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteCronJobsResponses,
    DeleteCronJobsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/cron_jobs/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get the dashboard summary data
 *
 * Get the dashboard summary data which is simply a count of a range of different commonly used kubernetes resources.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesDashboard = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesDashboardData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesDashboardResponses,
    GetKubernetesDashboardErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/dashboard',
    ...options,
  });

/**
 * Get a description of a kubernetes resource
 *
 * Get a description of a kubernetes resource.
 * **Access policy**: Authenticated user.
 */
export const describeResource = <ThrowOnError extends boolean = true>(
  options: Options<DescribeResourceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    DescribeResourceResponses,
    DescribeResourceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/describe',
    ...options,
  });

/**
 * Gets kubernetes events
 *
 * Get events by query param resourceId
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesEvents = <ThrowOnError extends boolean = true>(
  options: Options<GetAllKubernetesEventsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesEventsResponses,
    GetAllKubernetesEventsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/events',
    ...options,
  });

/**
 * Get a list of ingress controllers
 *
 * Get a list of ingress controllers for the given environment. If the allowedOnly query parameter is set, only ingress controllers that are allowed by the environment's ingress configuration will be returned.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesIngressControllers = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesIngressControllersData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesIngressControllersResponses,
    GetAllKubernetesIngressControllersErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/ingresscontrollers',
    ...options,
  });

/**
 * Update (block/unblock) ingress controllers
 *
 * Update (block/unblock) ingress controllers for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesIngressControllers = <
  ThrowOnError extends boolean = true,
>(
  options: Options<UpdateKubernetesIngressControllersData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UpdateKubernetesIngressControllersResponses,
    UpdateKubernetesIngressControllersErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/ingresscontrollers',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get kubernetes ingresses at the cluster level
 *
 * Get kubernetes ingresses at the cluster level for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesClusterIngresses = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesClusterIngressesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesClusterIngressesResponses,
    GetAllKubernetesClusterIngressesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/ingresses',
    ...options,
  });

/**
 * Get Ingresses count
 *
 * Get the number of kubernetes ingresses within the given environment.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesClusterIngressesCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesClusterIngressesCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesClusterIngressesCountResponses,
    GetAllKubernetesClusterIngressesCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/ingresses/count',
    ...options,
  });

/**
 * Delete one or more Ingresses
 *
 * Delete one or more Ingresses in the provided environment.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesIngresses = <ThrowOnError extends boolean = true>(
  options: Options<DeleteKubernetesIngressesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteKubernetesIngressesResponses,
    DeleteKubernetesIngressesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/ingresses/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of kubernetes Jobs
 *
 * Get a list of kubernetes Jobs that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesJobs = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesJobsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesJobsResponses,
    GetKubernetesJobsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/jobs',
    ...options,
  });

/**
 * Delete Jobs
 *
 * Delete the provided list of Jobs.
 * **Access policy**: Authenticated user.
 */
export const deleteJobs = <ThrowOnError extends boolean = true>(
  options: Options<DeleteJobsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteJobsResponses,
    DeleteJobsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/jobs/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get max CPU and memory limits of all nodes within k8s cluster
 *
 * Get max CPU and memory limits (unused resources) of all nodes within k8s cluster.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesMaxResourceLimits = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesMaxResourceLimitsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesMaxResourceLimitsResponses,
    GetKubernetesMaxResourceLimitsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/max_resource_limits',
    ...options,
  });

/**
 * Get the total resource requests and limits of all applications
 *
 * Get the total CPU (cores) and memory (bytes) requests and limits of all applications across all namespaces.
 * **Access policy**: Authenticated user.
 */
export const getApplicationsResources = <ThrowOnError extends boolean = true>(
  options: Options<GetApplicationsResourcesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetApplicationsResourcesResponses,
    GetApplicationsResourcesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/metrics/applications_resources',
    ...options,
  });

/**
 * Get a list of nodes with their live metrics
 *
 * Get a list of metrics associated with all nodes of a cluster.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesMetricsForAllNodes = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesMetricsForAllNodesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesMetricsForAllNodesResponses,
    GetKubernetesMetricsForAllNodesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/metrics/nodes',
    ...options,
  });

/**
 * Get live metrics for a node
 *
 * Get live metrics for the specified node.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesMetricsForNode = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesMetricsForNodeData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesMetricsForNodeResponses,
    GetKubernetesMetricsForNodeErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/metrics/nodes/{name}',
    ...options,
  });

/**
 * Get a list of pods with their live metrics
 *
 * Get a list of pods with their live metrics for the specified namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesMetricsForAllPods = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesMetricsForAllPodsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesMetricsForAllPodsResponses,
    GetKubernetesMetricsForAllPodsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/metrics/pods/{namespace}',
    ...options,
  });

/**
 * Get live metrics for a pod
 *
 * Get live metrics for the specified pod.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesMetricsForPod = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesMetricsForPodData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesMetricsForPodResponses,
    GetKubernetesMetricsForPodErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/metrics/pods/{namespace}/{name}',
    ...options,
  });

/**
 * Delete a kubernetes namespace
 *
 * Delete a kubernetes namespace within the given environment.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesNamespace = <ThrowOnError extends boolean = true>(
  options: Options<DeleteKubernetesNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    DeleteKubernetesNamespaceResponses,
    DeleteKubernetesNamespaceErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces',
    ...options,
  });

/**
 * Get a list of namespaces
 *
 * Get a list of all namespaces within the given environment based on the user role and permissions. If the user is an admin, they can access all namespaces. If the user is not an admin, they can only access namespaces that they have access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesNamespaces = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesNamespacesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesNamespacesResponses,
    GetKubernetesNamespacesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces',
    ...options,
  });

/**
 * Create a namespace
 *
 * Create a namespace within the given environment.
 * **Access policy**: Authenticated user.
 */
export const createKubernetesNamespace = <ThrowOnError extends boolean = true>(
  options: Options<CreateKubernetesNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CreateKubernetesNamespaceResponses,
    CreateKubernetesNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Update a namespace
 *
 * Update a namespace within the given environment.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesNamespaceDeprecated = <
  ThrowOnError extends boolean = true,
>(
  options: Options<UpdateKubernetesNamespaceDeprecatedData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UpdateKubernetesNamespaceDeprecatedResponses,
    UpdateKubernetesNamespaceDeprecatedErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get namespace details
 *
 * Get namespace details for the provided namespace within the given environment.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesNamespace = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesNamespaceResponses,
    GetKubernetesNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}',
    ...options,
  });

/**
 * Update a namespace
 *
 * Update a namespace within the given environment.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesNamespace = <ThrowOnError extends boolean = true>(
  options: Options<UpdateKubernetesNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UpdateKubernetesNamespaceResponses,
    UpdateKubernetesNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a ConfigMap
 *
 * Get a ConfigMap by name for a given namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesConfigMap = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesConfigMapData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesConfigMapResponses,
    GetKubernetesConfigMapErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/configmaps/{configmap}',
    ...options,
  });

/**
 * Gets kubernetes events for namespace
 *
 * Get events by optional query param resourceId for a given namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesEventsForNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesEventsForNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesEventsForNamespaceResponses,
    GetKubernetesEventsForNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/events',
    ...options,
  });

/**
 * Get a list ingress controllers by namespace
 *
 * Get a list of ingress controllers for the given environment in the provided namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesIngressControllersByNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesIngressControllersByNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesIngressControllersByNamespaceResponses,
    GetKubernetesIngressControllersByNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresscontrollers',
    ...options,
  });

/**
 * Update (block/unblock) ingress controllers by namespace
 *
 * Update (block/unblock) ingress controllers by namespace for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesIngressControllersByNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<
    UpdateKubernetesIngressControllersByNamespaceData,
    ThrowOnError
  >
) =>
  (options.client ?? client).put<
    UpdateKubernetesIngressControllersByNamespaceResponses,
    UpdateKubernetesIngressControllersByNamespaceErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresscontrollers',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of Ingresses
 *
 * Get a list of Ingresses. If namespace is provided, it will return the list of Ingresses in that namespace.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesIngresses = <ThrowOnError extends boolean = true>(
  options: Options<GetAllKubernetesIngressesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesIngressesResponses,
    GetAllKubernetesIngressesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresses',
    ...options,
  });

/**
 * Create an Ingress
 *
 * Create an Ingress for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const createKubernetesIngress = <ThrowOnError extends boolean = true>(
  options: Options<CreateKubernetesIngressData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CreateKubernetesIngressResponses,
    CreateKubernetesIngressErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresses',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Update an Ingress
 *
 * Update an Ingress for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesIngress = <ThrowOnError extends boolean = true>(
  options: Options<UpdateKubernetesIngressData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UpdateKubernetesIngressResponses,
    UpdateKubernetesIngressErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresses',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get an Ingress by name
 *
 * Get an Ingress by name for the provided environment.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesIngress = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesIngressData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesIngressResponses,
    GetKubernetesIngressErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/ingresses/{ingress}',
    ...options,
  });

/**
 * Get PersistentVolumeClaims in a namespace
 *
 * Get a list of PersistentVolumeClaims in the specified namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesPersistentVolumeClaimsInNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<
    GetKubernetesPersistentVolumeClaimsInNamespaceData,
    ThrowOnError
  >
) =>
  (options.client ?? client).get<
    GetKubernetesPersistentVolumeClaimsInNamespaceResponses,
    GetKubernetesPersistentVolumeClaimsInNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/persistent_volume_claims',
    ...options,
  });

/**
 * Get a specific PersistentVolumeClaim
 *
 * Get a PersistentVolumeClaim by name within a namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesPersistentVolumeClaim = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesPersistentVolumeClaimData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesPersistentVolumeClaimResponses,
    GetKubernetesPersistentVolumeClaimErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/persistent_volume_claims/{name}',
    ...options,
  });

/**
 * Delete a kubernetes pod
 *
 * Delete a single Kubernetes pod in the given namespace. The owning
 * controller (Deployment, StatefulSet, DaemonSet, ...) is responsible
 * for recreating the pod. For naked pods the pod is removed permanently.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesPod = <ThrowOnError extends boolean = true>(
  options: Options<DeleteKubernetesPodData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    DeleteKubernetesPodResponses,
    DeleteKubernetesPodErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/pods/{name}',
    ...options,
  });

/**
 * Restart all containers in a Kubernetes pod
 *
 * Restart all containers in a single Kubernetes pod in place using
 * the Kubernetes 1.35 alpha pod-restart subresource. The pod itself
 * is preserved. Requires the cluster to expose the corresponding
 * subresource (and the matching feature gate to be enabled).
 * **Access policy**: Authenticated user.
 */
export const restartKubernetesPod = <ThrowOnError extends boolean = true>(
  options: Options<RestartKubernetesPodData, ThrowOnError>
) =>
  (options.client ?? client).post<
    RestartKubernetesPodResponses,
    RestartKubernetesPodErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/pods/{name}/restart',
    ...options,
  });

/**
 * Get a Secret
 *
 * Get a Secret by name for a given namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesSecret = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesSecretData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesSecretResponses,
    GetKubernetesSecretErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/secrets/{secret}',
    ...options,
  });

/**
 * Get a kubernetes service account
 *
 * Get a kubernetes service account in the given namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesServiceAccount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesServiceAccountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesServiceAccountResponses,
    GetKubernetesServiceAccountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/service_accounts/{name}',
    ...options,
  });

/**
 * Update image pull secrets for a service account
 *
 * Replace the imagePullSecrets list on a service account with the provided list.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesServiceAccountImagePullSecrets = <
  ThrowOnError extends boolean = true,
>(
  options: Options<
    UpdateKubernetesServiceAccountImagePullSecretsData,
    ThrowOnError
  >
) =>
  (options.client ?? client).put<
    UpdateKubernetesServiceAccountImagePullSecretsResponses,
    UpdateKubernetesServiceAccountImagePullSecretsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/service_accounts/{name}/image_pull_secrets',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of services for a given namespace
 *
 * Get a list of services for a given namespace.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesServicesByNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesServicesByNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesServicesByNamespaceResponses,
    GetKubernetesServicesByNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/services',
    ...options,
  });

/**
 * Create a service
 *
 * Create a service within a given namespace
 * **Access policy**: Authenticated user.
 */
export const createKubernetesService = <ThrowOnError extends boolean = true>(
  options: Options<CreateKubernetesServiceData, ThrowOnError>
) =>
  (options.client ?? client).post<
    CreateKubernetesServiceResponses,
    CreateKubernetesServiceErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/services',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Update a service
 *
 * Update a service within a given namespace.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesService = <ThrowOnError extends boolean = true>(
  options: Options<UpdateKubernetesServiceData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UpdateKubernetesServiceResponses,
    UpdateKubernetesServiceErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/services',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Toggle the system state for a namespace
 *
 * Toggle the system state for a namespace
 * **Access policy**: Administrator or environment administrator.
 */
export const kubernetesNamespacesToggleSystem = <
  ThrowOnError extends boolean = true,
>(
  options: Options<KubernetesNamespacesToggleSystemData, ThrowOnError>
) =>
  (options.client ?? client).put<
    KubernetesNamespacesToggleSystemResponses,
    KubernetesNamespacesToggleSystemErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/system',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get Kubernetes volumes within a namespace in the given Portainer environment
 *
 * Get a list of kubernetes volumes within the specified namespace in the given environment (Endpoint). The Endpoint ID must be a valid Portainer environment identifier.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesVolumesInNamespace = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesVolumesInNamespaceData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesVolumesInNamespaceResponses,
    GetKubernetesVolumesInNamespaceErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/{namespace}/volumes',
    ...options,
  });

/**
 * Get the total number of kubernetes namespaces within the given Portainer environment.
 *
 * Get the total number of kubernetes namespaces within the given environment, including the system namespaces. The total count depends on the user's role and permissions.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesNamespacesCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesNamespacesCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesNamespacesCountResponses,
    GetKubernetesNamespacesCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/namespaces/count',
    ...options,
  });

/**
 * Get Kubernetes cluster nodes
 *
 * Returns the list of Kubernetes nodes for the selected environment.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesNodes = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesNodesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesNodesResponses,
    GetKubernetesNodesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/nodes',
    ...options,
  });

/**
 * Drain a Kubernetes node
 *
 * Drain a Kubernetes node by safely evicting all pods from the node, preparing it for maintenance or removal
 * **Access policy**: authenticated
 */
export const drainNode = <ThrowOnError extends boolean = true>(
  options: Options<DrainNodeData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DrainNodeResponses,
    DrainNodeErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/nodes/{name}/drain',
    ...options,
  });

/**
 * Get CPU and memory limits of all nodes within k8s cluster
 *
 * Get CPU and memory limits of all nodes within k8s cluster.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesNodesLimits = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesNodesLimitsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesNodesLimitsResponses,
    GetKubernetesNodesLimitsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/nodes_limits',
    ...options,
  });

/**
 * Get all PersistentVolumeClaims
 *
 * Get a list of all PersistentVolumeClaims within the given environment. Scoped by namespace for non-admin users.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesPersistentVolumeClaims = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesPersistentVolumeClaimsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesPersistentVolumeClaimsResponses,
    GetAllKubernetesPersistentVolumeClaimsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volume_claims',
    ...options,
  });

/**
 * Delete PersistentVolumeClaims
 *
 * Delete the provided list of PersistentVolumeClaims.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesPersistentVolumeClaims = <
  ThrowOnError extends boolean = true,
>(
  options: Options<DeleteKubernetesPersistentVolumeClaimsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteKubernetesPersistentVolumeClaimsResponses,
    DeleteKubernetesPersistentVolumeClaimsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volume_claims/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Resize a PersistentVolumeClaim
 *
 * Resize a PVC to a new size. The StorageClass must support volume expansion.
 * **Access policy**: Authenticated user.
 */
export const resizeKubernetesPersistentVolumeClaim = <
  ThrowOnError extends boolean = true,
>(
  options: Options<ResizeKubernetesPersistentVolumeClaimData, ThrowOnError>
) =>
  (options.client ?? client).put<
    ResizeKubernetesPersistentVolumeClaimResponses,
    ResizeKubernetesPersistentVolumeClaimErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volume_claims/resize',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get all PersistentVolumes in the cluster
 *
 * Get a list of all PersistentVolumes in the given environment.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesPersistentVolumes = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesPersistentVolumesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesPersistentVolumesResponses,
    GetAllKubernetesPersistentVolumesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volumes',
    ...options,
  });

/**
 * Get a specific PersistentVolume
 *
 * Get a PersistentVolume by name in the given environment.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesPersistentVolume = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesPersistentVolumeData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesPersistentVolumeResponses,
    GetKubernetesPersistentVolumeErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volumes/{name}',
    ...options,
  });

/**
 * Delete PersistentVolumes
 *
 * Delete the provided list of PersistentVolumes.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesPersistentVolumes = <
  ThrowOnError extends boolean = true,
>(
  options: Options<DeleteKubernetesPersistentVolumesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteKubernetesPersistentVolumesResponses,
    DeleteKubernetesPersistentVolumesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volumes/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Update reclaim policy of a PersistentVolume
 *
 * Update the reclaim policy of a PersistentVolume.
 * **Access policy**: Authenticated user.
 */
export const updateKubernetesPersistentVolumeReclaimPolicy = <
  ThrowOnError extends boolean = true,
>(
  options: Options<
    UpdateKubernetesPersistentVolumeReclaimPolicyData,
    ThrowOnError
  >
) =>
  (options.client ?? client).put<
    UpdateKubernetesPersistentVolumeReclaimPolicyResponses,
    UpdateKubernetesPersistentVolumeReclaimPolicyErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/persistent_volumes/reclaim_policy',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Check if RBAC is enabled
 *
 * Check if RBAC is enabled in the specified Kubernetes cluster.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesRbacStatus = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesRbacStatusData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesRbacStatusResponses,
    GetKubernetesRbacStatusErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/rbac_enabled',
    ...options,
  });

/**
 * Delete role bindings
 *
 * Delete the provided list of role bindings.
 * **Access policy**: Authenticated user.
 */
export const deleteRoleBindings = <ThrowOnError extends boolean = true>(
  options: Options<DeleteRoleBindingsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteRoleBindingsResponses,
    DeleteRoleBindingsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/role_bindings/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of kubernetes role bindings
 *
 * Get a list of kubernetes role bindings that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesRoleBindings = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesRoleBindingsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesRoleBindingsResponses,
    GetKubernetesRoleBindingsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/rolebindings',
    ...options,
  });

/**
 * Get a list of kubernetes roles
 *
 * Get a list of kubernetes roles that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesRoles = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesRolesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesRolesResponses,
    GetKubernetesRolesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/roles',
    ...options,
  });

/**
 * Delete roles
 *
 * Delete the provided list of roles.
 * **Access policy**: Authenticated user.
 */
export const deleteRoles = <ThrowOnError extends boolean = true>(
  options: Options<DeleteRolesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteRolesResponses,
    DeleteRolesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/roles/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of Secrets
 *
 * Get a list of Secrets for a given namespace. If isUsed is set to true, information about the applications that use the secrets is also returned.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesSecrets = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesSecretsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesSecretsResponses,
    GetKubernetesSecretsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/secrets',
    ...options,
  });

/**
 * Get Secrets count
 *
 * Get the count of Secrets across all namespaces that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesSecretsCount = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesSecretsCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesSecretsCountResponses,
    GetKubernetesSecretsCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/secrets/count',
    ...options,
  });

/**
 * Delete service accounts
 *
 * Delete the provided list of service accounts.
 * **Access policy**: Authenticated user.
 */
export const deleteServiceAccounts = <ThrowOnError extends boolean = true>(
  options: Options<DeleteServiceAccountsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteServiceAccountsResponses,
    DeleteServiceAccountsErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/service_accounts/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get a list of kubernetes service accounts
 *
 * Get a list of kubernetes service accounts that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesServiceAccounts = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetKubernetesServiceAccountsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesServiceAccountsResponses,
    GetKubernetesServiceAccountsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/serviceaccounts',
    ...options,
  });

/**
 * Get a list of services
 *
 * Get a list of services that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesServices = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesServicesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesServicesResponses,
    GetKubernetesServicesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/services',
    ...options,
  });

/**
 * Get services count
 *
 * Get the count of services that the user has access to.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesServicesCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesServicesCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesServicesCountResponses,
    GetAllKubernetesServicesCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/services/count',
    ...options,
  });

/**
 * Delete services
 *
 * Delete the provided list of services.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesServices = <ThrowOnError extends boolean = true>(
  options: Options<DeleteKubernetesServicesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteKubernetesServicesResponses,
    DeleteKubernetesServicesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/services/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get all StorageClasses
 *
 * Get a list of all StorageClasses in the given environment.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesStorageClasses = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesStorageClassesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesStorageClassesResponses,
    GetAllKubernetesStorageClassesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/storage_classes',
    ...options,
  });

/**
 * Get a specific StorageClass
 *
 * Get a StorageClass by name in the given environment.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesStorageClass = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesStorageClassData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesStorageClassResponses,
    GetKubernetesStorageClassErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/storage_classes/{name}',
    ...options,
  });

/**
 * Set a StorageClass as default
 *
 * Set the specified StorageClass as the cluster default, removing default from any other.
 * **Access policy**: Authenticated user.
 */
export const setDefaultKubernetesStorageClass = <
  ThrowOnError extends boolean = true,
>(
  options: Options<SetDefaultKubernetesStorageClassData, ThrowOnError>
) =>
  (options.client ?? client).put<
    SetDefaultKubernetesStorageClassResponses,
    SetDefaultKubernetesStorageClassErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/storage_classes/{name}/default',
    ...options,
  });

/**
 * Delete StorageClasses
 *
 * Delete the provided list of StorageClasses.
 * **Access policy**: Authenticated user.
 */
export const deleteKubernetesStorageClasses = <
  ThrowOnError extends boolean = true,
>(
  options: Options<DeleteKubernetesStorageClassesData, ThrowOnError>
) =>
  (options.client ?? client).post<
    DeleteKubernetesStorageClassesResponses,
    DeleteKubernetesStorageClassesErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/storage_classes/delete',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get the Kubernetes cluster version and Portainer-relevant capabilities
 *
 * Get the Kubernetes cluster version (major, minor, gitVersion, ...)
 * as reported by the cluster's discovery API, augmented with capability
 * flags Portainer uses to gate UI features (e.g. supportsPodRestart).
 * **Access policy**: Authenticated user.
 */
export const getKubernetesVersion = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesVersionData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesVersionResponses,
    GetKubernetesVersionErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/version',
    ...options,
  });

/**
 * Get Kubernetes volumes within the given Portainer environment
 *
 * Get a list of all kubernetes volumes within the given environment (Endpoint). The Endpoint ID must be a valid Portainer environment identifier.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesVolumes = <ThrowOnError extends boolean = true>(
  options: Options<GetAllKubernetesVolumesData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesVolumesResponses,
    GetAllKubernetesVolumesErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/volumes',
    ...options,
  });

/**
 * Get a Kubernetes volume within the given Portainer environment
 *
 * Get a Kubernetes volume within the given environment (Endpoint). The Endpoint ID must be a valid Portainer environment identifier.
 * **Access policy**: Authenticated user.
 */
export const getKubernetesVolume = <ThrowOnError extends boolean = true>(
  options: Options<GetKubernetesVolumeData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetKubernetesVolumeResponses,
    GetKubernetesVolumeErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/volumes/{namespace}/{volume}',
    ...options,
  });

/**
 * Get the total number of kubernetes volumes within the given Portainer environment.
 *
 * Get the total number of kubernetes volumes within the given environment (Endpoint). The total count depends on the user's role and permissions. The Endpoint ID must be a valid Portainer environment identifier.
 * **Access policy**: Authenticated user.
 */
export const getAllKubernetesVolumesCount = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetAllKubernetesVolumesCountData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetAllKubernetesVolumesCountResponses,
    GetAllKubernetesVolumesCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/{id}/volumes/count',
    ...options,
  });

/**
 * Generate a kubeconfig file
 *
 * Generate a kubeconfig file that allows a client to communicate with the Kubernetes API server
 * **Access policy**: Authenticated user.
 */
export const getKubernetesConfig = <ThrowOnError extends boolean = true>(
  options?: Options<GetKubernetesConfigData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GetKubernetesConfigResponses,
    GetKubernetesConfigErrors,
    ThrowOnError
  >({
    querySerializer: {
      parameters: {
        ids: { array: { explode: false } },
        excludeIds: { array: { explode: false } },
      },
    },
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/kubernetes/config',
    ...options,
  });

/**
 * Test LDAP connectivity
 *
 * Test LDAP connectivity using LDAP details
 * **Access policy**: administrator
 */
export const ldapCheck = <ThrowOnError extends boolean = true>(
  options: Options<LdapCheckData, ThrowOnError>
) =>
  (options.client ?? client).post<
    LdapCheckResponses,
    LdapCheckErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/ldap/check',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * fetches the message of the day
 *
 * **Access policy**: restricted
 */
export const motd = <ThrowOnError extends boolean = true>(
  options?: Options<MotdData, ThrowOnError>
) =>
  (options?.client ?? client).get<MotdResponses, unknown, ThrowOnError>({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/motd',
    ...options,
  });

/**
 * List Registries
 *
 * List all registries based on the current user authorizations.
 * Will return all registries if using an administrator account otherwise it
 * will only return authorized registries.
 * **Access policy**: restricted
 */
export const registryList = <ThrowOnError extends boolean = true>(
  options?: Options<RegistryListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    RegistryListResponses,
    RegistryListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries',
    ...options,
  });

/**
 * Create a new registry
 *
 * Create a new registry.
 * **Access policy**: restricted
 */
export const registryCreate = <ThrowOnError extends boolean = true>(
  options: Options<RegistryCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    RegistryCreateResponses,
    RegistryCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a registry
 *
 * Remove a registry
 * **Access policy**: restricted
 */
export const registryDelete = <ThrowOnError extends boolean = true>(
  options: Options<RegistryDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    RegistryDeleteResponses,
    RegistryDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries/{id}',
    ...options,
  });

/**
 * Inspect a registry
 *
 * Retrieve details about a registry.
 * **Access policy**: restricted
 */
export const registryInspect = <ThrowOnError extends boolean = true>(
  options: Options<RegistryInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    RegistryInspectResponses,
    RegistryInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries/{id}',
    ...options,
  });

/**
 * Update a registry
 *
 * Update a registry
 * **Access policy**: restricted
 */
export const registryUpdate = <ThrowOnError extends boolean = true>(
  options: Options<RegistryUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    RegistryUpdateResponses,
    RegistryUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Configures a registry
 *
 * Configures a registry.
 * **Access policy**: restricted
 */
export const registryConfigure = <ThrowOnError extends boolean = true>(
  options: Options<RegistryConfigureData, ThrowOnError>
) =>
  (options.client ?? client).post<
    RegistryConfigureResponses,
    RegistryConfigureErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries/{id}/configure',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Test registry connection
 *
 * Test connection to a registry with provided credentials
 * **Access policy**: authenticated
 */
export const registryPing = <ThrowOnError extends boolean = true>(
  options: Options<RegistryPingData, ThrowOnError>
) =>
  (options.client ?? client).post<
    RegistryPingResponses,
    RegistryPingErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/registries/ping',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Create a new resource control
 *
 * Create a new resource control to restrict access to a Docker resource.
 * **Access policy**: administrator
 */
export const resourceControlCreate = <ThrowOnError extends boolean = true>(
  options: Options<ResourceControlCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    ResourceControlCreateResponses,
    ResourceControlCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/resource_controls',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a resource control
 *
 * Remove a resource control.
 * **Access policy**: administrator
 */
export const resourceControlDelete = <ThrowOnError extends boolean = true>(
  options: Options<ResourceControlDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    ResourceControlDeleteResponses,
    ResourceControlDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/resource_controls/{id}',
    ...options,
  });

/**
 * Update a resource control
 *
 * Update a resource control
 * **Access policy**: authenticated
 */
export const resourceControlUpdate = <ThrowOnError extends boolean = true>(
  options: Options<ResourceControlUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    ResourceControlUpdateResponses,
    ResourceControlUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/resource_controls/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Triggers a system restore using provided backup file
 *
 * Triggers a system restore using provided backup file
 * **Access policy**: public (requires the X-Setup-Token header on an uninitialized instance unless --no-setup-token is set)
 */
export const restore = <ThrowOnError extends boolean = true>(
  options: Options<RestoreData, ThrowOnError>
) =>
  (options.client ?? client).post<
    RestoreResponses,
    RestoreErrors,
    ThrowOnError
  >({
    url: '/restore',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List roles
 *
 * List all roles available for use
 * **Access policy**: administrator
 */
export const roleList = <ThrowOnError extends boolean = true>(
  options?: Options<RoleListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    RoleListResponses,
    RoleListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/roles',
    ...options,
  });

/**
 * Retrieve Portainer settings
 *
 * Retrieve Portainer settings.
 * **Access policy**: administrator
 */
export const settingsInspect = <ThrowOnError extends boolean = true>(
  options?: Options<SettingsInspectData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SettingsInspectResponses,
    SettingsInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/settings',
    ...options,
  });

/**
 * Update Portainer settings
 *
 * Update Portainer settings.
 * **Access policy**: administrator
 */
export const settingsUpdate = <ThrowOnError extends boolean = true>(
  options: Options<SettingsUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    SettingsUpdateResponses,
    SettingsUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/settings',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Retrieve Portainer public settings
 *
 * Retrieve public settings. Returns a small set of settings that are not reserved to administrators only.
 * **Access policy**: public
 */
export const settingsPublic = <ThrowOnError extends boolean = true>(
  options?: Options<SettingsPublicData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SettingsPublicResponses,
    SettingsPublicErrors,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/settings/public',
    ...options,
  });

/**
 * Inspect the ssl settings
 *
 * Retrieve the ssl settings.
 * **Access policy**: administrator
 */
export const sslInspect = <ThrowOnError extends boolean = true>(
  options?: Options<SslInspectData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SslInspectResponses,
    SslInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/ssl',
    ...options,
  });

/**
 * Update the ssl settings
 *
 * Update the ssl settings.
 * **Access policy**: administrator
 */
export const sslUpdate = <ThrowOnError extends boolean = true>(
  options: Options<SslUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    SslUpdateResponses,
    SslUpdateErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/ssl',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List stacks
 *
 * List all stacks based on the current user authorizations.
 * Will return all stacks if using an administrator account otherwise it
 * will only return the list of stacks the user have access to.
 * Limited stacks will not be returned by this endpoint.
 * **Access policy**: authenticated
 */
export const stackList = <ThrowOnError extends boolean = true>(
  options?: Options<StackListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    StackListResponses,
    StackListErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks',
    ...options,
  });

/**
 * Remove a stack
 *
 * Remove a stack.
 * **Access policy**: restricted
 */
export const stackDelete = <ThrowOnError extends boolean = true>(
  options: Options<StackDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    StackDeleteResponses,
    StackDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}',
    ...options,
  });

/**
 * Inspect a stack
 *
 * Retrieve details about a stack.
 * **Access policy**: restricted
 */
export const stackInspect = <ThrowOnError extends boolean = true>(
  options: Options<StackInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    StackInspectResponses,
    StackInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}',
    ...options,
  });

/**
 * Update a stack
 *
 * Update a stack, only for file based stacks.
 * **Access policy**: authenticated
 */
export const stackUpdate = <ThrowOnError extends boolean = true>(
  options: Options<StackUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    StackUpdateResponses,
    StackUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Associate an orphaned stack to a new environment(endpoint)
 *
 * **Access policy**: administrator
 */
export const stackAssociate = <ThrowOnError extends boolean = true>(
  options: Options<StackAssociateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    StackAssociateResponses,
    StackAssociateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/associate',
    ...options,
  });

/**
 * Retrieve the content of the Stack file for the specified stack
 *
 * Get Stack file content.
 * **Access policy**: restricted
 */
export const stackFileInspect = <ThrowOnError extends boolean = true>(
  options: Options<StackFileInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    StackFileInspectResponses,
    StackFileInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/file',
    ...options,
  });

/**
 * Update a stack's Git configs
 *
 * Update the Git settings in a stack, e.g., RepositoryReferenceName and AutoUpdate. When SourceID is set, URL/auth/TLS are taken from the referenced Source.
 * **Access policy**: authenticated
 */
export const stackUpdateGit = <ThrowOnError extends boolean = true>(
  options: Options<StackUpdateGitData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackUpdateGitResponses,
    StackUpdateGitErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/git',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Redeploy a stack
 *
 * Pull and redeploy a stack via Git
 * **Access policy**: authenticated
 */
export const stackGitRedeploy = <ThrowOnError extends boolean = true>(
  options: Options<StackGitRedeployData, ThrowOnError>
) =>
  (options.client ?? client).put<
    StackGitRedeployResponses,
    StackGitRedeployErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/git/redeploy',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Migrate a stack to another environment(endpoint)
 *
 * Migrate a stack from an environment(endpoint) to another environment(endpoint). It will re-create the stack inside the target environment(endpoint) before removing the original stack.
 * **Access policy**: authenticated
 */
export const stackMigrate = <ThrowOnError extends boolean = true>(
  options: Options<StackMigrateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackMigrateResponses,
    StackMigrateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/migrate',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Starts a stopped Stack
 *
 * Starts a stopped Stack.
 * **Access policy**: authenticated
 */
export const stackStart = <ThrowOnError extends boolean = true>(
  options: Options<StackStartData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackStartResponses,
    StackStartErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/start',
    ...options,
  });

/**
 * Stop a running Stack
 *
 * Stop a running Stack.
 * **Access policy**: authenticated
 */
export const stackStop = <ThrowOnError extends boolean = true>(
  options: Options<StackStopData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackStopResponses,
    StackStopErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/{id}/stop',
    ...options,
  });

/**
 * Deploy a new kubernetes stack from a git repository
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateKubernetesGit = <ThrowOnError extends boolean = true>(
  options: Options<StackCreateKubernetesGitData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateKubernetesGitResponses,
    StackCreateKubernetesGitErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/kubernetes/repository',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new kubernetes stack from a file
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateKubernetesFile = <ThrowOnError extends boolean = true>(
  options: Options<StackCreateKubernetesFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateKubernetesFileResponses,
    StackCreateKubernetesFileErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/kubernetes/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new kubernetes stack from a url
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateKubernetesUrl = <ThrowOnError extends boolean = true>(
  options: Options<StackCreateKubernetesUrlData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateKubernetesUrlResponses,
    StackCreateKubernetesUrlErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/kubernetes/url',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new compose stack from a file
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerStandaloneFile = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackCreateDockerStandaloneFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerStandaloneFileResponses,
    StackCreateDockerStandaloneFileErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/standalone/file',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Deploy a new compose stack from repository
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerStandaloneRepository = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackCreateDockerStandaloneRepositoryData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerStandaloneRepositoryResponses,
    StackCreateDockerStandaloneRepositoryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/standalone/repository',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new compose stack from a text
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerStandaloneString = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackCreateDockerStandaloneStringData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerStandaloneStringResponses,
    StackCreateDockerStandaloneStringErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/standalone/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new swarm stack from a file
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerSwarmFile = <ThrowOnError extends boolean = true>(
  options: Options<StackCreateDockerSwarmFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerSwarmFileResponses,
    StackCreateDockerSwarmFileErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/swarm/file',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * Deploy a new swarm stack from a git repository
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerSwarmRepository = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackCreateDockerSwarmRepositoryData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerSwarmRepositoryResponses,
    StackCreateDockerSwarmRepositoryErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/swarm/repository',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Deploy a new swarm stack from a text
 *
 * Deploy a new stack into a Docker environment specified via the environment identifier.
 * **Access policy**: authenticated
 */
export const stackCreateDockerSwarmString = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackCreateDockerSwarmStringData, ThrowOnError>
) =>
  (options.client ?? client).post<
    StackCreateDockerSwarmStringResponses,
    StackCreateDockerSwarmStringErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/create/swarm/string',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove Kubernetes stacks by name
 *
 * Remove a stack.
 * **Access policy**: restricted
 */
export const stackDeleteKubernetesByName = <
  ThrowOnError extends boolean = true,
>(
  options: Options<StackDeleteKubernetesByNameData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    StackDeleteKubernetesByNameResponses,
    StackDeleteKubernetesByNameErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/stacks/name/{name}',
    ...options,
  });

/**
 * Webhook for triggering stack updates from git
 *
 * **Access policy**: public
 */
export const webhookInvoke = <ThrowOnError extends boolean = true>(
  options: Options<WebhookInvokeData, ThrowOnError>
) =>
  (options.client ?? client).post<
    WebhookInvokeResponses,
    WebhookInvokeErrors,
    ThrowOnError
  >({ url: '/stacks/webhooks/{webhookID}', ...options });

/**
 * Retrieve system info
 *
 * **Access policy**: authenticated
 */
export const systemInfo = <ThrowOnError extends boolean = true>(
  options?: Options<SystemInfoData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SystemInfoResponses,
    SystemInfoErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/system/info',
    ...options,
  });

/**
 * Retrieve the count of nodes
 *
 * **Access policy**: authenticated
 */
export const systemNodesCount = <ThrowOnError extends boolean = true>(
  options?: Options<SystemNodesCountData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SystemNodesCountResponses,
    SystemNodesCountErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/system/nodes',
    ...options,
  });

/**
 * Check Portainer status
 *
 * Retrieve Portainer status
 * **Access policy**: public
 */
export const systemStatus = <ThrowOnError extends boolean = true>(
  options?: Options<SystemStatusData, ThrowOnError>
) =>
  (options?.client ?? client).get<SystemStatusResponses, unknown, ThrowOnError>(
    {
      responseType: 'json',
      url: '/system/status',
      ...options,
    }
  );

/**
 * Upgrade Portainer to BE
 *
 * Upgrade Portainer to BE
 * **Access policy**: administrator
 */
export const systemUpgrade = <ThrowOnError extends boolean = true>(
  options?: Options<SystemUpgradeData, ThrowOnError>
) =>
  (options?.client ?? client).post<
    SystemUpgradeResponses,
    unknown,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/system/upgrade',
    ...options,
  });

/**
 * Check for portainer updates
 *
 * Check if portainer has an update available
 * **Access policy**: authenticated
 */
export const systemVersion = <ThrowOnError extends boolean = true>(
  options?: Options<SystemVersionData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    SystemVersionResponses,
    unknown,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/system/version',
    ...options,
  });

/**
 * List tags
 *
 * List tags.
 * **Access policy**: authenticated
 */
export const tagList = <ThrowOnError extends boolean = true>(
  options?: Options<TagListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    TagListResponses,
    TagListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/tags',
    ...options,
  });

/**
 * Create a new tag
 *
 * Create a new tag.
 * **Access policy**: administrator
 */
export const tagCreate = <ThrowOnError extends boolean = true>(
  options: Options<TagCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    TagCreateResponses,
    TagCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/tags',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a tag
 *
 * Remove a tag.
 * **Access policy**: administrator
 */
export const tagDelete = <ThrowOnError extends boolean = true>(
  options: Options<TagDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    TagDeleteResponses,
    TagDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/tags/{id}',
    ...options,
  });

/**
 * List team memberships
 *
 * List team memberships. Access is only available to administrators and team leaders.
 * **Access policy**: administrator
 */
export const teamMembershipList = <ThrowOnError extends boolean = true>(
  options?: Options<TeamMembershipListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    TeamMembershipListResponses,
    TeamMembershipListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/team_memberships',
    ...options,
  });

/**
 * Create a new team membership
 *
 * Create a new team memberships. Access is only available to administrators leaders of the associated team.
 * **Access policy**: administrator
 */
export const teamMembershipCreate = <ThrowOnError extends boolean = true>(
  options: Options<TeamMembershipCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    TeamMembershipCreateResponses,
    TeamMembershipCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/team_memberships',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a team membership
 *
 * Remove a team membership. Access is only available to administrators leaders of the associated team.
 * **Access policy**: administrator
 */
export const teamMembershipDelete = <ThrowOnError extends boolean = true>(
  options: Options<TeamMembershipDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    TeamMembershipDeleteResponses,
    TeamMembershipDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/team_memberships/{id}',
    ...options,
  });

/**
 * Update a team membership
 *
 * Update a team membership. Access is only available to administrators or leaders of the associated team.
 * **Access policy**: administrator or leaders of the associated team
 */
export const teamMembershipUpdate = <ThrowOnError extends boolean = true>(
  options: Options<TeamMembershipUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    TeamMembershipUpdateResponses,
    TeamMembershipUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/team_memberships/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List teams
 *
 * List teams. For non-administrator users, will only list the teams they are member of.
 * **Access policy**: restricted
 */
export const teamList = <ThrowOnError extends boolean = true>(
  options?: Options<TeamListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    TeamListResponses,
    TeamListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams',
    ...options,
  });

/**
 * Create a new team
 *
 * Create a new team.
 * **Access policy**: administrator
 */
export const teamCreate = <ThrowOnError extends boolean = true>(
  options: Options<TeamCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    TeamCreateResponses,
    TeamCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a team
 *
 * Remove a team.
 * **Access policy**: administrator
 */
export const teamDelete = <ThrowOnError extends boolean = true>(
  options: Options<TeamDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    TeamDeleteResponses,
    TeamDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams/{id}',
    ...options,
  });

/**
 * Inspect a team
 *
 * Retrieve details about a team. Access is only available for administrator and leaders of that team.
 * **Access policy**: administrator
 */
export const teamInspect = <ThrowOnError extends boolean = true>(
  options: Options<TeamInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    TeamInspectResponses,
    TeamInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams/{id}',
    ...options,
  });

/**
 * Update a team
 *
 * Update a team.
 * **Access policy**: administrator
 */
export const teamUpdate = <ThrowOnError extends boolean = true>(
  options: Options<TeamUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    TeamUpdateResponses,
    TeamUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * List team memberships
 *
 * List team memberships. Access is only available to administrators and team leaders.
 * **Access policy**: restricted
 */
export const teamMemberships = <ThrowOnError extends boolean = true>(
  options: Options<TeamMembershipsData, ThrowOnError>
) =>
  (options.client ?? client).get<
    TeamMembershipsResponses,
    TeamMembershipsErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/teams/{id}/memberships',
    ...options,
  });

/**
 * List available templates
 *
 * List available templates.
 * **Access policy**: authenticated
 */
export const templateList = <ThrowOnError extends boolean = true>(
  options?: Options<TemplateListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    TemplateListResponses,
    TemplateListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/templates',
    ...options,
  });

/**
 * Get a template's file
 *
 * Get a template's file
 * **Access policy**: authenticated
 */
export const templateFile = <ThrowOnError extends boolean = true>(
  options: Options<TemplateFileData, ThrowOnError>
) =>
  (options.client ?? client).post<
    TemplateFileResponses,
    TemplateFileErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/templates/{id}/file',
    ...options,
  });

/**
 * Search Helm Charts
 *
 * **Access policy**: authenticated
 */
export const helmRepoSearch = <ThrowOnError extends boolean = true>(
  options: Options<HelmRepoSearchData, ThrowOnError>
) =>
  (options.client ?? client).get<
    HelmRepoSearchResponses,
    HelmRepoSearchErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/templates/helm',
    ...options,
  });

/**
 * Show Helm Chart Information
 *
 * **Access policy**: authenticated
 */
export const helmShow = <ThrowOnError extends boolean = true>(
  options: Options<HelmShowData, ThrowOnError>
) =>
  (options.client ?? client).get<
    HelmShowResponses,
    HelmShowErrors,
    ThrowOnError
  >({
    responseType: 'text',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/templates/helm/{command}',
    ...options,
  });

/**
 * Upload TLS files
 *
 * Use this environment(endpoint) to upload TLS files.
 * **Access policy**: administrator
 */
export const uploadTls = <ThrowOnError extends boolean = true>(
  options: Options<UploadTlsData, ThrowOnError>
) =>
  (options.client ?? client).post<
    UploadTlsResponses,
    UploadTlsErrors,
    ThrowOnError
  >({
    ...formDataBodySerializer,
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/upload/tls/{certificate}',
    ...options,
    headers: {
      'Content-Type': null,
      ...options.headers,
    },
  });

/**
 * List users
 *
 * List Portainer users.
 * Non-administrator users will only be able to list other non-administrator user accounts.
 * User passwords are filtered out, and should never be accessible.
 * **Access policy**: restricted
 */
export const userList = <ThrowOnError extends boolean = true>(
  options?: Options<UserListData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    UserListResponses,
    UserListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users',
    ...options,
  });

/**
 * Create a new user
 *
 * Create a new Portainer user.
 * Only administrators can create users.
 * **Access policy**: restricted
 */
export const userCreate = <ThrowOnError extends boolean = true>(
  options: Options<UserCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    UserCreateResponses,
    UserCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove a user
 *
 * Remove a user.
 * **Access policy**: administrator
 */
export const userDelete = <ThrowOnError extends boolean = true>(
  options: Options<UserDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    UserDeleteResponses,
    UserDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}',
    ...options,
  });

/**
 * Inspect a user
 *
 * Retrieve details about a user.
 * User passwords are filtered out, and should never be accessible.
 * **Access policy**: authenticated
 */
export const userInspect = <ThrowOnError extends boolean = true>(
  options: Options<UserInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    UserInspectResponses,
    UserInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}',
    ...options,
  });

/**
 * Update a user
 *
 * Update user details. A regular user account can only update his details.
 * A regular user account cannot change their username or role.
 * **Access policy**: authenticated
 */
export const userUpdate = <ThrowOnError extends boolean = true>(
  options: Options<UserUpdateData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UserUpdateResponses,
    UserUpdateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Inspect a user's effective access on every environment
 *
 * Returns the resolved role for each environment the user can access,
 * following the policy precedence used by the access viewer
 * (user-endpoint, user-group, team-endpoint, team-group).
 * Environments where the user has no role are omitted.
 * **Access policy**: restricted
 */
export const userEffectiveAccessInspect = <ThrowOnError extends boolean = true>(
  options: Options<UserEffectiveAccessInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    UserEffectiveAccessInspectResponses,
    UserEffectiveAccessInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/effective-access',
    ...options,
  });

/**
 * List a users helm repositories
 *
 * Inspect a user helm repositories.
 * **Access policy**: authenticated
 */
export const helmUserRepositoriesList = <ThrowOnError extends boolean = true>(
  options: Options<HelmUserRepositoriesListData, ThrowOnError>
) =>
  (options.client ?? client).get<
    HelmUserRepositoriesListResponses,
    HelmUserRepositoriesListErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/helm/repositories',
    ...options,
  });

/**
 * Create a user helm repository
 *
 * Create a user helm repository.
 * **Access policy**: authenticated
 */
export const helmUserRepositoryCreate = <ThrowOnError extends boolean = true>(
  options: Options<HelmUserRepositoryCreateData, ThrowOnError>
) =>
  (options.client ?? client).post<
    HelmUserRepositoryCreateResponses,
    HelmUserRepositoryCreateErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/helm/repositories',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Delete a users helm repositoryies
 *
 * **Access policy**: authenticated
 */
export const helmUserRepositoryDelete = <ThrowOnError extends boolean = true>(
  options: Options<HelmUserRepositoryDeleteData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    HelmUserRepositoryDeleteResponses,
    HelmUserRepositoryDeleteErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/helm/repositories/{repositoryID}',
    ...options,
  });

/**
 * Inspect a user memberships
 *
 * Inspect a user memberships.
 * **Access policy**: restricted
 */
export const userMembershipsInspect = <ThrowOnError extends boolean = true>(
  options: Options<UserMembershipsInspectData, ThrowOnError>
) =>
  (options.client ?? client).get<
    UserMembershipsInspectResponses,
    UserMembershipsInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/memberships',
    ...options,
  });

/**
 * Update password for a user
 *
 * Update password for the specified user.
 * **Access policy**: authenticated
 */
export const userUpdatePassword = <ThrowOnError extends boolean = true>(
  options: Options<UserUpdatePasswordData, ThrowOnError>
) =>
  (options.client ?? client).put<
    UserUpdatePasswordResponses,
    UserUpdatePasswordErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/passwd',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Get all API keys for a user
 *
 * Gets all API keys for a user.
 * Only the calling user or admin can retrieve api-keys.
 * **Access policy**: authenticated
 */
export const userGetApiKeys = <ThrowOnError extends boolean = true>(
  options: Options<UserGetApiKeysData, ThrowOnError>
) =>
  (options.client ?? client).get<
    UserGetApiKeysResponses,
    UserGetApiKeysErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/tokens',
    ...options,
  });

/**
 * Generate an API key for a user
 *
 * Generates an API key for a user.
 * Only the calling user can generate a token for themselves.
 * Password is required only for internal authentication.
 * **Access policy**: restricted
 */
export const userGenerateApiKey = <ThrowOnError extends boolean = true>(
  options: Options<UserGenerateApiKeyData, ThrowOnError>
) =>
  (options.client ?? client).post<
    UserGenerateApiKeyResponses,
    UserGenerateApiKeyErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [{ name: 'Authorization', type: 'apiKey' }],
    url: '/users/{id}/tokens',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Remove an api-key associated to a user
 *
 * Remove an api-key associated to a user..
 * Only the calling user or admin can remove api-key.
 * **Access policy**: authenticated
 */
export const userRemoveApiKey = <ThrowOnError extends boolean = true>(
  options: Options<UserRemoveApiKeyData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    UserRemoveApiKeyResponses,
    UserRemoveApiKeyErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/{id}/tokens/{keyID}',
    ...options,
  });

/**
 * Check administrator account existence
 *
 * Check if an administrator account exists in the database.
 * **Access policy**: public
 */
export const userAdminCheck = <ThrowOnError extends boolean = true>(
  options?: Options<UserAdminCheckData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    UserAdminCheckResponses,
    UserAdminCheckErrors,
    ThrowOnError
  >({ url: '/users/admin/check', ...options });

/**
 * Initialize administrator account
 *
 * Initialize the 'admin' user account.
 * **Access policy**: public (requires the X-Setup-Token header on an uninitialized instance unless --no-setup-token is set)
 */
export const userAdminInit = <ThrowOnError extends boolean = true>(
  options: Options<UserAdminInitData, ThrowOnError>
) =>
  (options.client ?? client).post<
    UserAdminInitResponses,
    UserAdminInitErrors,
    ThrowOnError
  >({
    responseType: 'json',
    url: '/users/admin/init',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Inspect the current user user
 *
 * Retrieve details about the current  user.
 * User passwords are filtered out, and should never be accessible.
 * **Access policy**: authenticated
 */
export const currentUserInspect = <ThrowOnError extends boolean = true>(
  options?: Options<CurrentUserInspectData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    CurrentUserInspectResponses,
    CurrentUserInspectErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/users/me',
    ...options,
  });

/**
 * List webhooks
 *
 * **Access policy**: authenticated
 */
export const getWebhooks = <ThrowOnError extends boolean = true>(
  options?: Options<GetWebhooksData, ThrowOnError>
) =>
  (options?.client ?? client).get<
    GetWebhooksResponses,
    GetWebhooksErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/webhooks',
    ...options,
  });

/**
 * Create a webhook
 *
 * **Access policy**: authenticated
 */
export const postWebhooks = <ThrowOnError extends boolean = true>(
  options: Options<PostWebhooksData, ThrowOnError>
) =>
  (options.client ?? client).post<
    PostWebhooksResponses,
    PostWebhooksErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/webhooks',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Delete a webhook
 *
 * **Access policy**: authenticated
 */
export const deleteWebhooksById = <ThrowOnError extends boolean = true>(
  options: Options<DeleteWebhooksByIdData, ThrowOnError>
) =>
  (options.client ?? client).delete<
    DeleteWebhooksByIdResponses,
    DeleteWebhooksByIdErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/webhooks/{id}',
    ...options,
  });

/**
 * Execute a webhook
 *
 * Acts on a passed in token UUID to restart the docker service
 * **Access policy**: public
 */
export const postWebhooksById = <ThrowOnError extends boolean = true>(
  options: Options<PostWebhooksByIdData, ThrowOnError>
) =>
  (options.client ?? client).post<
    PostWebhooksByIdResponses,
    PostWebhooksByIdErrors,
    ThrowOnError
  >({ url: '/webhooks/{id}', ...options });

/**
 * Update a webhook
 *
 * **Access policy**: authenticated
 */
export const putWebhooksById = <ThrowOnError extends boolean = true>(
  options: Options<PutWebhooksByIdData, ThrowOnError>
) =>
  (options.client ?? client).put<
    PutWebhooksByIdResponses,
    PutWebhooksByIdErrors,
    ThrowOnError
  >({
    responseType: 'json',
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/webhooks/{id}',
    ...options,
    headers: {
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });

/**
 * Attach a websocket
 *
 * If the nodeName query parameter is present, the request will be proxied to the underlying agent environment(endpoint).
 * If the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and
 * an AttachStart operation HTTP request will be created and hijacked.
 * **Access policy**: authenticated
 */
export const getWebsocketAttach = <ThrowOnError extends boolean = true>(
  options: Options<GetWebsocketAttachData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetWebsocketAttachResponses,
    GetWebsocketAttachErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/websocket/attach',
    ...options,
  });

/**
 * Execute a websocket
 *
 * If the nodeName query parameter is present, the request will be proxied to the underlying agent environment(endpoint).
 * If the nodeName query parameter is not specified, the request will be upgraded to the websocket protocol and
 * an ExecStart operation HTTP request will be created and hijacked.
 */
export const getWebsocketExec = <ThrowOnError extends boolean = true>(
  options: Options<GetWebsocketExecData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetWebsocketExecResponses,
    GetWebsocketExecErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/websocket/exec',
    ...options,
  });

/**
 * Execute a websocket on kubectl shell pod
 *
 * The request will be upgraded to the websocket protocol. The request will proxy input from the client to the pod via long-lived websocket connection.
 * **Access policy**: authenticated
 */
export const getWebsocketKubernetesShell = <
  ThrowOnError extends boolean = true,
>(
  options: Options<GetWebsocketKubernetesShellData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetWebsocketKubernetesShellResponses,
    GetWebsocketKubernetesShellErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/websocket/kubernetes-shell',
    ...options,
  });

/**
 * Execute a websocket on pod
 *
 * The request will be upgraded to the websocket protocol.
 * **Access policy**: authenticated
 */
export const getWebsocketPod = <ThrowOnError extends boolean = true>(
  options: Options<GetWebsocketPodData, ThrowOnError>
) =>
  (options.client ?? client).get<
    GetWebsocketPodResponses,
    GetWebsocketPodErrors,
    ThrowOnError
  >({
    security: [
      { name: 'X-API-KEY', type: 'apiKey' },
      { name: 'Authorization', type: 'apiKey' },
    ],
    url: '/websocket/pod',
    ...options,
  });
