/*
 * Created by jonathan.jesperson@pluto.tv on 08/04/2022.
 * Copyright (c) PlutoTV Inc 2022.
 */

syntax = "proto3";

package genrepackage;

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

service GenreManager {
  // GetGenres (Unary)
  //
  rpc GetGenres(GetGenresRequest) returns (GetGenresResponse) {}

  // GetSubGenresByGenre (Unary)
  //
  rpc GetSubGenresByGenre(GetSubGenresByGenreRequest) returns (GetSubGenresByGenreResponse) {}

  // GetGenreSubGenreMap (Unary)
  //
  rpc GetGenreSubGenreMap(GetGenreSubGenreMapRequest) returns (GetGenreSubGenreMapResponse) {}

  rpc GetTranslations(GetTranslationsRequest) returns (GetTranslationsResponse) {}
}

message GetGenresRequest {}

message GetSubGenresByGenreRequest {
  string genre = 1;
}

message GetGenreSubGenreMapRequest {}

message GetGenresResponse {
  repeated string genres = 1;
}

message GetSubGenresByGenreResponse {
  repeated string sub_genres = 1;
}

message GetGenreSubGenreMapResponse {
  repeated GenreSubGenres genre_sub_genres = 1;
}

message GenreSubGenres {
  string genre = 1;
  repeated string sub_genres = 2;
}

message GetTranslationsRequest {}

message GetTranslationsResponse {
  map<string, TranslationSet> languageCodes = 1;
}

message TranslationSet {
  map<string, string> translations = 1;
}
