Протокол¶
Оглавление¶
-
deviceapis/device/v1/deviceapis_device_code_v1.proto
- Code.SavingError
- Code.SavingError.RelayNotFound
- CodePaging
- DeleteCodeListRequest
- DeleteCodeListResponse
- DeleteCodeRequest
- DeleteCodeResponse
- DeleteCodeResponse.Error
- GetCodeCountRequest
- GetCodeCountResponse
- GetCodeListRequest
- GetCodeListResponse
- GetCodeRequest
- GetCodeResponse
- SaveCodeListRequest
- SaveCodeListResponse
- SaveCodeListResponse.Error
- SaveCodeRequest
- SaveCodeResponse
- SaveCodeResponse.Error
Схема классов¶
deviceapis/device/v1/deviceapis_device_code_v1.proto¶
Сервис управления настройками кодов доступа
CodeService¶
Сервис управления настройками кодов доступа
| Название метода | Описание | Тип запроса | Тип ответа |
|---|---|---|---|
| DeleteCode | Метод удаления одного кода доступа | deviceapis.device.v1.DeleteCodeRequest | deviceapis.device.v1.DeleteCodeResponse |
| DeleteCodeList | Метод удаления списка кодов доступа | deviceapis.device.v1.DeleteCodeListRequest | deviceapis.device.v1.DeleteCodeListResponse |
| GetCode | Метод получения кода доступа | deviceapis.device.v1.GetCodeRequest | deviceapis.device.v1.GetCodeResponse |
| GetCodeCount | Метод получения количества кодов доступа | deviceapis.device.v1.GetCodeCountRequest | deviceapis.device.v1.GetCodeCountResponse |
| GetCodeList | Метод получения списка кодов доступа | deviceapis.device.v1.GetCodeListRequest | deviceapis.device.v1.GetCodeListResponse |
| SaveCode | Метод создания кода доступа | deviceapis.device.v1.SaveCodeRequest | deviceapis.device.v1.SaveCodeResponse |
| SaveCodeList | Метод создания списка кодов доступа | deviceapis.device.v1.SaveCodeListRequest | deviceapis.device.v1.SaveCodeListResponse |
Code¶
Код доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| code | Код доступа | string | REQUIRED |
| description | Описание | string | |
| relay_indexes | Идентификаторы реле. Диапазон: 1..64 | repeated int32 |
Code.SavingError¶
Ошибки сохранения
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| relay_not_found | Реле не найдено | optional deviceapis.device.v1.Code.SavingError.RelayNotFound |
Code.SavingError.RelayNotFound¶
Реле не найдено
CodePaging¶
Постраничный вывод
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| limit | Количество записей на страницу. Если значение 0 (не передано), то будет взято значение по умолчанию. # Диапазон: 0..100. # По умолчанию: 20 | int32 | |
| offset | Сдвиг. # Диапазон: 0..2147483647 | int32 |
DeleteCodeListRequest¶
Запрос удаления списка кодов доступа
DeleteCodeListResponse¶
Ответ на запрос удаления списка кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Всего количество удаленных | optional int32 |
DeleteCodeRequest¶
Запрос удаления одного кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| code | Код доступа | string | REQUIRED |
DeleteCodeResponse¶
Ответ на запрос удаления одного кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| error | Ошибка | optional deviceapis.device.v1.DeleteCodeResponse.Error |
DeleteCodeResponse.Error¶
Ошибка запроса
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| validation | Ошибка валидации | optional deviceapis.device.v1.ValidationError |
GetCodeCountRequest¶
Запрос получения количества кодов доступа
GetCodeCountResponse¶
Ответ на запрос получения количества кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Всего количество | optional int32 |
GetCodeListRequest¶
Запрос получения списка кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| paging | Постраничный вывод | optional deviceapis.device.v1.CodePaging |
GetCodeListResponse¶
Ответ на запрос получения списка кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Список Code | repeated deviceapis.device.v1.Code |
GetCodeRequest¶
Запрос получения получения кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| code | Код доступа | string | REQUIRED |
GetCodeResponse¶
Ответ на запрос получения получения кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Код доступа | optional deviceapis.device.v1.Code |
SaveCodeListRequest¶
Запрос на создание списка кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Список Code | repeated deviceapis.device.v1.Code |
SaveCodeListResponse¶
Ответ на создание списка кодов доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Список Code | repeated deviceapis.device.v1.Code | |
| errors | Список ошибок | repeated deviceapis.device.v1.SaveCodeListResponse.Error |
SaveCodeListResponse.Error¶
Ошибка запроса
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| code | Код доступа | string | REQUIRED |
| validation | Ошибка валидации | optional deviceapis.device.v1.ValidationError | |
| saving | Ошибка сохранения | optional deviceapis.device.v1.Code.SavingError |
SaveCodeRequest¶
Запрос создания кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Код доступа | deviceapis.device.v1.Code | REQUIRED |
SaveCodeResponse¶
Ответ на запрос создания кода доступа
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| data | Код доступа | optional deviceapis.device.v1.Code | |
| error | Ошибка | optional deviceapis.device.v1.SaveCodeResponse.Error |
SaveCodeResponse.Error¶
Ошибка запроса
| Поле | Описание | Тип | Признак |
|---|---|---|---|
| validation | Ошибка валидации | optional deviceapis.device.v1.ValidationError | |
| saving | Ошибка сохранения | optional deviceapis.device.v1.Code.SavingError |
Скалярные типы значений¶
| .proto Type | Примечание | Python | Go | Ruby | C# | C++ | Java | PHP |
|---|---|---|---|---|---|---|---|---|
| double | float | float64 | Float | double | double | double | float | |
| float | float | float32 | Float | float | float | float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int | int32 | Bignum or Fixnum (as required) | int | int32 | int | integer |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int/long | int64 | Bignum | long | int64 | long | integer/string |
| uint32 | Uses variable-length encoding. | int/long | uint32 | Bignum or Fixnum (as required) | uint | uint32 | int | integer |
| uint64 | Uses variable-length encoding. | int/long | uint64 | Bignum or Fixnum (as required) | ulong | uint64 | long | integer/string |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int | int32 | Bignum or Fixnum (as required) | int | int32 | int | integer |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int/long | int64 | Bignum | long | int64 | long | integer/string |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | int | uint32 | Bignum or Fixnum (as required) | uint | uint32 | int | integer |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | int/long | uint64 | Bignum | ulong | uint64 | long | integer/string |
| sfixed32 | Always four bytes. | int | int32 | Bignum or Fixnum (as required) | int | int32 | int | integer |
| sfixed64 | Always eight bytes. | int/long | int64 | Bignum | long | int64 | long | integer/string |
| bool | boolean | bool | TrueClass/FalseClass | bool | bool | boolean | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | str/unicode | string | String (UTF-8) | string | string | String | string |
| bytes | May contain any arbitrary sequence of bytes. | str | []byte | String (ASCII-8BIT) | ByteString | string | ByteString | string |