syntax = "proto2";

package maps_adv.geosmb.landlord.proto.contacts;

import "maps_adv/geosmb/landlord/proto/common.proto";

message Contacts {
  optional Geo geo = 1;

  optional string email = 10;
  optional string phone = 11;
  optional string website = 12;
  repeated string phones = 13;

  optional string instagram = 20;
  optional string facebook = 21;
  optional string vkontakte = 22;
  optional string twitter = 23;
  optional string telegram = 24;
  optional string viber = 25;
  optional string whatsapp = 26;

  optional bool is_substitution_phone = 40;
}

message Geo {
  required string permalink = 1;
  required common.Decimal lon = 2;
  required common.Decimal lat = 3;
  required string address = 4;
  optional bool address_is_accurate = 5;
  optional ServiceArea service_area = 6;
  optional string locality = 7;
  optional string country_code = 8;
  optional string postal_code = 9;
  optional string address_region = 10;
  optional string street_address = 11;
}

message ServiceArea {
    oneof service_area {
        uint32 service_radius_km = 1; // use Geo.lon and Geo.lat as circle center
        Area area = 2;
    }
}

message Area {
    repeated Region regions = 1;
}

message Region {
    required string preposition = 1;
    required string prepositional_case = 2;
}
