syntax = "proto3";

package content_tags;

option go_package = "content_tags";

import "eventbus/owner.proto";

// ContentTagsUpdate triggers when the tags applied to a specific piece of content are changed.
message ContentTagsUpdate {
  option (eventbus.owner.ldap_group) = "team-search-discovery";
  // ID of modified content, e.g. user ID for content type LIVE_CHANNEL
  string content_id = 1;
  // ContentType of modified content
  ContentType content_type = 2;
  // The tags that are currently applied to the content. Could be empty if all were removed.
  repeated Tag tags = 3;
}

// ContentType represents the different types of content.
enum ContentType {
  // Present because proto3 specifies enums must start with value 0
  CONTENT_TYPE_INVALID = 0;
  CONTENT_TYPE_LIVE_CHANNEL = 1;
  CONTENT_TYPE_VOD = 2;
  CONTENT_TYPE_CLIP = 3;
  CONTENT_TYPE_CATEGORY = 4;
}

// The Tag that is still applied to the specific content.
message Tag {
  string id = 1;
  string name = 2;
  // Map of locale -> localized name of tag for the content tag
  map<string, string> localizations = 3;
}
