/*
 * Created by jonathan.jesperson@pluto.tv on 10/21/2020.
 * Copyright (c) PlutoTV Inc 2020.
 */

syntax = "proto3";

package comscorepackage;

option go_package = "github.com/Pluto-tv/service-dal/golang_client";
option java_package = "tv.pluto.ip.dal.comscore";

service ComScoreManager {
  // GetComScoreForClip (Unary)
  //
  rpc GetComScoreForClip(GetComScoreForClipRequest) returns (GetComScoreForClipResponse) {}

  // GetComScoreForClips (Unary)
  //
  rpc GetComScoreForClips(GetComScoreForClipsRequest) returns (GetComScoreForClipsResponse) {}
}

message GetComScoreForClipRequest {
  string id = 1; // clipId
  string playback_type = 2; // vod/linear
}

message GetComScoreForClipResponse {
  ComScore com_score = 1;
}

message GetComScoreForClipsRequest {
  repeated string ids = 1; // clipId
  string playback_type = 2; // vod/linear
}

message GetComScoreForClipsResponse {
  map<string, ComScore> clips_coms_score = 1;
}

message ComScore {
  ComScoreStreamingTag streaming_tag = 1;
  ComScoreMetadata metadata = 2;
}

message ComScoreStreamingTag {
  string customer_c2 = 1;
}

message ComScoreMetadata {
  string c3 = 1;
  string c4 = 2;
  string c6 = 3;
  string ns_st_ce = 4 [json_name = "ns_st_ce"];
  int32 ns_st_cl = 5 [json_name = "ns_st_cl"];
  string ns_st_ddt = 6 [json_name = "ns_st_ddt"];
  string ns_st_ge = 7 [json_name = "ns_st_ge"];
  string ns_st_ia = 8 [json_name = "ns_st_ia"];
  string ns_st_pr = 9 [json_name = "ns_st_pr"];
  string ns_st_tdt = 10 [json_name = "ns_st_tdt"];
  string ns_st_ti = 11 [json_name = "ns_st_ti"];
  string ns_st_ci = 12 [json_name = "ns_st_ci"];
}
