syntax = "proto3";

package channel;

option go_package = "channel";

import "eventbus/change.proto";
import "eventbus/owner.proto";

// ChannelUpdate is triggered when a user changes properties on their channel.
//
// Other than the 'user_id' field which is always included, all the
// other fields are optional and not necessarily included in all events.
// Clients should anticipate this depending on user actions and not rely
// on getting the entire range of values.
message ChannelUpdate {
  option (eventbus.owner.ldap_group) = "team-identity";
  // The user owning the channel.
  string user_id = 1;
  // The attributes that can also be reflected in a live broadcast.
  BroadcastSettingsUpdate broadcast_settings = 2;
  // This channel is intended for mature audiences only.
  eventbus.change.BoolChange mature = 3;
  // This channel is hidden from its directory.
  eventbus.change.BoolChange directory_hidden = 4;
  // Disable chat
  eventbus.change.BoolChange disable_chat = 5;
  // If set, redirect this channel to another channel's user ID
  eventbus.change.StringChange redirect_user_id = 6;
  // The user requesting the channel update
  string editor_user_id = 7;
}

// The subset of settings that are cloned to a live broadcast.
message BroadcastSettingsUpdate {
  // The software being used to perform this stream.
  eventbus.change.StringChange software = 1;
  // Language is an ISO-639-1 two-letter language code e.g. 'en'
  eventbus.change.StringChange language = 2;
  // Game ID is the game that will be broadcast.
  eventbus.change.StringChange game_id = 3;
  // Deprecated field. Please use the `status` field instead.
  eventbus.change.StringChange title = 4 [deprecated = true];
  // Title that the user sets for the channel.
  eventbus.change.StringChange status = 5;
}
