package NSaasLB;

enum ELogbrokerName {
    logbroker = 0;
    logbroker_prestable = 1;
    lbkx = 2;
    lbkxt = 3;
    lbk_saas = 4;
}

enum ELogbrokerKind {
    origin = 0;
    mirror = 1;
}

enum EDataCenter {
    sas = 1;
    man = 2;
    vla = 3;
    iva = 4;
    myt = 5;
    original = 6;
}

message TNamespaceConfig {
    required string ServicesConfigsPath = 1;

    required string LogbrokerServicesPath = 2;

    required string LocksPath = 3;
    required string LocksServer = 4;

    oneof resources_information {
        string DeployManagerHost = 5;
    }

    optional string DevConsumersPath = 6;
}

message TGencfgGroups {
    repeated string Groups = 1;
}

enum EServicePermission {
    read = 0;
    write = 1;
}

message TServiceConfig {
    required ELogbrokerName Logbroker = 1;
    repeated EDataCenter DataCenters = 2;

    required string TopicsPath = 3;
    required string ConsumersPath = 4;

    required string LocksServer = 5;
    required string LocksPath = 6;

    oneof resources_information {
        string DeployManagerHost = 7;
        TGencfgGroups Gencfg = 8;
    }

    repeated string YtDeliveryCluster = 9;

    optional ELogbrokerName LogbrokerMirror = 10;
    optional string MirrorTopicsPath = 11;
    optional string MirrorConsumersPath = 12;
}

message TZooKeeperLockInfo {
    required string NodePath = 1;
}

message TLock {
    required string Resource = 1;
    oneof info {
        TZooKeeperLockInfo ZooKeeperLock = 2;
    }
}
