syntax = "proto2";

package maps_adv.geosmb.clients.bvm.proto.bvm;


message FetchBizIdInput {
    required uint64 permalink = 1;
}

message FetchBizIdOutput {
    required uint64 biz_id = 1;
}

message FetchNoCreateBizIdInput {
  required uint64 permalink = 1;
}

message FetchNoCreateBizIdOutput {
  optional uint64 biz_id = 1;
}

message FetchPermalinksByBizIdInput {
    required uint64 biz_id = 1;
}

message FetchPermalinksByBizIdOutput {
    repeated uint64 permalinks = 1;
}

message FetchPermalinksByBizIdsInput {
    repeated uint64 biz_ids = 1;
}

message FetchPermalinksByBizIdsOutput {
    message BizIdData {
        required uint64 biz_id = 1;
        repeated uint64 permalinks = 2;
    }

    repeated BizIdData items = 1;
}

enum ClientErrorCode {
    UNKNOWN = 0;
    NOT_FOUND = 1;
    BAD_PROTO = 2;
}

message ClientError {
    required ClientErrorCode code = 1;
    required string message = 2;
}
