{
  "files": [
    {
      "name": "keyapis/access_control/v1/keyapis_access_control_sync_v1.proto",
      "description": "Сервис сихронизации объектов",
      "package": "keyapis.access_control.v1",
      "hasEnums": false,
      "hasExtensions": false,
      "hasMessages": true,
      "hasServices": true,
      "enums": [],
      "extensions": [],
      "messages": [
        {
          "name": "BuildingSync",
          "longName": "BuildingSync",
          "fullName": "keyapis.access_control.v1.BuildingSync",
          "description": "Дом для синхронизации",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "id",
              "description": "Идентификатор дома",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "orpon",
              "description": "ОРПОН",
              "label": "",
              "type": "int64",
              "longType": "int64",
              "fullType": "int64",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "city",
              "description": "Город",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 3
            },
            {
              "name": "street",
              "description": "Улица",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 4
            },
            {
              "name": "number",
              "description": "Номер дома",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 5
            },
            {
              "name": "city_orpon",
              "description": "ОРПОН города, в котором находится дом",
              "label": "",
              "type": "int64",
              "longType": "int64",
              "fullType": "int64",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 6
            },
            {
              "name": "region_orpon",
              "description": "ОРПОН региона",
              "label": "",
              "type": "int64",
              "longType": "int64",
              "fullType": "int64",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 7
            },
            {
              "name": "area",
              "description": "Наименование муниципального района.\n# Диапазон: 0..64",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 8
            },
            {
              "name": "area_orpon",
              "description": "ОРПОН муниципального района.\n# Диапазон: 0..9999999999",
              "label": "",
              "type": "Int64Value",
              "longType": "google.protobuf.Int64Value",
              "fullType": "google.protobuf.Int64Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 9
            },
            {
              "name": "area_kladr",
              "description": "КЛАДР муниципального района.\n# Диапазон: 0..32",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 10
            },
            {
              "name": "capital_marker",
              "description": "Признак принадлежности населённого пункта к столичному статусу.\n1 — центр района.\n2 — центр региона.\n3 — центр района и региона.\n4 — центральный район региона.\n0 — ничего из перечисленного.\n# Диапазон: 0..4",
              "label": "",
              "type": "Int32Value",
              "longType": "google.protobuf.Int32Value",
              "fullType": "google.protobuf.Int32Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 11
            },
            {
              "name": "city_kladr",
              "description": "КЛАДР-код города.\n# Диапазон: 0..17",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 12
            },
            {
              "name": "kladr",
              "description": "КЛАДР-код строения.\n# Диапазон: 0..17",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 13
            },
            {
              "name": "fias_level",
              "description": "Уровень детализации, до которого адрес найден в ФИАС.\n0 — страна.\n1 — регион.\n3 — район.\n4 — город.\n5 — район города.\n6 — населенный пункт.\n7 — улица.\n8 — дом.\n9 — квартира.\n65 — планировочная структура.\n90 — доп. территория.\n91 — улица в доп. территории.\n-1 — иностранный или пустой.\n# Диапазон: -1..99",
              "label": "",
              "type": "Int32Value",
              "longType": "google.protobuf.Int32Value",
              "fullType": "google.protobuf.Int32Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 14
            },
            {
              "name": "fias_actuality_state",
              "description": "Уровень детализации, до которого адрес найден в ФИАС.\n0 — актуальный.\n1-50 — переименован.\n51 — переподчинен.\n99 — удален.\n# Диапазон: 0..99",
              "label": "",
              "type": "Int32Value",
              "longType": "google.protobuf.Int32Value",
              "fullType": "google.protobuf.Int32Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 15
            },
            {
              "name": "geo_lat",
              "description": "Координаты: широта",
              "label": "",
              "type": "DoubleValue",
              "longType": "google.protobuf.DoubleValue",
              "fullType": "google.protobuf.DoubleValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 16
            },
            {
              "name": "geo_lon",
              "description": "Координаты: долгота",
              "label": "",
              "type": "DoubleValue",
              "longType": "google.protobuf.DoubleValue",
              "fullType": "google.protobuf.DoubleValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 17
            },
            {
              "name": "okato",
              "description": "Код ОКАТО",
              "label": "",
              "type": "Int64Value",
              "longType": "google.protobuf.Int64Value",
              "fullType": "google.protobuf.Int64Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 18
            },
            {
              "name": "oktmo",
              "description": "Код ОКТМО",
              "label": "",
              "type": "Int64Value",
              "longType": "google.protobuf.Int64Value",
              "fullType": "google.protobuf.Int64Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 19
            },
            {
              "name": "postal_code",
              "description": "Почтовый индекс",
              "label": "",
              "type": "Int32Value",
              "longType": "google.protobuf.Int32Value",
              "fullType": "google.protobuf.Int32Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 20
            },
            {
              "name": "region",
              "description": "Наименование региона.\n# Диапазон: 0..64",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 21
            },
            {
              "name": "region_kladr",
              "description": "КЛАДР-код региона.\n# Диапазон: 0..32",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 22
            },
            {
              "name": "street_kladr",
              "description": "КЛАДР-код улицы.\n# Диапазон: 0..32",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 23
            },
            {
              "name": "street_orpon",
              "description": "ОРПОН улицы.\n# Диапазон: 0..9999999999",
              "label": "",
              "type": "Int64Value",
              "longType": "google.protobuf.Int64Value",
              "fullType": "google.protobuf.Int64Value",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 24
            },
            {
              "name": "house_kladr",
              "description": "КЛАДР-код дома.\n# Диапазон: 0..32",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 25
            }
          ]
        },
        {
          "name": "GetSyncBuildingsRequest",
          "longName": "GetSyncBuildingsRequest",
          "fullName": "keyapis.access_control.v1.GetSyncBuildingsRequest",
          "description": "Запрос получения списка домов для обновления",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "batch_size",
              "description": "Количество.\nПо умолчанию 10.\n# Диапазон: 10..5000",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "last_sync_before_at",
              "description": "Дата, старше которой должны вернуться записи для синхронизации",
              "label": "",
              "type": "Timestamp",
              "longType": "google.protobuf.Timestamp",
              "fullType": "google.protobuf.Timestamp",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            }
          ]
        },
        {
          "name": "GetSyncBuildingsResponse",
          "longName": "GetSyncBuildingsResponse",
          "fullName": "keyapis.access_control.v1.GetSyncBuildingsResponse",
          "description": "Ответ на запрос получения списка домов для обновления",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "data",
              "description": "Дома",
              "label": "",
              "type": "BuildingList",
              "longType": "GetSyncBuildingsResponse.BuildingList",
              "fullType": "keyapis.access_control.v1.GetSyncBuildingsResponse.BuildingList",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "GetSyncBuildingsResponse.Error",
              "fullType": "keyapis.access_control.v1.GetSyncBuildingsResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 2
            }
          ]
        },
        {
          "name": "BuildingList",
          "longName": "GetSyncBuildingsResponse.BuildingList",
          "fullName": "keyapis.access_control.v1.GetSyncBuildingsResponse.BuildingList",
          "description": "Список домов",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "buildings",
              "description": "Список домов",
              "label": "repeated",
              "type": "BuildingSync",
              "longType": "BuildingSync",
              "fullType": "keyapis.access_control.v1.BuildingSync",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "GetSyncBuildingsResponse.Error",
          "fullName": "keyapis.access_control.v1.GetSyncBuildingsResponse.Error",
          "description": "Ошибка",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "keyapis.access_control.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "PostSyncBuildingRequest",
          "longName": "PostSyncBuildingRequest",
          "fullName": "keyapis.access_control.v1.PostSyncBuildingRequest",
          "description": "Запрос частичного обновления дома",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "building_id",
              "description": "Передается в случае когда изменения данных не требуются, но необходимо зафиксировать дату синхронизации",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "data",
              "description": "Дом с обновленными данными из DaData",
              "label": "",
              "type": "BuildingSync",
              "longType": "BuildingSync",
              "fullType": "keyapis.access_control.v1.BuildingSync",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            }
          ]
        },
        {
          "name": "PostSyncBuildingResponse",
          "longName": "PostSyncBuildingResponse",
          "fullName": "keyapis.access_control.v1.PostSyncBuildingResponse",
          "description": "Ответ на запрос частичного обновления дома",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostSyncBuildingResponse.Error",
              "fullType": "keyapis.access_control.v1.PostSyncBuildingResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostSyncBuildingResponse.Error",
          "fullName": "keyapis.access_control.v1.PostSyncBuildingResponse.Error",
          "description": "Ошибка",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "keyapis.access_control.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            }
          ]
        }
      ],
      "services": [
        {
          "name": "SyncService",
          "longName": "SyncService",
          "fullName": "keyapis.access_control.v1.SyncService",
          "description": "Сервис для сихронизации объектов",
          "methods": [
            {
              "name": "PostSyncBuilding",
              "description": "Метод частичного обновления дома, только данными из DaData.\nМетод доступен для: admin, service",
              "requestType": "PostSyncBuildingRequest",
              "requestLongType": "PostSyncBuildingRequest",
              "requestFullType": "keyapis.access_control.v1.PostSyncBuildingRequest",
              "requestStreaming": false,
              "responseType": "PostSyncBuildingResponse",
              "responseLongType": "PostSyncBuildingResponse",
              "responseFullType": "keyapis.access_control.v1.PostSyncBuildingResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/access_control/api/v1/sync/building",
                      "body": "*"
                    }
                  ]
                }
              }
            },
            {
              "name": "GetSyncBuildings",
              "description": "Метод получения списка домов для обновления.\nМетод доступен для: admin, service",
              "requestType": "GetSyncBuildingsRequest",
              "requestLongType": "GetSyncBuildingsRequest",
              "requestFullType": "keyapis.access_control.v1.GetSyncBuildingsRequest",
              "requestStreaming": false,
              "responseType": "GetSyncBuildingsResponse",
              "responseLongType": "GetSyncBuildingsResponse",
              "responseFullType": "keyapis.access_control.v1.GetSyncBuildingsResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "GET",
                      "pattern": "/access_control/api/v1/sync/buildings"
                    }
                  ]
                }
              }
            }
          ]
        }
      ],
      "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)"
    }
  ]
}