syntax = "proto3";

package devvit.reddit.v2alpha;

option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/reddit/v2alpha";
option java_package = "com.reddit.devvit.reddit.v2alpha";

enum SubredditType {
  ARCHIVED = 0;
  EMPLOYEES_ONLY = 1;
  GOLD_ONLY = 2;
  GOLD_RESTRICTED = 3;
  PRIVATE = 4;
  PUBLIC = 5;
  RESTRICTED = 6;
  USER = 7;
}

message SubredditV2 {
  string id = 1;
  string name = 2;
  bool nsfw = 3;
  SubredditType type = 4;
  bool spam = 5;
  bool quarantined = 6;
  repeated string topics = 7;
  SubredditRating rating = 8;
  int32 subscribers_count = 9;
  string permalink = 10;
  string title = 11;
  string description = 12;
}

// used with data-api
enum SubredditRating {
  UNKNOWN_SUBREDDIT_RATING = 0;
  E = 1; // everyone
  M1 = 2; // mature 1
  M2 = 3; // mature 2
  D = 4; // high-risk drug use
  V = 5; // violence & gore
  X = 6; // sexually explicit
}
