/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

export interface LicenseToken {
  /**
   * @example ==================BEGIN=================
   * Eqxxapy0De8J26J77lSr18yYIjtagD84tAC8HB2d
   * SDMAAAAbMjAyMi0xMC0xNFQwNzo1NzoxMy4wMTQ4MTha
   * ==================END===================
   */
  token?: string;
}

export interface LicenseActivateSuccess {
  /** @example activated */
  license?: string;
}

export interface LicenseInfo {
  license: {
    uuid: string;
    hardware: string;
    customer: string;
    product: string;
    type: string;
    features: string[];
    options: { event_sources?: number };
    evaluationStart: string;
    evaluationEnd: string;
  };
  features: { name?: string; description?: string }[];
  options: { name?: string; description?: string; value?: number }[];
}

export interface Pagination {
  /** @example 123 */
  count?: number;
  next?: string | null;
  previous?: string | null;
  results?: object[];
}

export enum AssetType {
  User = 'user',
  ArmaIndustrialFirewall = 'arma_industrial_firewall',
  Plc = 'plc',
  Pc = 'pc',
  Server = 'server',
  NetworkDevice = 'network_device',
}

/**
 * Статус актива: 1 - разрешенный, 0 - недоверенный
 */
export type AssetStatus = 0 | 1;

export interface NameDescriptionModel {
  id?: number;
  name?: string;
  description?: string | null;
}

export interface AssetBase {
  id?: number;
  name?: string;
  asset_type?: AssetType;

  /** Статус актива: 1 - разрешенный, 0 - недоверенный */
  status?: AssetStatus;

  /** Asset's IPv4 or IPv6 address. */
  ip?: string;

  /** @format date-time */
  updated?: string;
}

export type AssetGroup = NameDescriptionModel & { collapsed?: boolean };

export type Asset = AssetBase & {
  description?: string | null;
  sensor?: string | null;
  model?: string | null;
  mac?: string | null;
  ports?: number[] | null;
};

export type AssetList = AssetBase & {
  count_incidents?: number;
  vulnerabilities?: number;
};

export type AssetDetail = Asset & {
  os?: Os;
  group?: AssetGroup;
  manufacturer?: AssetManufacturer;
  incidents?: Incident[];
};

export type AssetPatch = Asset & {
  os?: number | null;
  group?: number | null;
  manufacturer?: number | null;
};

export interface AssetManufacturer {
  id: number;
  name: string;

  /** Description */
  description?: string | null;
}

/**
 * @example {"id":2345,"description":"MS Windows","name":"Windows"}
 */
export interface Os {
  id: number;

  /** Description */
  description?: string | null;
  name: string;
}

export interface Incident {
  /**
   * @min 0
   * @max 2147483647
   */
  user_friendly_id?: number | null;

  /**
   * Date and time, when incident occurs
   * @format date-time
   */
  timestamp?: string;

  /**
   * ID
   * ID of incident
   * @format uuid
   */
  incident_id: string;

  /** Title */
  title: string;
  category: IncidentCategory;

  /**
   * Hazard level of incident
   * @min 0
   * @max 100
   */
  importance: number;

  /** 0 - Not assigned (Не назначен) 1 - Assigned (Назначен) 2 - Delayed (Отложен) 3 - Resolved (Решен) 4 - False_alarm (Ложное срабатывание) */
  status?: IncidentStatusEnum;
  assigned_to: number | null;

  /**
   * Event's number
   * Amount of events in the incident
   * @min 1
   * @max 2147483647
   */
  event_count: number;

  /**
   * Date and time, when incident was created
   * @format date-time
   */
  created: string;

  /**
   * Date and time, when incident was updated
   * @format date-time
   */
  updated: string;
  events: Event[];

  /**
   * Deadline. Deadline when incident must be resolved
   * @format date-time
   */
  deadline?: string | null;

  /** Incident comment */
  comment?: string | null;
  notification_id?: number | null;
  close_recommendations?: IncidentRecommendations[];
  effects?: IncidentEffect[];
}

export interface IncidentCategory {
  name: string;

  /** Description */
  description?: string | null;
  id: number;
}

/**
 * 0 - Not assigned (Не назначен) 1 - Assigned (Назначен) 2 - Delayed (Отложен) 3 - Resolved (Решен) 4 - False_alarm (Ложное срабатывание)
 */
export type IncidentStatusEnum = 0 | 1 | 2 | 3 | 4;

export interface IncidentEdit {
  /** 0 - Not assigned (Не назначен) 1 - Assigned (Назначен) 2 - Delayed (Отложен) 3 - Resolved (Решен) 4 - False_alarm (Ложное срабатывание) */
  status?: IncidentStatusEnum;

  /**
   * Deadline. Метка времени, до которого инцидент должен быть решен
   * @format date-time
   */
  deadline?: string;

  /** Комментарии к инциденту */
  comment?: string | null;
  category?: number;

  /** @min 0 */
  assigned_to?: number | null;
}

export interface IncidentEffect {
  name: string;

  /** Description */
  description?: string | null;
  id: number;
}

export interface IncidentRecommendations {
  name: string;

  /** Description */
  description?: string | null;
  id: number;
}

export interface Event {
  type?: string;
  Index?: string;
  sign_id?: string;
  '@created'?: string;
  event_id?: string;

  /** @format nullable */
  rule_tags?: string;
  sign_name?: string;
  source_ip?: string;
  '@timestamp'?: string;
  event_hash?: string;
  event_last?: string;
  source_mac?: string;
  celery_done?: boolean;

  /** @format int32 */
  event_count?: number;
  event_first?: string;
  source_host?: string;

  /** @format int32 */
  source_port?: number;
  source_user?: string;
  aggregated_id?: string;
  device_action?: string;
  device_vendor?: string;
  event_src_msg?: string;
  sign_category?: string;
  destination_ip?: string;
  device_product?: string;
  device_version?: string;
  event_protocol?: string;

  /** @format int32 */
  event_severity?: number;
  event_timestamp?: string;
  destination_host?: string;

  /** @format int32 */
  destination_port?: number;
  destination_user?: string;
  sign_subcategory?: string;
}

export interface UserInfo {
  user?: User;

  /** @example asdasd */
  comment?: string;

  /** @example online */
  user_status?: string;

  /** @example Europe/Moscow */
  timezone?: string;

  /**
   * Format of field should be: YYYY-MM-DD, MM/DD/YYYY, MM/DD/YY, YYYY-MM-DD
   * @format nullable
   * @example 2030-10-10
   */
  expire_date?: string;

  /** @example 2022-04-13T14:49:41.810932+03:00 */
  modified?: string;
}

export interface User {
  /**
   * @format int32
   * @example 3
   */
  id?: number;

  /** @example new_user_2 */
  username?: string;

  /** В случае если не нужно менять пароль - данное поле не стоит включать в body. Минимум 8 символов; Не должен содержать быть похож на юзернейм; не допускается распространенные пароли; должен содержать хотя бы одну заглавную и прописную букуву и цифру */
  password?: string;

  /** Ввод старого пароля требуется, если пользователь меняет пароль самому себе */
  old_password?: string;

  /** @example asdasd */
  first_name?: string;
  is_active?: boolean;

  /** @example asdf@mail.ru */
  email?: string;
}

export interface RuleGroup {
  /**
   * @format in32
   * @example 5
   */
  id?: number;

  /** @example rule group */
  name?: string;

  /** @example rule description */
  description?: string;
}

/**
 * Тип правила корреляции. 0 - System 1 - User
 */
export type RuleTypeEnum = 0 | 1;

/**
 * @format json
 */
export interface RuleJson {
  /** @example query_string */
  type: string;

  /** @example sign_category */
  field: string;

  /** @example sign_category:\"ARPWATCH\" AND device_action: \"station\" */
  operands: string;
}

export interface HttpAction {
  /** @example http */
  type: string;

  /** @example http://172.16.230.105/login/?next=/ru/logstash/rule/add/ */
  url: string;

  /** @example Шаблон сообщения HTTP Запроса */
  template: string;

  /** @example text/plain */
  content_type: string;
}

export interface SyslogAction {
  /** @example syslog */
  type: string;

  /** @example 192.168.0.1 */
  host: string;

  /** @example 514 */
  port: string;

  /** @example Имя источника Syslog для записей */
  name: string;

  /** @example udp */
  protocol: string;

  /** @example Сообщение  Syslog для записей */
  template: string;
}

export interface ExecAction {
  /** @example exec */
  type: string;

  /** @example C:Путь к исполняемому файл */
  path: string;

  /** @example  */
  args: string | null;

  /** @example  */
  env: string | null;

  /** @example  */
  cwd: string | null;
}

export interface BashAction {
  /** @example bash */
  type: string;

  /** @example #!/bin/bash\n\n# Тело запроса Действие: Bash скрипт  */
  body: string;
}

export interface IncidentAction {
  /** @example incident */
  type: string;

  /** @example Название Инцидента */
  title: string;

  /** @example Комментарий к инциденту */
  comment: string | null;

  /** @example Описание инцидента */
  description: string | null;

  /** @example 55 */
  importance: string | null;
  category: { name: string; description: string | null; id: number };

  /** @example  */
  assigned_to?: string | null;
  close_recommendations: string[] | null;
  effects: string[] | null;
}

export interface AssetAction {
  /** @example asset */
  type: string;

  /** @example Имя нового актива */
  name: string;

  /** @example plc */
  asset_type: string | null;

  /** @example 1 */
  group: string;

  /** @example Описание нового актива */
  description: string | null;

  /** @example 1 */
  manufacturer: string;

  /** @example plc */
  model: string | null;

  /** @example 1 */
  os: string;

  /** @example 192.168.0.1 */
  ip: string;

  /** @example 1234, 4321 */
  ports: string;
}

export interface FirewallAction {
  /** @example firewall */
  type: string;

  /** @example 1 */
  armaif: string;
  sensor: { ip: string; scheme: string; key: string; secret: string };

  /** @example true */
  enabled: boolean;

  /** @example true */
  quick: boolean;

  /** @example true */
  log: boolean;

  /** @example ["lan", "lan2"] */
  interface: string[];

  /** @example in */
  direction: string;

  /** @example 1 */
  sequence: string;

  /** @example pass */
  action: string;

  /** @example inet */
  ipprotocol: string;

  /** @example any */
  protocol: string;

  /** @example any */
  source_net: string;

  /** @example 1234 */
  source_port: string;

  /** @example true */
  source_not: boolean;

  /** @example any */
  destination_net: string;

  /** @example 1234 */
  destination_port: string;

  /** @example true */
  destination_not: boolean;

  /** @example Описание */
  description: string | null;

  /** @example  */
  gateway: string | null;
}

export interface Rule {
  /**
   * @format int32
   * @example 2
   */
  id?: number;
  name: string;
  description?: string;
  group?: RuleGroup;

  /** Множественная реакиция */
  multi?: boolean;

  /** Тип правила корреляции. 0 - System 1 - User */
  type: RuleTypeEnum;
  status?: boolean;
  archived?: boolean;

  /**
   * Глубина анализа для правила в формате HH:MM:SS
   * @format iso8601
   */
  depth: string;

  /**
   * @format nullable
   * @example 2030-10-10
   */
  created?: string;

  /** @example 2030-10-10 */
  updated?: string;
  rule_json: RuleJson;

  /** @format json */
  action_json: (
    | HttpAction
    | SyslogAction
    | ExecAction
    | BashAction
    | IncidentAction
    | AssetAction
    | FirewallAction
    | (HttpAction &
        SyslogAction &
        ExecAction &
        BashAction &
        IncidentAction &
        AssetAction &
        FirewallAction)
  )[];

  /**
   * Показывает конкретную версию правила. Приращается при обновлении
   * @format int32
   * @example 1
   */
  rev: number;

  /**
   * SID правила кореляции
   * @format int32
   * @example 2
   */
  sid: number;
  is_active?: boolean;
}

/**
 * Тип файла в хранилище. 0 - Unknown 1 - DB dump 2 - CSV export 3 - JSON export 4 - ClamAV updates
 */
export type StorageTypeEnum = 0 | 1 | 2 | 3 | 4;

/**
 * Формат файла в хранилище.
 */
export enum StorageFormatEnum {
  Unknown = 'Unknown',
  Plain = 'Plain',
  JSON = 'JSON',
  CSV = 'CSV',
  ZIP = 'ZIP',
}

export interface StorageList {
  /** @min 1 */
  id?: number;

  /** Формат файла в хранилище. */
  format?: StorageFormatEnum;
  size?: number;
  description?: string;

  /** @format date-time */
  created?: string;
}

export type Storage = StorageList & {
  last_access?: string;
  type?: StorageTypeEnum;
  crc?: { crc?: string; type?: 'sha256sum' | 'sha512sum' };
};

export interface LoginRequest {
  username: string;

  /** Минимум 8 символов; Не должен содержать быть похож на юзернейм; не допускается распространенные пароли; должен содержать хотя бы одну заглавную и прописную букуву и цифру; */
  password: string;
}

/**
 * Тип ротации. 0 - по моменту времени, 1 - по количеству событий, 2 - отключена
 */
export type RotationType = 0 | 1 | 2;

/**
 * Задаёт тип расписания, когда будет происходить ротация. Учитывается только если `rotation_type = 0`
 */
export enum RotationPeriod {
  Day = 'day',
  Week = 'week',
  Month = 'month',
}

/**
* Задаёт конкретное время, когда будет происходить ротация. Учитывается только если `rotation_type = 0`  и `rotation_period = day` <br><br>
Допустимы следующие формат: hh:mm:ss, hh:mm:ss.uuuuuu, hh:mm, hh:mm[:ss[.uuuuuu]], hh:mm[:ss[.uuuuuu]], hh:mm[:ss[.uuuuuu]].
* @format time
*/
export type RotationTime = string;

/**
* Задаёт дни недели, когда будет происходить ротация. Учитывается только если `rotation_type = 0` и `rotation_period = week`. 
Время задаётся на сервере. По умолчанию в 01:00 в выбранные дни
*/
export type RotationWeekDay = (
  | 'sunday'
  | 'monday'
  | 'tuesday'
  | 'wednesday'
  | 'thursday'
  | 'friday'
  | 'saturday'
)[];

/**
* Задаёт месяц, когда будет происходить ротация. Учитывается только если `rotation_type = 0` и `rotation_period = month`
Время задаётся на сервере. По умолчанию в 01:00 в первый день месяца
*/
export type RotationMonth = (
  | 'january'
  | 'february'
  | 'march'
  | 'april'
  | 'may'
  | 'june'
  | 'july'
  | 'august'
  | 'september'
  | 'october'
  | 'november'
  | 'december'
)[];

export interface RotationSettings {
  /** Тип ротации. 0 - по моменту времени, 1 - по количеству событий, 2 - отключена */
  rotation_type: RotationType;

  /** Количество событий, при котором происходит ротация. Учитывается только если `rotation_type = 1` */
  size_rotation?: number | null;

  /** Объект, в котором задаётся время запуска ротации. Учитывается только если `rotation_type = 0` */
  schedule?: {
    period?: RotationPeriod;
    time?: RotationTime;
    week_day?: RotationWeekDay;
    month?: RotationMonth;
  };
}

export type SizeRotationSettings = RotationSettings;

export type TimeRotationSettings = RotationSettings;

export interface EventListbyIndex {
  took?: number;
  timed_out?: boolean;
  _shards?: {
    total?: number;
    successful?: number;
    skipped?: number;
    failed?: number;
  };
  hits?: {
    total?: { value?: number; relation?: string };
    max_score?: number | null;
    hits?: object[];
  };
}

export type EventIndexList = { value?: string; label?: string }[];

export enum AffectedSystemFunctionEnum {
  TypeАтомнаяЭнергетика = 'Атомная энергетика',
  TypeБанковскаяСфераИИныеСферыФинансовогоРынка = 'Банковская сфера и иные сферы финансового рынка',
  TypeГорнодобывающаяПромышленность = 'Горнодобывающая промышленность',
  TypeГосударственнаяМуниципальнаяВласть = 'Государственная/муниципальная власть',
  TypeЗдравоохранение = 'Здравоохранение',
  TypeМеталлургическаяПромышленность = 'Металлургическая промышленность',
  TypeНаука = 'Наука',
  TypeОбороннаяПромышленность = 'Оборонная промышленность',
  TypeОбразование = 'Образование',
  TypeРакетноКосмическаяПромышленность = 'Ракетно-космическая промышленность',
  TypeСвязь = 'Связь',
  TypeСМИ = 'СМИ',
  TypeТопливноЭнергетическийКомплекс = 'Топливно-энергетический комплекс',
  TypeТранспорт = 'Транспорт',
  TypeХимическаяПромышленность = 'Химическая промышленность',
  TypeИная = 'Иная',
}

export interface Company {
  name?: string;
  city?: string;
  api_key?: string;

  /** Является объектом КИИ? */
  is_cii?: boolean;

  /**
   * ID Кода локации; ISO-3166-2
   * @min 1
   */
  location?: { id?: number; code?: string };
  affected_system_function?: AffectedSystemFunctionEnum;
}

export interface CompanyCreateUpdate {
  name?: string;
  city?: string;
  api_key?: string;

  /** Является объектом КИИ? */
  is_cii?: boolean;

  /**
   * ID Кода локации; ISO-3166-2
   * @min 1
   */
  location?: number;
  affected_system_function?: AffectedSystemFunctionEnum;
}

export type LocationCodeList = { id?: number; code?: string }[];

export enum NotificationCategoryEnum {
  TypeУведомлениеОКомпьютерномИнциденте = 'Уведомление о компьютерном инциденте',
  TypeУведомлениеОКомпьютернойАтаке = 'Уведомление о компьютерной атаке',
  TypeУведомлениеОНаличииУязвимости = 'Уведомление о наличии уязвимости',
}

export enum EventTypeEnum {
  TypeВовлечениеКонтролируемогоРесурсаВИнфраструктуруВПО = 'Вовлечение контролируемого ресурса в инфраструктуру ВПО',
  TypeЗамедлениеРаботыРесурсаВРезультатеDDoSАтаки = 'Замедление работы ресурса в результате DDoS-атаки',
  TypeЗаражениеВПО = 'Заражение ВПО',
  TypeЗахватСетевогоТрафика = 'Захват сетевого трафика',
  TypeИспользованиеКонтролируемогоРесурсаДляФишинга = 'Использование контролируемого ресурса для фишинга',
  TypeКомпрометацияУчетнойЗаписи = 'Компрометация учетной записи',
  TypeНесанкционированноеИзменениеИнформации = 'Несанкционированное изменение информации',
  TypeНесанкционированноеРазглашениеИнформации = 'Несанкционированное разглашение информации',
  TypeПубликацияНаРесурсеЗапрещеннойЗаконодательствомРФИнформации = 'Публикация на ресурсе запрещенной законодательством РФ информации',
  TypeРассылкаСпамСообщенийСКонтролируемогоРесурса = 'Рассылка спам-сообщений с контролируемого ресурса',
  TypeУспешнаяЭксплуатацияУязвимости = 'Успешная эксплуатация уязвимости',
  DDoSАтака = 'DDoS-атака',
  TypeНеудачныеПопыткиАвторизации = 'Неудачные попытки авторизации',
  TypeПопыткиВнедренияВПО = 'Попытки внедрения ВПО',
  TypeПопыткиЭксплуатацииУязвимости = 'Попытки эксплуатации уязвимости',
  TypeПубликацияМошенническойИнформации = 'Публикация мошеннической информации',
  TypeСетевоеСканирование = 'Сетевое сканирование',
  TypeСоциальнаяИнженерия = 'Социальная инженерия',
  TypeУязвимыйРесурс = 'Уязвимый ресурс',
}

export enum EventTypeVulnerabilityEmum {
  TypeУязвимыйРесурс = 'Уязвимый ресурс',
}

export enum EventTypeIncidentEnum {
  TypeВовлечениеКонтролируемогоРесурсаВИнфраструктуруВПО = 'Вовлечение контролируемого ресурса в инфраструктуру ВПО',
  TypeЗамедлениеРаботыРесурсаВРезультатеDDoSАтаки = 'Замедление работы ресурса в результате DDoS-атаки',
  TypeЗаражениеВПО = 'Заражение ВПО',
  TypeЗахватСетевогоТрафика = 'Захват сетевого трафика',
  TypeИспользованиеКонтролируемогоРесурсаДляФишинга = 'Использование контролируемого ресурса для фишинга',
  TypeКомпрометацияУчетнойЗаписи = 'Компрометация учетной записи',
  TypeНесанкционированноеИзменениеИнформации = 'Несанкционированное изменение информации',
  TypeНесанкционированноеРазглашениеИнформации = 'Несанкционированное разглашение информации',
  TypeПубликацияНаРесурсеЗапрещеннойЗаконодательствомРФИнформации = 'Публикация на ресурсе запрещенной законодательством РФ информации',
  TypeРассылкаСпамСообщенийСКонтролируемогоРесурса = 'Рассылка спам-сообщений с контролируемого ресурса',
  TypeУспешнаяЭксплуатацияУязвимости = 'Успешная эксплуатация уязвимости',
}

export enum EventTypeAttackEnum {
  TypeНеудачныеПопыткиАвторизации = 'Неудачные попытки авторизации',
  TypeПопыткиЭксплуатацииУязвимости = 'Попытки эксплуатации уязвимости',
  TypeПопыткиВнедренияВПО = 'Попытки внедрения ВПО',
  TypeПубликацияМошенническойИнформации = 'Публикация мошеннической информации',
  DDoSАтака = 'DDoS-атака',
  TypeСоциальнаяИнженерия = 'Социальная инженерия',
  TypeСетевоеСканирование = 'Сетевое сканирование',
}

export enum ActivityStatusEnum {
  TypeМерыПриняты = 'Меры приняты',
  TypeПроводятсяМероприятияПоРеагированию = 'Проводятся мероприятия по реагированию',
  TypeВозобновленыМероприятияПоРеагированию = 'Возобновлены мероприятия по реагированию',
}

/**
 * TLP:WHITE - Non-confidential; TLP:GREEN - Limiting the transmissions of communicable; TLP:AMBER - Limited distribution within the organization;  TLP:RED - Not for distribution;
 */
export enum TlpEnum {
  TLPWHITE = 'TLP:WHITE',
  TLPGREEN = 'TLP:GREEN',
  TLPAMBER = 'TLP:AMBER',
  TLPRED = 'TLP:RED',
}

export enum AffectedSystemCategoryEnum {
  TypeИнформационныйРесурсНеЯвляетсяОбъектомКИИ = 'Информационный ресурс не является объектом КИИ',
  TypeОбъектКИИБезКатегорииЗначимости = 'Объект КИИ без категории значимости',
  TypeОбъектКИИТретьейКатегорииЗначимости = 'Объект КИИ третьей категории значимости',
  TypeОбъектКИИВторойКатегорииЗначимости = 'Объект КИИ второй категории значимости',
  TypeОбъектКИИПервойКатегорииЗначимости = 'Объект КИИ первой категории значимости',
}

export enum NotificationStatusEnum {
  TypeПроверкаНКЦКИ = 'Проверка НКЦКИ',
  TypeСоздано = 'Создано',
  TypeЗарегистрировано = 'Зарегистрировано',
  TypeТребуетсяДополнение = 'Требуется дополнение',
  TypeПринятоРешение = 'Принято решение',
  TypeОтправленоВАрхив = 'Отправлено в архив',
}

export enum ImpactEffect {
  TypeВысокое = 'Высокое',
  TypeНизкое = 'Низкое',
  TypeОтсутствует = 'Отсутствует',
}

export interface NCIRCCNotifictionRetrive {
  /** @min 1 */
  id?: number;

  /**
   * PK(ID) инцидента
   * @format uuid
   */
  incident?: string;

  /** @format date-time */
  update_time?: string;

  /** @format uuid */
  uuid?: string;
  identifier?: string;
  category?: NotificationCategoryEnum;
  type?: EventTypeEnum;
  activity_status?: ActivityStatusEnum;

  /** TLP:WHITE - Non-confidential; TLP:GREEN - Limiting the transmissions of communicable; TLP:AMBER - Limited distribution within the organization;  TLP:RED - Not for distribution; */
  tlp?: TlpEnum;
  affected_system_name?: string;
  affected_system_category?: AffectedSystemCategoryEnum;
  event_description?: string;
  affected_system_connection?: boolean;
  assistance?: boolean;
  notification_status?: NotificationStatusEnum;
  vulnerability_id?: string;
  product_category?: string;
  integrity_impact?: ImpactEffect;
  availability_impact?: ImpactEffect;
  confidentiality_impact?: ImpactEffect;
  custom_impact?: string;

  /** @format date-time */
  created?: string;

  /** @format date-time */
  updated?: string;

  /** @format date-time */
  sending_time?: string;

  /**
   * Количество не прочтеных сообщений
   * @min 0
   */
  comments_count?: number;
}

export type NCIRCCNotifictionList = NCIRCCNotifictionRetrive[];

export interface NCIRCCCommentRetrieve {
  id?: number;
  text?: string;

  /** @format date-time */
  create_time?: string;
  login?: string;

  /**
   * PK(ID) Инцидента
   * @min 1
   */
  notification?: number;

  /**
   * ID сообщения на портале ГосСОПКА
   * @min 1
   */
  id_in_ncircc?: number;

  /** Отправлено ли сообщение с Консоли? */
  from_console?: boolean;
}

export type NCIRCCCommentRetrieveList = NCIRCCCommentRetrieve[];

export interface NCIRCCCommentCreate {
  text?: string;
}

export interface NCIRCCNotificationCreateBasic {
  /**
   * PK(ID) инцидента
   * @format uuid
   */
  incident?: string;
  category?: NotificationCategoryEnum;
  activity_status?: ActivityStatusEnum;

  /** TLP:WHITE - Non-confidential; TLP:GREEN - Limiting the transmissions of communicable; TLP:AMBER - Limited distribution within the organization;  TLP:RED - Not for distribution; */
  tlp?: TlpEnum;
  affected_system_name?: string;
  affected_system_category?: AffectedSystemCategoryEnum;
  event_description?: string;
  affected_system_connection?: boolean;
  assistance?: boolean;
}

export type NCIRCCNotificationCreateIncident = NCIRCCNotificationCreateBasic & {
  type?: EventTypeIncidentEnum;
  integrity_impact?: ImpactEffect;
  availability_impact?: ImpactEffect;
  confidentiality_impact?: ImpactEffect;
  custom_impact?: string;
};

export type NCIRCCNotificationCreateAttack = NCIRCCNotificationCreateBasic & {
  type?: EventTypeAttackEnum;
  integrity_impact?: ImpactEffect;
  availability_impact?: ImpactEffect;
  confidentiality_impact?: ImpactEffect;
  custom_impact?: string;
};

export type NCIRCCNotificationCreateVulnerability =
  NCIRCCNotificationCreateBasic & {
    type?: EventTypeVulnerabilityEmum;
    vulnerability_id?: string;
    product_category?: string;
  };

export interface NCIRCCNotificationUpdateBasic {
  activity_status?: ActivityStatusEnum;
  event_description?: string;
  affected_system_connection?: boolean;
  category: NotificationCategoryEnum;
  type: EventTypeEnum;
}

export type NCIRCCNotificationUpdateIncidentAttack =
  NCIRCCNotificationUpdateBasic & {
    integrity_impact?: ImpactEffect;
    availability_impact?: ImpactEffect;
    confidentiality_impact?: ImpactEffect;
    custom_impact?: string;
  };

export type NCIRCCNotificationUpdateVulnerability =
  NCIRCCNotificationUpdateBasic & {
    vulnerability_id?: string;
    product_category?: string;
  };

export interface AuthSettings {
  /**
   * @min 0
   * @max 100
   */
  login_attempts_limit?: number;

  /** Допускается только следующий формат: hh:mm:ss */
  login_block_timeout?: string;
}

export interface TLSSettings {
  enabled?: boolean;

  /** @format binary */
  certificate?: File | null;

  /** @format binary */
  key?: File | null;
}

/**
 * Тип ротации. 1 - по времени, 2 - по размеру
 */
export type RotationTypeEndpoint = 1 | 2;

/**
 * Время ротации. 1 - каждый день, 2 - каждую неделю, 3 - каждый месяц
 */
export type RotationTimeEndpoint = 1 | 2 | 3;

export interface CreateEndpoint {
  id?: number;
  create_input?: boolean;

  /**
   * @min 1500
   * @max 65535
   */
  log_port?: number;

  /** Enable device control */
  dc_enabled?: boolean;

  /** Prohibit CD/DVD access. To apply this change you need to restart host machine locally */
  prohibit_cd_access?: boolean;

  /** Enable integrity control */
  ic_enabled?: boolean;

  /** Folder for integrity control */
  scan_folders?: string[];

  /**
   * Event creation timeout. How often we can get integrity control events. Value in seconds
   * @min 0
   * @max 86400
   */
  ic_timeout?: number;

  /** Enable white list */
  wl_enable?: boolean;

  /** Local admin ignores white list */
  wl_admin?: boolean;

  /** Folder for white list */
  white_list?: string[];

  /** Enable USB control. To apply this change you need to restart host machine locally */
  usb_control_enabled?: boolean;

  /** Allowed USB devices. List of all allowed USB devices for this Endpoint */
  usb_allowed_storage?: object[];

  /** Allowed USB devices classes. List of all allowed device classes for USB control */
  usb_allowed_classes?: number[];

  /** Allowed USB devices hid subclasses */
  usb_hid_allow_other_subclasses?: boolean;

  /** Allowed USB devices hid subclasses. List of all allowed USB devices hid subclasses for USB control */
  usb_hid_allowed_subclasses?: number[];

  /** Prohibited USB devices hid subclasses. List of all blocked USB devices hid subclasses for USB control */
  usb_hid_deny_subclasses?: number[];

  /** Connected USB devices. List of all connected to Endpoint USB devices. */
  usb_connected?: object | null;

  /** Initiate antivirus scan */
  clamav_start_scan?: boolean;

  /** Initiate antivirus db update */
  clamav_update_db?: boolean;

  /** Link to data storage instance with clamav update file */
  clamav_recent_update?: number | null;

  /** Enable antivirus. Detailed Antivirus control should be configured on host machine */
  clamav_enabled?: boolean;

  /** Scan files for viruses on add */
  clamav_scan_on_add?: boolean;

  /** Scan executable files */
  clamav_live_scan?: boolean;

  /** Signal for interruption of all antivirus processes */
  clamav_stop_all_tasks?: boolean;

  /** Path for scanning */
  clamav_paths?: string[];

  /**
   * Last antivirus database update time
   * @format date-time
   */
  clamav_last_update?: string | null;

  /**
   * Last antivirus database update time
   * @format date-time
   */
  clamav_last_scan_init?: string;

  /** Remove infected files */
  clamav_remove_infected_files?: boolean;

  /** Тип ротации. 1 - по времени, 2 - по размеру */
  event_rotation_type?: RotationTypeEndpoint;

  /**
   * Event rotation size. Select the rotation size in KB
   * @min 100
   */
  event_rotation_size?: number;

  /** Время ротации. 1 - каждый день, 2 - каждую неделю, 3 - каждый месяц */
  event_rotation_period?: RotationTimeEndpoint;

  /** @max 1024 */
  event_rotation_time?: string | null;

  /** @format date-time */
  updated?: string;

  /** Device IP address */
  ip: number;

  /** Flag to mark if Endpoint logs has been changed. Check if you want to upload settings to Endpoint */
  settings_changed?: boolean;

  /** Flag to mark if config in current console has errors. Checked if config in console for Endpoint contains errors */
  incorrect_settings?: boolean;

  /** Endpoint config errors. Full list of Endpoint config errors */
  config_errors?: string[] | null;

  /** Flag to show if user wants to upload config from endpoint. If set to True, uploads config from endpoint, saves it */
  request_config?: any;

  /** Flag to show if user wants to update clamav database. If set to True, update clamav database */
  update_db?: boolean;

  /** Flag to show if config, downloaded from endpoint, has correct format. If set to False, means that last attempt to download and set up config from Endpoint has failed */
  is_requested_config_correct?: boolean;

  /** Endpoint Asset */
  endpoint_asset?: number | null;
}

export enum InputSourceType {
  Armaif = 'armaif',
  Endpoint = 'endpoint',
}

export interface InputSource {
  id?: number;
  label: string;
  type: InputSourceType;
  can_delete?: boolean;

  /**
   * @min 1500
   * @max 65535
   */
  port?: number;
}

export enum DeviceType {
  Firewall = 'firewall',
  Endpoint = 'endpoint',
  Sensor = 'sensor',
}

/**
 * Изменять ли время у событий, которые порождены устройством. 1 - у событий указывается локальное время, 2 - время возникновения не изменяется.
 */
export type AdjustDatetime = 1 | 2;

export interface FirewallStatus {
  status?: 'offline' | 'online' | 'unauthorized' | 'error';
}

export interface EndpointStatus {
  status?: 'offline' | 'online' | 'config_errors';
}

export interface Device {
  id?: number;
  name?: string;
  description?: string;
  type?: DeviceType;

  /** @format ip */
  ip?: string;

  /**
   * @min 1500
   * @max 65535
   */
  port?: number;

  /** @format datetime */
  updated?: string;
  status?: FirewallStatus | EndpointStatus;
  group?: GroupInDevice | any;
}

export interface CreateSensorDevice {
  name?: string;

  /** @format ip */
  ip?: string;

  /**
   * @min 1500
   * @max 65535
   */
  port?: number;
}

export type SensorDevice = Device & {
  uuid?: string;
  synchronization?: boolean;
  authorization_key?: string;
  span_interface?: string;
  control_interface?: object;
  signature_analysis?: boolean;
  protocols_analysis?: boolean;
};

export interface ProductVersion {
  product?: string;
  version?: string;
}

export type ArmaIndustrialFirewall = Device & {
  key?: string;
  secret?: string;
  comment?: string;
  website?: string;
  version?: string;
  remote_name?: string;
  identification_number?: string;
  hash_number?: string;
  flavour?: string;
  email?: string;
  copyright_years?: string;
  copyright_url?: string;
  copyright_owner?: string;
  architecture?: string;
  abi?: string;
  updated?: string;
};

export type EndpointDevice = Device & {
  whitelist_enabled?: boolean;
  whitelist_admin?: boolean;
  white_list_paths?: any[];
  integrity_control_enabled?: boolean;
  integrity_control_timeout?: number;
  scan_paths?: any[];
  antivirus_enabled?: boolean;
  antivirus_remove_infected_files?: boolean;
  antivirus_start_scan?: boolean;
  antivirus_paths?: any[];
  device_control_enabled?: boolean;
  prohibit_cd_access?: boolean;
  usb_control_enabled?: boolean;
  config_errors?: object;
  event_rotation_type?: RotationTypeEndpoint;
  event_rotation_size?: number;
  event_rotation_period?: RotationTimeEndpoint;
  event_rotation_time?: string | null;
};

export type DeviceGroup = NameDescriptionModel & {
  devices?: { id?: number; name?: string }[];
};

export type CreateDeviceGroup = NameDescriptionModel & { devices?: number[] };

export interface ManageService {
  service?:
    | 'correlator'
    | 'nginx'
    | 'elasticsearch'
    | 'vector'
    | 'gunicorn'
    | 'celery'
    | 'celerybeat'
    | 'postgresql';
}

export interface GroupInDevice {
  id?: number;
  name?: string;
}

export interface SensorInterface {
  interface?: string;
  addresses?: { address?: string; netmask?: string }[];
  mac?: string;
  up?: boolean;
}

export interface SensorInterfacesList {
  status?: 'ok' | 'error';
  data?: SensorInterface[];
}

export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;

export interface FullRequestParams extends Omit<RequestInit, 'body'> {
  /** set parameter to `true` for call `securityWorker` for this request */
  secure?: boolean;
  /** request path */
  path: string;
  /** content type of request body */
  type?: ContentType;
  /** query params */
  query?: QueryParamsType;
  /** format of response (i.e. response.json() -> format: "json") */
  format?: ResponseFormat;
  /** request body */
  body?: unknown;
  /** base url */
  baseUrl?: string;
  /** request cancellation token */
  cancelToken?: CancelToken;
}

export type RequestParams = Omit<
  FullRequestParams,
  'body' | 'method' | 'query' | 'path'
>;

export interface ApiConfig<SecurityDataType = unknown> {
  baseUrl?: string;
  baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
  securityWorker?: (
    securityData: SecurityDataType | null,
  ) => Promise<RequestParams | void> | RequestParams | void;
  customFetch?: typeof fetch;
}

export interface HttpResponse<D extends unknown, E extends unknown = unknown>
  extends Response {
  data: D;
  error: E;
}

type CancelToken = Symbol | string | number;

export enum ContentType {
  Json = 'application/json',
  FormData = 'multipart/form-data',
  UrlEncoded = 'application/x-www-form-urlencoded',
}

export class HttpClient<SecurityDataType = unknown> {
  public baseUrl: string = 'http://localhost:9090/en';
  private securityData: SecurityDataType | null = null;
  private securityWorker?: ApiConfig<SecurityDataType>['securityWorker'];
  private abortControllers = new Map<CancelToken, AbortController>();
  private customFetch = (...fetchParams: Parameters<typeof fetch>) =>
    fetch(...fetchParams);

  private baseApiParams: RequestParams = {
    credentials: 'same-origin',
    headers: {},
    redirect: 'follow',
    referrerPolicy: 'no-referrer',
  };

  constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
    Object.assign(this, apiConfig);
  }

  public setSecurityData = (data: SecurityDataType | null) => {
    this.securityData = data;
  };

  protected encodeQueryParam(key: string, value: any) {
    const encodedKey = encodeURIComponent(key);
    return `${encodedKey}=${encodeURIComponent(
      typeof value === 'number' ? value : `${value}`,
    )}`;
  }

  protected addQueryParam(query: QueryParamsType, key: string) {
    return this.encodeQueryParam(key, query[key]);
  }

  protected addArrayQueryParam(query: QueryParamsType, key: string) {
    const value = query[key];
    return value.map((v: any) => this.encodeQueryParam(key, v)).join('&');
  }

  protected toQueryString(rawQuery?: QueryParamsType): string {
    const query = rawQuery || {};
    const keys = Object.keys(query).filter(
      (key) => 'undefined' !== typeof query[key],
    );
    return keys
      .map((key) =>
        Array.isArray(query[key])
          ? this.addArrayQueryParam(query, key)
          : this.addQueryParam(query, key),
      )
      .join('&');
  }

  protected addQueryParams(rawQuery?: QueryParamsType): string {
    const queryString = this.toQueryString(rawQuery);
    return queryString ? `?${queryString}` : '';
  }

  private contentFormatters: Record<ContentType, (input: any) => any> = {
    [ContentType.Json]: (input: any) =>
      input !== null && (typeof input === 'object' || typeof input === 'string')
        ? JSON.stringify(input)
        : input,
    [ContentType.FormData]: (input: any) =>
      Object.keys(input || {}).reduce((formData, key) => {
        const property = input[key];
        formData.append(
          key,
          property instanceof Blob
            ? property
            : typeof property === 'object' && property !== null
            ? JSON.stringify(property)
            : `${property}`,
        );
        return formData;
      }, new FormData()),
    [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
  };

  protected mergeRequestParams(
    params1: RequestParams,
    params2?: RequestParams,
  ): RequestParams {
    return {
      ...this.baseApiParams,
      ...params1,
      ...(params2 || {}),
      headers: {
        ...(this.baseApiParams.headers || {}),
        ...(params1.headers || {}),
        ...((params2 && params2.headers) || {}),
      },
    };
  }

  protected createAbortSignal = (
    cancelToken: CancelToken,
  ): AbortSignal | undefined => {
    if (this.abortControllers.has(cancelToken)) {
      const abortController = this.abortControllers.get(cancelToken);
      if (abortController) {
        return abortController.signal;
      }
      return void 0;
    }

    const abortController = new AbortController();
    this.abortControllers.set(cancelToken, abortController);
    return abortController.signal;
  };

  public abortRequest = (cancelToken: CancelToken) => {
    const abortController = this.abortControllers.get(cancelToken);

    if (abortController) {
      abortController.abort();
      this.abortControllers.delete(cancelToken);
    }
  };

  public request = async <T = any, E = any>({
    body,
    secure,
    path,
    type,
    query,
    format,
    baseUrl,
    cancelToken,
    ...params
  }: FullRequestParams): Promise<HttpResponse<T, E>> => {
    const secureParams =
      ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&
        this.securityWorker &&
        (await this.securityWorker(this.securityData))) ||
      {};
    const requestParams = this.mergeRequestParams(params, secureParams);
    const queryString = query && this.toQueryString(query);
    const payloadFormatter = this.contentFormatters[type || ContentType.Json];
    const responseFormat = format || requestParams.format;

    return this.customFetch(
      `${baseUrl || this.baseUrl || ''}${path}${
        queryString ? `?${queryString}` : ''
      }`,
      {
        ...requestParams,
        headers: {
          ...(type && type !== ContentType.FormData
            ? { 'Content-Type': type }
            : {}),
          ...(requestParams.headers || {}),
        },
        signal: cancelToken
          ? this.createAbortSignal(cancelToken)
          : requestParams.signal,
        body:
          typeof body === 'undefined' || body === null
            ? null
            : payloadFormatter(body),
      },
    ).then(async (response) => {
      const r = response as HttpResponse<T, E>;
      r.data = null as unknown as T;
      r.error = null as unknown as E;

      const data = !responseFormat
        ? r
        : await response[responseFormat]()
            .then((data) => {
              if (r.ok) {
                r.data = data;
              } else {
                r.error = data;
              }
              return r;
            })
            .catch((e) => {
              r.error = e;
              return r;
            });

      if (cancelToken) {
        this.abortControllers.delete(cancelToken);
      }

      if (!response.ok) throw data;
      return data;
    });
  };
}

/**
 * @title ARMA Management Console API
 * @version 1.0.0
 * @baseUrl http://localhost:9090/en
 * @externalDocs https://iwarma.atlassian.net/wiki/spaces/ARMA/pages/25362443/ARMA+AMC+API
 *
 * ARMA Management Console API
 */
export class Api<
  SecurityDataType extends unknown,
> extends HttpClient<SecurityDataType> {
  api = {
    /**
     * @description Показать список инцидентов Требуемое права: `can_view_incidents_list`
     *
     * @tags incident
     * @name IncidentsList
     * @request GET:/api/incidents/
     * @secure
     */
    incidentsList: (
      query?: { page?: number; page_size?: number; assets?: string },
      params: RequestParams = {},
    ) =>
      this.request<Pagination & { results?: Incident[] }, { detail?: string }>({
        path: `/api/incidents/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Подробная информация о инциденте Требуемые права: `can_view_incidents`
     *
     * @tags incident
     * @name IncidentsDetail
     * @request GET:/api/incidents/{uuid}
     * @secure
     */
    incidentsDetail: (uuid: string, params: RequestParams = {}) =>
      this.request<Incident, { detail?: string }>({
        path: `/api/incidents/${uuid}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Обновление данных инцидента Требуемые права: `can_view_incidents`
     *
     * @tags incident
     * @name IncidentsPartialUpdate
     * @request PATCH:/api/incidents/{uuid}
     * @secure
     */
    incidentsPartialUpdate: (
      uuid: string,
      data: IncidentEdit,
      params: RequestParams = {},
    ) =>
      this.request<Incident, void | { detail?: string }>({
        path: `/api/incidents/${uuid}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Экспортирует таблицу инцидентов в новый файл хранилища и возвращает этот файл
     *
     * @tags incident
     * @name IncidentsCsvExportList
     * @request GET:/api/incidents/csv_export/
     * @secure
     */
    incidentsCsvExportList: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/api/incidents/csv_export/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список категорий инцидентов Требуемые права: `can_view_incidents_list`
     *
     * @tags incident
     * @name IncidentsCategoryList
     * @request GET:/api/incidents/category/
     * @secure
     */
    incidentsCategoryList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: NameDescriptionModel[] },
        { detail?: string }
      >({
        path: `/api/incidents/category/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Показать список эффектов инцидента
     *
     * @tags incident
     * @name IncidentsEffectsList
     * @request GET:/api/incidents/effects/
     * @secure
     */
    incidentsEffectsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: NameDescriptionModel[] },
        { detail?: string }
      >({
        path: `/api/incidents/effects/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Добавить эффект для инцидента
     *
     * @tags incident
     * @name IncidentsEffectsCreate
     * @request POST:/api/incidents/effects/
     * @secure
     */
    incidentsEffectsCreate: (
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/incidents/effects/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить эффект для инцидента по его ID
     *
     * @tags incident
     * @name IncidentsEffectsDetail
     * @request GET:/api/incidents/effects/{id}
     * @secure
     */
    incidentsEffectsDetail: (id: number, params: RequestParams = {}) =>
      this.request<NameDescriptionModel, { detail?: string }>({
        path: `/api/incidents/effects/${id}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактировать эффект инцидента
     *
     * @tags incident
     * @name IncidentsEffectsPartialUpdate
     * @request PATCH:/api/incidents/effects/{id}
     * @secure
     */
    incidentsEffectsPartialUpdate: (
      id: number,
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/incidents/effects/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить эффект инцидента
     *
     * @tags incident
     * @name IncidentsEffectsDelete
     * @request DELETE:/api/incidents/effects/{id}
     * @secure
     */
    incidentsEffectsDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/incidents/effects/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список рекоммендаций для инцидентов
     *
     * @tags incident
     * @name IncidentsRecommendationsList
     * @request GET:/api/incidents/recommendations/
     * @secure
     */
    incidentsRecommendationsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: IncidentRecommendations[] },
        { detail?: string }
      >({
        path: `/api/incidents/recommendations/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Добавить рекоммендацию для инцидента
     *
     * @tags incident
     * @name IncidentsRecommendationsCreate
     * @request POST:/api/incidents/recommendations/
     * @secure
     */
    incidentsRecommendationsCreate: (
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/incidents/recommendations/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить рекоммендацию для инцидента по его ID
     *
     * @tags incident
     * @name IncidentsRecommendationsDetail
     * @request GET:/api/incidents/recommendations/{id}
     * @secure
     */
    incidentsRecommendationsDetail: (id: number, params: RequestParams = {}) =>
      this.request<NameDescriptionModel, { detail?: string }>({
        path: `/api/incidents/recommendations/${id}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактировать рекоммендацию инцидента
     *
     * @tags incident
     * @name IncidentsRecommendationsPartialUpdate
     * @request PATCH:/api/incidents/recommendations/{id}
     * @secure
     */
    incidentsRecommendationsPartialUpdate: (
      id: number,
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/incidents/recommendations/${id}`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить рекоммендацию инцидента
     *
     * @tags incident
     * @name IncidentsRecommendationsDelete
     * @request DELETE:/api/incidents/recommendations/{id}
     * @secure
     */
    incidentsRecommendationsDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/incidents/recommendations/${id}`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список групп ассетов
     *
     * @tags asset groups
     * @name AssetsGroupsList
     * @request GET:/api/assets/groups
     * @secure
     */
    assetsGroupsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: AssetGroup[] },
        void | { detail?: string }
      >({
        path: `/api/assets/groups`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Добавить производителя
     *
     * @tags asset groups
     * @name AssetsGroupsCreate
     * @request POST:/api/assets/groups
     * @secure
     */
    assetsGroupsCreate: (data: AssetGroup, params: RequestParams = {}) =>
      this.request<AssetGroup, void | { detail?: string }>({
        path: `/api/assets/groups`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить производителя по его ID
     *
     * @tags asset groups
     * @name AssetsGroupsDetail
     * @request GET:/api/assets/groups/{id}/
     * @secure
     */
    assetsGroupsDetail: (id: number, params: RequestParams = {}) =>
      this.request<AssetGroup, { detail?: string }>({
        path: `/api/assets/groups/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактировать производителя по его ID
     *
     * @tags asset groups
     * @name AssetsGroupsPartialUpdate
     * @request PATCH:/api/assets/groups/{id}/
     * @secure
     */
    assetsGroupsPartialUpdate: (
      id: number,
      data: AssetGroup,
      params: RequestParams = {},
    ) =>
      this.request<AssetGroup, void | { detail?: string }>({
        path: `/api/assets/groups/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить производителя по его ID
     *
     * @tags asset groups
     * @name AssetsGroupsDelete
     * @request DELETE:/api/assets/groups/{id}/
     * @secure
     */
    assetsGroupsDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/assets/groups/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список доступных производителей
     *
     * @tags asset manufacturer
     * @name AssetsManufacturersList
     * @request GET:/api/assets/manufacturers
     * @secure
     */
    assetsManufacturersList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: NameDescriptionModel[] },
        void | { detail?: string }
      >({
        path: `/api/assets/manufacturers`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Доавить производителя
     *
     * @tags asset manufacturer
     * @name AssetsManufacturersCreate
     * @request POST:/api/assets/manufacturers
     * @secure
     */
    assetsManufacturersCreate: (
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/assets/manufacturers`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить производителя по его ID
     *
     * @tags asset manufacturer
     * @name AssetsManufacturerDetail
     * @request GET:/api/assets/manufacturer/{id}/
     * @secure
     */
    assetsManufacturerDetail: (id: number, params: RequestParams = {}) =>
      this.request<NameDescriptionModel, { detail?: string }>({
        path: `/api/assets/manufacturer/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактировать производителя по его ID
     *
     * @tags asset manufacturer
     * @name AssetsManufacturerPartialUpdate
     * @request PATCH:/api/assets/manufacturer/{id}/
     * @secure
     */
    assetsManufacturerPartialUpdate: (
      id: number,
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/assets/manufacturer/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить производителя по его ID
     *
     * @tags asset manufacturer
     * @name AssetsManufacturerDelete
     * @request DELETE:/api/assets/manufacturer/{id}/
     * @secure
     */
    assetsManufacturerDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/assets/manufacturer/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список доступных операционных систем
     *
     * @tags os
     * @name AssetsOsList
     * @request GET:/api/assets/os
     * @secure
     */
    assetsOsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: NameDescriptionModel[] },
        void | { detail?: string }
      >({
        path: `/api/assets/os`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Доавить ОС
     *
     * @tags os
     * @name AssetsOsCreate
     * @request POST:/api/assets/os
     * @secure
     */
    assetsOsCreate: (data: NameDescriptionModel, params: RequestParams = {}) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/assets/os`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить Операционную систему по ее ID
     *
     * @tags os
     * @name AssetsOsDetail
     * @request GET:/api/assets/os/{id}/
     * @secure
     */
    assetsOsDetail: (id: number, params: RequestParams = {}) =>
      this.request<NameDescriptionModel, { detail?: string }>({
        path: `/api/assets/os/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактировать ОС по ее ID
     *
     * @tags os
     * @name AssetsOsPartialUpdate
     * @request PATCH:/api/assets/os/{id}/
     * @secure
     */
    assetsOsPartialUpdate: (
      id: number,
      data: NameDescriptionModel,
      params: RequestParams = {},
    ) =>
      this.request<NameDescriptionModel, void | { detail?: string }>({
        path: `/api/assets/os/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить ОС по ее ID
     *
     * @tags os
     * @name AssetsOsDelete
     * @request DELETE:/api/assets/os/{id}/
     * @secure
     */
    assetsOsDelete: (id: number, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/assets/os/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Show Active List. Permisions requred: - "Can view list active";
     *
     * @tags assets
     * @name AssetsElementsList
     * @request GET:/api/assets/elements/
     * @secure
     */
    assetsElementsList: (
      query?: { page?: number; page_size?: number; incidents?: string },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: AssetList[] },
        void | { detail?: string }
      >({
        path: `/api/assets/elements/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение полной информации о запрашиваемом активе. В том числе: - Связные инциденты - ?Связные уязвимости? Связные модели возвращаются ввиде полной информации об объекте Permisions requred: - 'Can view active'
     *
     * @tags assets
     * @name AssetsElementsDetail
     * @request GET:/api/assets/elements/{id}/
     * @secure
     */
    assetsElementsDetail: (id: number, params: RequestParams = {}) =>
      this.request<AssetDetail, { detail?: string }>({
        path: `/api/assets/elements/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Patch Asset. Permisions requred: - 'Can view active'
     *
     * @tags assets
     * @name AssetsElementsPartialUpdate
     * @request PATCH:/api/assets/elements/{id}/
     * @secure
     */
    assetsElementsPartialUpdate: (
      id: number,
      data: AssetPatch,
      params: RequestParams = {},
    ) =>
      this.request<AssetBase, void | { detail?: string }>({
        path: `/api/assets/elements/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Delete Asset. Permisions requred: - 'Can delete active'
     *
     * @tags assets
     * @name AssetsElementsDelete
     * @request DELETE:/api/assets/elements/{id}/
     * @secure
     */
    assetsElementsDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/assets/elements/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags assets
     * @name AssetsElementsAuthorizeAssetsCreate
     * @request POST:/api/assets/elements/authorize_assets/
     * @secure
     */
    assetsElementsAuthorizeAssetsCreate: (
      data: { selected_assets?: number[] },
      params: RequestParams = {},
    ) =>
      this.request<void, void>({
        path: `/api/assets/elements/authorize_assets/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Экспортирует всю таблицу ассетов в новый файл хранилища и возвращает этот файл
     *
     * @tags assets
     * @name AssetsElementsCsvExportList
     * @request GET:/api/assets/elements/csv_export/
     * @secure
     */
    assetsElementsCsvExportList: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/api/assets/elements/csv_export/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Получить список не удаленных пользователей (пользователей, у которых в имени не присутсвует префикс deleted_*
     *
     * @tags users
     * @name UsersList
     * @request GET:/api/users/
     * @secure
     */
    usersList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: UserInfo[] },
        void | { detail?: string }
      >({
        path: `/api/users/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создание нового пользователя
     *
     * @tags users
     * @name UsersCreate
     * @request POST:/api/users/
     * @secure
     */
    usersCreate: (data: UserInfo, params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: UserInfo[] },
        void | { detail?: string }
      >({
        path: `/api/users/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение информации о пользователе по его ID
     *
     * @tags users
     * @name UsersDetail
     * @request GET:/api/users/{id}/
     * @secure
     */
    usersDetail: (id: number, params: RequestParams = {}) =>
      this.request<UserInfo, { detail?: string }>({
        path: `/api/users/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактирование информации о пользователе по его ID
     *
     * @tags users
     * @name UsersPartialUpdate
     * @request PATCH:/api/users/{id}/
     * @secure
     */
    usersPartialUpdate: (
      id: number,
      data: UserInfo,
      params: RequestParams = {},
    ) =>
      this.request<UserInfo, void | { detail?: string }>({
        path: `/api/users/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить пользователя (Переименовывание логина пользователя + изменение состояния is_active -> False) по его ID.
     *
     * @tags users
     * @name UsersDelete
     * @request DELETE:/api/users/{id}/
     * @secure
     */
    usersDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/users/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получение информации об авторизаванном пользователе
     *
     * @tags users
     * @name UsersWhoamiList
     * @request GET:/api/users/whoami/
     * @secure
     */
    usersWhoamiList: (params: RequestParams = {}) =>
      this.request<User, { detail?: string }>({
        path: `/api/users/whoami/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Список файлов в хранилище
     *
     * @tags store
     * @name StoreList
     * @request GET:/api/store/
     * @secure
     */
    storeList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: StorageList[] },
        void | { detail?: string }
      >({
        path: `/api/store/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получения полной информации об одном файле Требуемые права: - 'Can view storage'
     *
     * @tags store
     * @name StoreDetail
     * @request GET:/api/store/{id}/
     * @secure
     */
    storeDetail: (id: number, params: RequestParams = {}) =>
      this.request<Storage, { detail?: string }>({
        path: `/api/store/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удаления файла
     *
     * @tags store
     * @name StoreDelete
     * @request DELETE:/api/store/{id}/
     * @secure
     */
    storeDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/store/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Скачивание файла
     *
     * @tags store
     * @name StoreDownloadDetail
     * @request GET:/api/store/{id}/download/
     * @secure
     */
    storeDownloadDetail: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/store/${id}/download/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Обновление антивируса
     *
     * @tags store
     * @name StoreAntivirusCreate
     * @request POST:/api/store/antivirus/
     * @secure
     */
    storeAntivirusCreate: (data: { file: File }, params: RequestParams = {}) =>
      this.request<{ status?: string }, { detail?: string }>({
        path: `/api/store/antivirus/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * @description Аутентификация в системе по сессии
     *
     * @tags authorization
     * @name LoginCreate
     * @request POST:/api/login/
     * @secure
     */
    loginCreate: (data: LoginRequest, params: RequestParams = {}) =>
      this.request<void, void>({
        path: `/api/login/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Необходимо быть авторизованным
     *
     * @tags authorization
     * @name LogoutCreate
     * @request POST:/api/logout/
     * @secure
     */
    logoutCreate: (params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/logout/`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * @description Получение информации о лицензии
     *
     * @tags license
     * @name LicenseList
     * @request GET:/api/license/
     * @secure
     */
    licenseList: (params: RequestParams = {}) =>
      this.request<LicenseInfo, { detail?: string }>({
        path: `/api/license/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Автоматическая активация лицензии
     *
     * @tags license
     * @name LicenseAutoDetail
     * @request GET:/api/license/auto/{uuid}
     * @secure
     */
    licenseAutoDetail: (uuid: string, params: RequestParams = {}) =>
      this.request<LicenseActivateSuccess, { detail?: string }>({
        path: `/api/license/auto/${uuid}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение токена для генерации лицензионного ключа
     *
     * @tags license
     * @name LicenseTokenDetail
     * @request GET:/api/license/token/{uuid}
     * @secure
     */
    licenseTokenDetail: (uuid: string, params: RequestParams = {}) =>
      this.request<LicenseToken, { detail?: string }>({
        path: `/api/license/token/${uuid}`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Ручная активация лицензии
     *
     * @tags license
     * @name LicenseManualCreate
     * @request POST:/api/license/manual/
     * @secure
     */
    licenseManualCreate: (data: { file: string }, params: RequestParams = {}) =>
      this.request<LicenseActivateSuccess, { detail?: string }>({
        path: `/api/license/manual/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: 'json',
        ...params,
      }),

    /**
     * @description Задаёт новые настройки ротации событий. Permisions requred: - can_change_rotation_settings <br> `size_rotation` указывает количество событий, при котором будет выполнена ротация
     *
     * @tags rotation
     * @name RotationEventsSetCreate
     * @request POST:/api/rotation/events/set/
     * @secure
     */
    rotationEventsSetCreate: (
      data: TimeRotationSettings | SizeRotationSettings,
      params: RequestParams = {},
    ) =>
      this.request<RotationSettings, void | { detail?: string }>({
        path: `/api/rotation/events/set/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Задаёт новые настройки ротации инцидентов. Permisions requred: - can_change_rotation_settings <br> `size_rotation` указывает размер таблицы инцидентов, при котором будет выполнена ротация
     *
     * @tags rotation
     * @name RotationIncidentsSetCreate
     * @request POST:/api/rotation/incidents/set/
     * @secure
     */
    rotationIncidentsSetCreate: (
      data: TimeRotationSettings | SizeRotationSettings,
      params: RequestParams = {},
    ) =>
      this.request<RotationSettings, void | { detail?: string }>({
        path: `/api/rotation/incidents/set/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить текущие настройки ротации инцидентов. Permisions requred: - can_change_rotation_settings
     *
     * @tags rotation
     * @name RotationIncidentsCurrentSettingsList
     * @request GET:/api/rotation/incidents/current_settings/
     * @secure
     */
    rotationIncidentsCurrentSettingsList: (params: RequestParams = {}) =>
      this.request<RotationSettings, { detail?: string }>({
        path: `/api/rotation/incidents/current_settings/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получить текущие настройки ротации событий. Permisions requred: - can_change_rotation_settings
     *
     * @tags rotation
     * @name RotationEventsCurrentSettingsList
     * @request GET:/api/rotation/events/current_settings/
     * @secure
     */
    rotationEventsCurrentSettingsList: (params: RequestParams = {}) =>
      this.request<RotationSettings, { detail?: string }>({
        path: `/api/rotation/events/current_settings/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение списка эвентов по Index
     *
     * @tags events
     * @name EventsElasticQueryDetail
     * @request GET:/api/events/elastic/query/{index}
     * @secure
     */
    eventsElasticQueryDetail: (
      index: string,
      query?: {
        page?: number;
        page_size?: number;
        q?: string;
        ordering?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        EventListbyIndex,
        | { status?: string; error_message?: string | any[] }
        | { detail?: string }
      >({
        path: `/api/events/elastic/query/${index}`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение списка всех индекосов или по патерну
     *
     * @tags events
     * @name EventsElasticAllIndexesList
     * @request GET:/api/events/elastic/all-indexes/
     * @secure
     */
    eventsElasticAllIndexesList: (
      query?: { index?: string },
      params: RequestParams = {},
    ) =>
      this.request<
        EventIndexList,
        | { status?: string; error_message?: string | any[] }
        | { detail?: string }
      >({
        path: `/api/events/elastic/all-indexes/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение данных компании
     *
     * @tags company
     * @name CompanyList
     * @request GET:/api/company/
     * @secure
     */
    companyList: (params: RequestParams = {}) =>
      this.request<Company | { details?: string }, { detail?: string }>({
        path: `/api/company/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создание и обновление компании
     *
     * @tags company
     * @name CompanyCreate
     * @request POST:/api/company/
     * @secure
     */
    companyCreate: (data: CompanyCreateUpdate, params: RequestParams = {}) =>
      this.request<Company, void | { detail?: string }>({
        path: `/api/company/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получения списка кодов локаций
     *
     * @tags company
     * @name CompanyLocationsList
     * @request GET:/api/company/locations/
     * @secure
     */
    companyLocationsList: (params: RequestParams = {}) =>
      this.request<LocationCodeList, { detail?: string }>({
        path: `/api/company/locations/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение списка отправленных инцидентов
     *
     * @tags ncircc
     * @name NcirccNotificationsList
     * @request GET:/api/ncircc/notifications/
     * @secure
     */
    ncirccNotificationsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<
        Pagination & { results?: NCIRCCNotifictionList[] },
        { detail?: string }
      >({
        path: `/api/ncircc/notifications/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Отправка инцидента в ГосСОПКА
     *
     * @tags ncircc
     * @name NcirccNotificationsCreate
     * @request POST:/api/ncircc/notifications/
     * @secure
     */
    ncirccNotificationsCreate: (
      data:
        | NCIRCCNotificationCreateIncident
        | NCIRCCNotificationCreateAttack
        | NCIRCCNotificationCreateVulnerability,
      params: RequestParams = {},
    ) =>
      this.request<NCIRCCNotifictionRetrive, void | { detail?: string }>({
        path: `/api/ncircc/notifications/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение отправленного уведомления по ID
     *
     * @tags ncircc
     * @name NcirccNotificationsDetail
     * @request GET:/api/ncircc/notifications/{id}/
     * @secure
     */
    ncirccNotificationsDetail: (id: number, params: RequestParams = {}) =>
      this.request<NCIRCCNotifictionRetrive, { detail?: string }>({
        path: `/api/ncircc/notifications/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Обновление информации в ГосСОПКА
     *
     * @tags ncircc
     * @name NcirccNotificationsPartialUpdate
     * @request PATCH:/api/ncircc/notifications/{id}/
     * @secure
     */
    ncirccNotificationsPartialUpdate: (
      id: number,
      data:
        | NCIRCCNotificationUpdateIncidentAttack
        | NCIRCCNotificationUpdateIncidentAttack
        | NCIRCCNotificationUpdateVulnerability,
      params: RequestParams = {},
    ) =>
      this.request<NCIRCCNotifictionRetrive, void | { detail?: string }>({
        path: `/api/ncircc/notifications/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение списка сообщений по ID уведомления
     *
     * @tags ncircc
     * @name NcirccNotificationsCommentsDetail
     * @request GET:/api/ncircc/notifications/{id}/comments/
     * @secure
     */
    ncirccNotificationsCommentsDetail: (
      id: number,
      params: RequestParams = {},
    ) =>
      this.request<NCIRCCCommentRetrieveList, { detail?: string }>({
        path: `/api/ncircc/notifications/${id}/comments/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Отправка сообщения на портал ГосСОПКА
     *
     * @tags ncircc
     * @name NcirccNotificationsCommentsCreate
     * @request POST:/api/ncircc/notifications/{id}/comments/
     * @secure
     */
    ncirccNotificationsCommentsCreate: (
      id: number,
      data: NCIRCCCommentCreate,
      params: RequestParams = {},
    ) =>
      this.request<NCIRCCCommentRetrieve, void | { detail?: string }>({
        path: `/api/ncircc/notifications/${id}/comments/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение списка правил корреляции
     *
     * @tags correlation
     * @name CorrelationRulesList
     * @request GET:/api/correlation/rules/
     * @secure
     */
    correlationRulesList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<Pagination & { results?: Rule[] }, { detail?: string }>({
        path: `/api/correlation/rules/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Добавление нового правила корреляции
     *
     * @tags correlation
     * @name CorrelationRulesCreate
     * @request POST:/api/correlation/rules/
     * @secure
     */
    correlationRulesCreate: (data: Rule, params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: Rule[] },
        void | { detail?: string }
      >({
        path: `/api/correlation/rules/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение информации о правиле корреляции по его ID
     *
     * @tags correlation
     * @name CorrelationRulesDetail
     * @request GET:/api/correlation/rules/{id}/
     * @secure
     */
    correlationRulesDetail: (id: number, params: RequestParams = {}) =>
      this.request<Rule, { detail?: string }>({
        path: `/api/correlation/rules/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактироваие правила корреляции по его ID
     *
     * @tags correlation
     * @name CorrelationRulesUpdate
     * @request PUT:/api/correlation/rules/{id}/
     * @secure
     */
    correlationRulesUpdate: (
      id: number,
      data: Rule,
      params: RequestParams = {},
    ) =>
      this.request<Rule, void | { detail?: string }>({
        path: `/api/correlation/rules/${id}/`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить правило корреляции
     *
     * @tags correlation
     * @name CorrelationRulesDelete
     * @request DELETE:/api/correlation/rules/{id}/
     * @secure
     */
    correlationRulesDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/correlation/rules/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получение списка групп правил корреляции
     *
     * @tags correlation
     * @name CorrelationGroupsList
     * @request GET:/api/correlation/groups/
     * @secure
     */
    correlationGroupsList: (
      query?: { page?: number; page_size?: number },
      params: RequestParams = {},
    ) =>
      this.request<Pagination & { results?: RuleGroup[] }, { detail?: string }>(
        {
          path: `/api/correlation/groups/`,
          method: 'GET',
          query: query,
          secure: true,
          format: 'json',
          ...params,
        },
      ),

    /**
     * @description Добавление новой группы правил корреляции
     *
     * @tags correlation
     * @name CorrelationGroupsCreate
     * @request POST:/api/correlation/groups/
     * @secure
     */
    correlationGroupsCreate: (data: RuleGroup, params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: RuleGroup[] },
        void | { detail?: string }
      >({
        path: `/api/correlation/groups/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение информации о группе правил корреляции по его ID
     *
     * @tags correlation
     * @name CorrelationGroupsDetail
     * @request GET:/api/correlation/groups/{id}/
     * @secure
     */
    correlationGroupsDetail: (id: number, params: RequestParams = {}) =>
      this.request<RuleGroup, { detail?: string }>({
        path: `/api/correlation/groups/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактироваие группы правил корреляции по его ID
     *
     * @tags correlation
     * @name CorrelationGroupsUpdate
     * @request PUT:/api/correlation/groups/{id}/
     * @secure
     */
    correlationGroupsUpdate: (
      id: number,
      data: RuleGroup,
      params: RequestParams = {},
    ) =>
      this.request<RuleGroup, void | { detail?: string }>({
        path: `/api/correlation/groups/${id}/`,
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Удалить группу правила корреляции
     *
     * @tags correlation
     * @name CorrelationGroupsDelete
     * @request DELETE:/api/correlation/groups/{id}/
     * @secure
     */
    correlationGroupsDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/correlation/groups/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Импорт правил корреляции
     *
     * @tags correlation
     * @name CorrelationRulesImportRulesCreate
     * @request POST:/api/correlation/rules/import_rules/
     * @secure
     */
    correlationRulesImportRulesCreate: (
      data: object,
      params: RequestParams = {},
    ) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/correlation/rules/import_rules/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.FormData,
        ...params,
      }),

    /**
     * @description Экспортирует таблицу правил корреляции в новый файл хранилища и возвращает этот файл
     *
     * @tags correlation
     * @name CorrelationRulesJsonExportList
     * @request GET:/api/correlation/rules/json_export/
     * @secure
     */
    correlationRulesJsonExportList: (params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/correlation/rules/json_export/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags settings
     * @name SettingsAuthList
     * @request GET:/api/settings/auth/
     * @secure
     */
    settingsAuthList: (params: RequestParams = {}) =>
      this.request<AuthSettings, any>({
        path: `/api/settings/auth/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags settings
     * @name SettingsAuthPartialUpdate
     * @request PATCH:/api/settings/auth/
     * @secure
     */
    settingsAuthPartialUpdate: (
      data: AuthSettings,
      params: RequestParams = {},
    ) =>
      this.request<AuthSettings, void | { detail?: string }>({
        path: `/api/settings/auth/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Текущие настройки TLS
     *
     * @tags settings
     * @name SettingsTlsList
     * @request GET:/api/settings/tls/
     * @secure
     */
    settingsTlsList: (params: RequestParams = {}) =>
      this.request<TLSSettings, any>({
        path: `/api/settings/tls/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создать новый сертификат
     *
     * @tags settings
     * @name SettingsTlsCreate
     * @request POST:/api/settings/tls/
     * @secure
     */
    settingsTlsCreate: (params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/settings/tls/`,
        method: 'POST',
        secure: true,
        ...params,
      }),

    /**
     * @description Обновить настройки
     *
     * @tags settings
     * @name SettingsTlsPartialUpdate
     * @request PATCH:/api/settings/tls/
     * @secure
     */
    settingsTlsPartialUpdate: (data: TLSSettings, params: RequestParams = {}) =>
      this.request<TLSSettings, void | { detail?: string }>({
        path: `/api/settings/tls/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение всех endpoint
     *
     * @tags endpoint
     * @name EndpointList
     * @request GET:/api/endpoint/
     * @secure
     */
    endpointList: (params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: EndpointDevice[] },
        { detail?: string }
      >({
        path: `/api/endpoint/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создание endpoint
     *
     * @tags endpoint
     * @name EndpointCreate
     * @request POST:/api/endpoint/
     * @secure
     */
    endpointCreate: (data: EndpointDevice, params: RequestParams = {}) =>
      this.request<EndpointDevice, void | { detail?: string }>({
        path: `/api/endpoint/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение информации об endpoint
     *
     * @tags endpoint
     * @name EndpointDetail
     * @request GET:/api/endpoint/{id}/
     * @secure
     */
    endpointDetail: (id: number, params: RequestParams = {}) =>
      this.request<EndpointDevice, { detail?: string }>({
        path: `/api/endpoint/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Изменение endpoint
     *
     * @tags endpoint
     * @name EndpointPartialUpdate
     * @request PATCH:/api/endpoint/{id}/
     * @secure
     */
    endpointPartialUpdate: (
      id: number,
      data: EndpointDevice,
      params: RequestParams = {},
    ) =>
      this.request<CreateEndpoint, void | { detail?: string }>({
        path: `/api/endpoint/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Creating copy of the endpoint with input if it exist
     *
     * @tags endpoint
     * @name EndpointKeepaliveDetail
     * @request GET:/api/endpoint/{id}/keepalive/
     * @secure
     */
    endpointKeepaliveDetail: (id: number, params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/api/endpoint/${id}/keepalive/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Download endpoint settings
     *
     * @tags endpoint
     * @name EndpointDownloadDetail
     * @request GET:/api/endpoint/{id}/download/
     * @secure
     */
    endpointDownloadDetail: (id: number, params: RequestParams = {}) =>
      this.request<File, { detail?: string }>({
        path: `/api/endpoint/${id}/download/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description respond with current Endpoint states
     *
     * @tags endpoint
     * @name EndpointStatusDetail
     * @request GET:/api/endpoint/{id}/status/
     * @secure
     */
    endpointStatusDetail: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/endpoint/${id}/status/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description update Endpoint model from received Endpoint config
     *
     * @tags endpoint
     * @name EndpointUploadCreate
     * @request POST:/api/endpoint/{id}/upload/
     * @secure
     */
    endpointUploadCreate: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/endpoint/${id}/upload/`,
        method: 'POST',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags endpoint
     * @name EndpointConfigRequestDetail
     * @request GET:/api/endpoint/{id}/config_request/
     * @secure
     */
    endpointConfigRequestDetail: (id: number, params: RequestParams = {}) =>
      this.request<{ status?: string }, { detail?: string }>({
        path: `/api/endpoint/${id}/config_request/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags endpoint
     * @name EndpointAntivirusUpdateDetail
     * @request GET:/api/endpoint/{id}/antivirus_update/
     * @secure
     */
    endpointAntivirusUpdateDetail: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/endpoint/${id}/antivirus_update/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Все источники событий
     *
     * @tags inputs
     * @name InputsList
     * @request GET:/api/inputs/
     * @secure
     */
    inputsList: (params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: InputSource[] },
        void | { detail?: string }
      >({
        path: `/api/inputs/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создание источника событий
     *
     * @tags inputs
     * @name InputsCreate
     * @request POST:/api/inputs/
     * @secure
     */
    inputsCreate: (data: InputSource, params: RequestParams = {}) =>
      this.request<InputSource, void | { detail?: string }>({
        path: `/api/inputs/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение одного источника
     *
     * @tags inputs
     * @name InputsDetail
     * @request GET:/api/inputs/{id}/
     * @secure
     */
    inputsDetail: (id: number, params: RequestParams = {}) =>
      this.request<InputSource, { detail?: string }>({
        path: `/api/inputs/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Изменение источника
     *
     * @tags inputs
     * @name InputsPartialUpdate
     * @request PATCH:/api/inputs/{id}/
     * @secure
     */
    inputsPartialUpdate: (
      id: number,
      data: InputSource & { type?: any },
      params: RequestParams = {},
    ) =>
      this.request<InputSource, void | { detail?: string }>({
        path: `/api/inputs/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags inputs
     * @name InputsDelete
     * @request DELETE:/api/inputs/{id}/
     * @secure
     */
    inputsDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/inputs/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Получение списка устройств. Всё вперемешку - AIF, AIE и другие.
     *
     * @tags devices
     * @name DevicesList
     * @request GET:/api/devices/
     * @secure
     */
    devicesList: (query?: { search?: string }, params: RequestParams = {}) =>
      this.request<Pagination & { results?: Device[] }, { detail?: string }>({
        path: `/api/devices/`,
        method: 'GET',
        query: query,
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Экспортирует всю таблицу устройств в новый файл хранилища и возвращает этот файл
     *
     * @tags devices
     * @name DevicesCsvExportList
     * @request GET:/api/devices/csv_export
     * @secure
     */
    devicesCsvExportList: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/api/devices/csv_export`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Получение базовой информации об устройстве
     *
     * @tags devices
     * @name DevicesDetail
     * @request GET:/api/devices/{id}/
     * @secure
     */
    devicesDetail: (id: number, params: RequestParams = {}) =>
      this.request<Device, { detail?: string }>({
        path: `/api/devices/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактирование устройства
     *
     * @tags devices
     * @name DevicesPartialUpdate
     * @request PATCH:/api/devices/{id}/
     * @secure
     */
    devicesPartialUpdate: (
      id: number,
      data: Device,
      params: RequestParams = {},
    ) =>
      this.request<Device, { detail?: string }>({
        path: `/api/devices/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags devices
     * @name DevicesDelete
     * @request DELETE:/api/devices/{id}/
     * @secure
     */
    devicesDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/devices/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * @description Список групп устройств
     *
     * @tags devices
     * @name DevicesGroupsList
     * @request GET:/api/devices/groups/
     * @secure
     */
    devicesGroupsList: (params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: DeviceGroup[] },
        { detail?: string }
      >({
        path: `/api/devices/groups/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Создание группы устройств
     *
     * @tags devices
     * @name DevicesGroupsCreate
     * @request POST:/api/devices/groups/
     * @secure
     */
    devicesGroupsCreate: (
      data: CreateDeviceGroup,
      params: RequestParams = {},
    ) =>
      this.request<DeviceGroup, { detail?: string }>({
        path: `/api/devices/groups/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Группа устройств
     *
     * @tags devices
     * @name DevicesGroupsDetail
     * @request GET:/api/devices/groups/{id}/
     * @secure
     */
    devicesGroupsDetail: (id: number, params: RequestParams = {}) =>
      this.request<DeviceGroup, { detail?: string }>({
        path: `/api/devices/groups/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * @description Редактирование группы устройств
     *
     * @tags devices
     * @name DevicesGroupsPartialUpdate
     * @request PATCH:/api/devices/groups/{id}/
     * @secure
     */
    devicesGroupsPartialUpdate: (
      id: number,
      data: CreateDeviceGroup,
      params: RequestParams = {},
    ) =>
      this.request<DeviceGroup, { detail?: string }>({
        path: `/api/devices/groups/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags devices
     * @name DevicesGroupsDelete
     * @request DELETE:/api/devices/groups/{id}/
     * @secure
     */
    devicesGroupsDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/devices/groups/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallList
     * @request GET:/api/devices/firewall/
     * @secure
     */
    devicesFirewallList: (params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: ArmaIndustrialFirewall[] },
        { detail?: string }
      >({
        path: `/api/devices/firewall/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallCreate
     * @request POST:/api/devices/firewall/
     * @secure
     */
    devicesFirewallCreate: (
      data: ArmaIndustrialFirewall,
      params: RequestParams = {},
    ) =>
      this.request<ArmaIndustrialFirewall, void | { detail?: string }>({
        path: `/api/devices/firewall/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallDetail
     * @request GET:/api/devices/firewall/{id}/
     * @secure
     */
    devicesFirewallDetail: (id: number, params: RequestParams = {}) =>
      this.request<ArmaIndustrialFirewall, { detail?: string }>({
        path: `/api/devices/firewall/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallPartialUpdate
     * @request PATCH:/api/devices/firewall/{id}/
     * @secure
     */
    devicesFirewallPartialUpdate: (
      id: number,
      data: ArmaIndustrialFirewall,
      params: RequestParams = {},
    ) =>
      this.request<ArmaIndustrialFirewall, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallDelete
     * @request DELETE:/api/devices/firewall/{id}/
     * @secure
     */
    devicesFirewallDelete: (id: number, params: RequestParams = {}) =>
      this.request<any, { detail?: string }>({
        path: `/api/devices/firewall/${id}/`,
        method: 'DELETE',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallStatusDetail
     * @request GET:/api/devices/firewall/{id}/status/
     * @secure
     */
    devicesFirewallStatusDetail: (id: number, params: RequestParams = {}) =>
      this.request<void, { detail?: string }>({
        path: `/api/devices/firewall/${id}/status/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallRebootCreate
     * @request POST:/api/devices/firewall/{id}/reboot/
     * @secure
     */
    devicesFirewallRebootCreate: (id: number, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/reboot/`,
        method: 'POST',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallRuleFieldsDetail
     * @request GET:/api/devices/firewall/{id}/rule_fields/
     * @secure
     */
    devicesFirewallRuleFieldsDetail: (id: number, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/rule_fields/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallDownloadConfigDetail
     * @request GET:/api/devices/firewall/{id}/download_config/
     * @secure
     */
    devicesFirewallDownloadConfigDetail: (
      id: number,
      params: RequestParams = {},
    ) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/download_config/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags firewall
     * @name DevicesFirewallDownloadRulesetsDetail
     * @request GET:/api/devices/firewall/{id}/download_rulesets/
     * @secure
     */
    devicesFirewallDownloadRulesetsDetail: (
      id: number,
      params: RequestParams = {},
    ) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/download_rulesets/`,
        method: 'GET',
        secure: true,
        ...params,
      }),

    /**
     * @description Отправка файла конфигурации на firewall
     *
     * @tags firewall
     * @name DevicesFirewallUploadConfigCreate
     * @request POST:/api/devices/firewall/{id}/upload_config/
     * @secure
     */
    devicesFirewallUploadConfigCreate: (
      id: number,
      data: { conffile?: File },
      params: RequestParams = {},
    ) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/upload_config/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: 'json',
        ...params,
      }),

    /**
     * @description Отправка архива со списком новых правил на firewall. При успешном ответе указывается количество успешно загруженных и количество не загруженных
     *
     * @tags firewall
     * @name DevicesFirewallUploadRulesetsCreate
     * @request POST:/api/devices/firewall/{id}/upload_rulesets/
     * @secure
     */
    devicesFirewallUploadRulesetsCreate: (
      id: number,
      data: { rulesets?: File },
      params: RequestParams = {},
    ) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/devices/firewall/${id}/upload_rulesets/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorList
     * @request GET:/api/devices/sensor/
     * @secure
     */
    devicesSensorList: (params: RequestParams = {}) =>
      this.request<
        Pagination & { results?: SensorDevice[] },
        { detail?: string }
      >({
        path: `/api/devices/sensor/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorCreate
     * @request POST:/api/devices/sensor/
     * @secure
     */
    devicesSensorCreate: (
      data: CreateSensorDevice,
      params: RequestParams = {},
    ) =>
      this.request<SensorDevice, void | { detail?: string }>({
        path: `/api/devices/sensor/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorDetail
     * @request GET:/api/devices/sensor/{id}/
     * @secure
     */
    devicesSensorDetail: (id: number, params: RequestParams = {}) =>
      this.request<SensorDevice, { detail?: string }>({
        path: `/api/devices/sensor/${id}/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorPartialUpdate
     * @request PATCH:/api/devices/sensor/{id}/
     * @secure
     */
    devicesSensorPartialUpdate: (
      id: number,
      data: SensorDevice,
      params: RequestParams = {},
    ) =>
      this.request<SensorDevice, void | { detail?: string }>({
        path: `/api/devices/sensor/${id}/`,
        method: 'PATCH',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorDelete
     * @request DELETE:/api/devices/sensor/{id}/
     * @secure
     */
    devicesSensorDelete: (id: number, params: RequestParams = {}) =>
      this.request<SensorDevice, void | { detail?: string }>({
        path: `/api/devices/sensor/${id}/`,
        method: 'DELETE',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags sensor
     * @name DevicesSensorSystemInterfacesDetail
     * @request GET:/api/devices/sensor/{id}/system/interfaces/
     * @secure
     */
    devicesSensorSystemInterfacesDetail: (
      id: number,
      params: RequestParams = {},
    ) =>
      this.request<SensorInterfacesList, { detail?: string }>({
        path: `/api/devices/sensor/${id}/system/interfaces/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags services
     * @name ServicesStatusCreate
     * @request POST:/api/services/status/
     * @secure
     */
    servicesStatusCreate: (data: ManageService, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/services/status/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * No description
     *
     * @tags services
     * @name ServicesRebootCreate
     * @request POST:/api/services/reboot/
     * @secure
     */
    servicesRebootCreate: (data: ManageService, params: RequestParams = {}) =>
      this.request<void, void | { detail?: string }>({
        path: `/api/services/reboot/`,
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params,
      }),

    /**
     * @description Получение информации о продукте (наименование и версию)
     *
     * @tags product
     * @name ProductVersionList
     * @request GET:/api/product/version/
     * @secure
     */
    productVersionList: (params: RequestParams = {}) =>
      this.request<ProductVersion, { detail?: string }>({
        path: `/api/product/version/`,
        method: 'GET',
        secure: true,
        format: 'json',
        ...params,
      }),
  };
}
