syntax = "proto3";

package laborato.common.target;

message Target {
  oneof target {
    GlobalTarget global = 1;
    AgentTarget agent = 2;
    UserTarget user = 3;
    TacticalClientTarget client = 4;
    TacticalClientsTarget clients = 5;
    TacticalSiteTarget site = 6;
    TacticalSitesTarget sites = 7;
    AggentsTarget agents = 8;
    CombinedTarget combined = 9;
    GroupTarget group = 10;
    GroupsTarget groups = 11;
    AgentCategoryTarget agentCategory = 12;
    UserOnAgentTArget user_on_agent = 13;
  }
}

// Group targets
message GroupTarget {
    string groupId = 1;
}

message GroupsTarget {
    repeated string groupIds = 1;
}

// Tactical targets
message TacticalClientTarget {
    int64 client_id = 1;
}

message TacticalClientsTarget {
    repeated TacticalClientTarget clients = 1;
}

message TacticalSiteTarget {
    int64 site_id = 1;
}

message TacticalSitesTarget {
    repeated TacticalSiteTarget sites = 1;
}

message AggentsTarget {
    repeated AgentTarget agents = 1;
}

message CombinedTarget {
    optional TacticalClientsTarget clients = 1;
    optional TacticalSitesTarget sites = 2;
    optional AggentsTarget agents = 3;
} 

// System targets
message GlobalTarget {}

message AgentTarget {
  string agent_id = 1;
}

message UserTarget {
  string agent_id = 1;
  string user_id = 2;
}

message UserOnAgentTArget {
  string agent_id = 1;
  string user_sid = 2;
}

message AgentCategoryTarget {
    int64 category_id = 1;
}