{
  "files": [
    {
      "name": "deviceapis/device/v1/deviceapis_device_ftp_v1.proto",
      "description": "Сервис управления настройками FTP",
      "package": "deviceapis.device.v1",
      "hasEnums": false,
      "hasExtensions": false,
      "hasMessages": true,
      "hasServices": true,
      "enums": [],
      "extensions": [],
      "messages": [
        {
          "name": "EditFtpRequest",
          "longName": "EditFtpRequest",
          "fullName": "deviceapis.device.v1.EditFtpRequest",
          "description": "Запрос редактирования настроек FTP",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "data",
              "description": "Настройки FTP",
              "label": "",
              "type": "Ftp",
              "longType": "Ftp",
              "fullType": "deviceapis.device.v1.Ftp",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "update_mask",
              "description": "Маска полей обновления",
              "label": "",
              "type": "FieldMask",
              "longType": "google.protobuf.FieldMask",
              "fullType": "google.protobuf.FieldMask",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 2
            }
          ]
        },
        {
          "name": "EditFtpResponse",
          "longName": "EditFtpResponse",
          "fullName": "deviceapis.device.v1.EditFtpResponse",
          "description": "Ответ на запрос редактирования настроек FTP",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "data",
              "description": "Настройки FTP",
              "label": "",
              "type": "Ftp",
              "longType": "Ftp",
              "fullType": "deviceapis.device.v1.Ftp",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "EditFtpResponse.Error",
              "fullType": "deviceapis.device.v1.EditFtpResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 2
            }
          ]
        },
        {
          "name": "Error",
          "longName": "EditFtpResponse.Error",
          "fullName": "deviceapis.device.v1.EditFtpResponse.Error",
          "description": "Ошибка запроса",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "deviceapis.device.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Ftp",
          "longName": "Ftp",
          "fullName": "deviceapis.device.v1.Ftp",
          "description": "Настройки FTP",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "reg_server_address",
              "description": "Адрес FTP сервера.\nСетевой адрес и порт.\nПример: 192.168.0.1:21, ftp.acme.io:21",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "login",
              "description": "Логин",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "password",
              "description": "Пароль.\nНе возвращается с сервера.\nTODO: в генерации сваггера не показывать INPUT_ONLY поля в ответах",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "INPUT_ONLY"
                  ]
                }
              },
              "number": 3
            }
          ]
        },
        {
          "name": "GetFtpRequest",
          "longName": "GetFtpRequest",
          "fullName": "deviceapis.device.v1.GetFtpRequest",
          "description": "Запрос получения настроек FTP",
          "hasExtensions": false,
          "hasFields": false,
          "hasOneofs": false,
          "extensions": [],
          "fields": []
        },
        {
          "name": "GetFtpResponse",
          "longName": "GetFtpResponse",
          "fullName": "deviceapis.device.v1.GetFtpResponse",
          "description": "Ответ на запрос получения настроек FTP",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "data",
              "description": "Настройки FTP",
              "label": "",
              "type": "Ftp",
              "longType": "Ftp",
              "fullType": "deviceapis.device.v1.Ftp",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "PostFtpBackupApplyRequest",
          "longName": "PostFtpBackupApplyRequest",
          "fullName": "deviceapis.device.v1.PostFtpBackupApplyRequest",
          "description": "Запрос применения бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "ftp_path",
              "description": "Имя FTP папки",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "file_name",
              "description": "Имя файла бекапа",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            },
            {
              "name": "restore_options",
              "description": "Опции восстановления",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 3
            }
          ]
        },
        {
          "name": "PostFtpBackupApplyResponse",
          "longName": "PostFtpBackupApplyResponse",
          "fullName": "deviceapis.device.v1.PostFtpBackupApplyResponse",
          "description": "Ответ на запрос применения бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostFtpBackupApplyResponse.Error",
              "fullType": "deviceapis.device.v1.PostFtpBackupApplyResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostFtpBackupApplyResponse.Error",
          "fullName": "deviceapis.device.v1.PostFtpBackupApplyResponse.Error",
          "description": "Ошибка запроса создания бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "deviceapis.device.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "PostFtpBackupRequest",
          "longName": "PostFtpBackupRequest",
          "fullName": "deviceapis.device.v1.PostFtpBackupRequest",
          "description": "Запрос создания бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "ftp_path",
              "description": "Имя FTP папки",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "file_name",
              "description": "Имя файла бекапа",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            },
            {
              "name": "backup_type",
              "description": "Тип бекапа",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 3
            }
          ]
        },
        {
          "name": "PostFtpBackupResponse",
          "longName": "PostFtpBackupResponse",
          "fullName": "deviceapis.device.v1.PostFtpBackupResponse",
          "description": "Ответ на запрос создания бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostFtpBackupResponse.Error",
              "fullType": "deviceapis.device.v1.PostFtpBackupResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostFtpBackupResponse.Error",
          "fullName": "deviceapis.device.v1.PostFtpBackupResponse.Error",
          "description": "Ошибка запроса создания бекапа",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "deviceapis.device.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        }
      ],
      "services": [
        {
          "name": "FtpService",
          "longName": "FtpService",
          "fullName": "deviceapis.device.v1.FtpService",
          "description": "Сервис управления настройками FTP",
          "methods": [
            {
              "name": "EditFtp",
              "description": "Метод редактирования настроек FTP",
              "requestType": "EditFtpRequest",
              "requestLongType": "EditFtpRequest",
              "requestFullType": "deviceapis.device.v1.EditFtpRequest",
              "requestStreaming": false,
              "responseType": "EditFtpResponse",
              "responseLongType": "EditFtpResponse",
              "responseFullType": "deviceapis.device.v1.EditFtpResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "PATCH",
                      "pattern": "/device/api/v1/ftp",
                      "body": "data"
                    }
                  ]
                }
              }
            },
            {
              "name": "GetFtp",
              "description": "Метод получения настроек FTP",
              "requestType": "GetFtpRequest",
              "requestLongType": "GetFtpRequest",
              "requestFullType": "deviceapis.device.v1.GetFtpRequest",
              "requestStreaming": false,
              "responseType": "GetFtpResponse",
              "responseLongType": "GetFtpResponse",
              "responseFullType": "deviceapis.device.v1.GetFtpResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "GET",
                      "pattern": "/device/api/v1/ftp"
                    }
                  ]
                }
              }
            },
            {
              "name": "PostFtpBackup",
              "description": "Создать бэкап и положить на FTP папку",
              "requestType": "PostFtpBackupRequest",
              "requestLongType": "PostFtpBackupRequest",
              "requestFullType": "deviceapis.device.v1.PostFtpBackupRequest",
              "requestStreaming": false,
              "responseType": "PostFtpBackupResponse",
              "responseLongType": "PostFtpBackupResponse",
              "responseFullType": "deviceapis.device.v1.PostFtpBackupResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/device/api/v1/ftp/backup",
                      "body": "*"
                    }
                  ]
                }
              }
            },
            {
              "name": "PostFtpBackupApply",
              "description": "Скачать бэкап из FTP папки и применить",
              "requestType": "PostFtpBackupApplyRequest",
              "requestLongType": "PostFtpBackupApplyRequest",
              "requestFullType": "deviceapis.device.v1.PostFtpBackupApplyRequest",
              "requestStreaming": false,
              "responseType": "PostFtpBackupApplyResponse",
              "responseLongType": "PostFtpBackupApplyResponse",
              "responseFullType": "deviceapis.device.v1.PostFtpBackupApplyResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/device/api/v1/ftp/backup/apply",
                      "body": "*"
                    }
                  ]
                }
              }
            }
          ]
        }
      ],
      "syntax": "proto3"
    }
  ],
  "scalarValueTypes": [
    {
      "protoType": "double",
      "notes": "",
      "cppType": "double",
      "csType": "double",
      "goType": "float64",
      "javaType": "double",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "float",
      "notes": "",
      "cppType": "float",
      "csType": "float",
      "goType": "float32",
      "javaType": "float",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "int32",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "int64",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "uint32",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "uint64",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint32",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint64",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "fixed32",
      "notes": "Always four bytes. More efficient than uint32 if values are often greater than 2^28.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "fixed64",
      "notes": "Always eight bytes. More efficient than uint64 if values are often greater than 2^56.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "sfixed32",
      "notes": "Always four bytes.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sfixed64",
      "notes": "Always eight bytes.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "bool",
      "notes": "",
      "cppType": "bool",
      "csType": "bool",
      "goType": "bool",
      "javaType": "boolean",
      "phpType": "boolean",
      "pythonType": "boolean",
      "rubyType": "TrueClass/FalseClass"
    },
    {
      "protoType": "string",
      "notes": "A string must always contain UTF-8 encoded or 7-bit ASCII text.",
      "cppType": "string",
      "csType": "string",
      "goType": "string",
      "javaType": "String",
      "phpType": "string",
      "pythonType": "str/unicode",
      "rubyType": "String (UTF-8)"
    },
    {
      "protoType": "bytes",
      "notes": "May contain any arbitrary sequence of bytes.",
      "cppType": "string",
      "csType": "ByteString",
      "goType": "[]byte",
      "javaType": "ByteString",
      "phpType": "string",
      "pythonType": "str",
      "rubyType": "String (ASCII-8BIT)"
    }
  ]
}