syntax = "proto3";

package reddit.coreplatform.account.v1;

import "reddit/coreplatform/api/metadata/v1/metadata.proto";
import "reddit/coreplatform/common/v1/legal.proto";
import "reddit/coreplatform/common/v1/media.proto";
import "reddit/coreplatform/common/v1/moderation.proto";

option go_package = "github.snooguts.net/reddit/thing-api/go/grpc/account/v1;account";
option java_multiple_files = true;
option java_outer_classname = "AccountProto";
option java_package = "com.reddit.coreplatform.api.account.v1";

/* @exclude No documentation present when converted from Thrift to Proto */
message Account {
  /* @exclude No documentation present when converted from Thrift to Proto */
  string id = 1;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string name = 2;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 date = 3;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool deleted = 4;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool spam = 5;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string profile_subreddit_id = 8;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool suspended = 9;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool gold = 11;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 suspension_expiration = 12;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_external_account = 13;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_permanently_suspended = 14;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string snoovatar_img = 15;

  /* @exclude No documentation present when converted from Thrift to Proto */
  reddit.coreplatform.common.v1.MediaDimension snoovatar_size = 16;

  /* @exclude No documentation present when converted from Thrift to Proto */
  Type account_type = 17;

  // This field represents the what the rps for calls to the Reddit API should be rate limited to for this account.
  // Its value is manually set by an engineer when a support request is received by the community team. The value set
  // will override the default rps that is computed by the site wide rate limiter implementation. The default value for
  // this field is `0`, which means no override is defined. Any positive integer should be interpreted as a the rps that
  // should be enforced when rate limiting requests from this account.
  int32 sitewide_ratelimit_override_rps = 18;

  // Taken from the Identity object. Indicates if an account is marked as plagued (bans and propagates to alt-accounts)
  bool plague = 19;

  // Taken from the Identity object. Indicates if an account it banned from logging in.
  bool banned = 20;

  /* @exclude No documentation present when converted from Thrift to Proto */
  enum Type {
    /* @exclude No documentation present when converted from Thrift to Proto */
    TYPE_UNSPECIFIED = 0 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "UNKNOWN"
      ordinal: 0,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    TYPE_UNSET = 1 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "NULL_VALUE"
      ordinal: 1,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    TYPE_PROXY = 2 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "PROXY"
      ordinal: 2,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    TYPE_APP = 3 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "APP"
      ordinal: 3,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    TYPE_BRAND = 4 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "BRAND"
      ordinal: 4,
    }];

    // a system account that is allowed to manage long-lived access tokens;
    TYPE_ADS_INTEGRATION = 5 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "ADS_INTEGRATION"
      ordinal: 5,
    }];
  }
}

/* @exclude No documentation present when converted from Thrift to Proto */
message AccountFlair {
  /* @exclude No documentation present when converted from Thrift to Proto */
  string account_id = 1;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string subreddit_id = 2;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string text = 3;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string css_class = 4;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string template_id = 5;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string text_color = 6;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string background_color = 7;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool enabled = 8;
}

/* @exclude No documentation present when converted from Thrift to Proto */
message AccountGender {
  /* @exclude No documentation present when converted from Thrift to Proto */
  enum Category {
    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_UNSPECIFIED = 0;

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_FEMALE = 1 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "FEMALE"
      ordinal: 0,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_MALE = 2 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "MALE"
      ordinal: 1,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_NON_BINARY = 3 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "NON_BINARY"
      ordinal: 2,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_OPT_OUT = 4 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "OPT_OUT"
      ordinal: 3,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_USER_DEFINED = 5 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "USER_DEFINED"
      ordinal: 4,
    }];

    /* @exclude No documentation present when converted from Thrift to Proto */
    CATEGORY_UNSET = 6 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
      name: "NULL_VALUE"
      ordinal: 5,
    }];
  }

  /* @exclude No documentation present when converted from Thrift to Proto */
  Category account_gender_category = 1;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string account_defined_gender = 2;
}

/* @exclude No documentation present when converted from Thrift to Proto */
message AccountHasSeenFlags {
  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_seen_redesign_modal = 1;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_seen_layout_switch = 2;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_seen_subreddit_chat_ftux = 3;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_seen_premium_adblock_modal = 4;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_seen_give_award_tooltip = 5;
}

/* @exclude No documentation present when converted from Thrift to Proto */
message Identity {
  /* @exclude No documentation present when converted from Thrift to Proto */
  string id = 1;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string name = 2;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 date = 3;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool deleted = 4;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool spam = 5;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string email = 6;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool email_verified = 7;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool gold = 8;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 gold_expiration = 9;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string profile_subreddit_id = 15;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_employee = 17;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 inbox_count = 18;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool suspended = 20;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 coins = 21;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_old_modmail = 22;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool force_password_reset = 23;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string gold_subscription_id = 24;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 suspension_expiration = 25;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 gold_creddits = 26;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_external_account = 27;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 admin_suspension_strikes = 28;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string password_hash = 29;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string backup_password_hash = 30;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string deletion_message = 31;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 deletion_time = 32;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool gold_charter = 33;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_subscribed = 34;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_used_mobile_app = 35;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 last_comment_time = 36;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 last_password_reset_time = 37;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 last_submit_time = 38;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool nsfw_media_acknowledged = 39;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_gildings = 40;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool plague = 41;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string plague_source = 42;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string ip = 43;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 report_count = 44;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string request_organization = 45;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 spam_count = 46;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool banned = 47;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string suspension_appeal_status = 48;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool suspicious = 49;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string timeout_reason = 50;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool touch_or_register_neutered = 51;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 unbanned_at = 52;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool request_from_tor = 53;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool request_has_loid = 54;

  /* @exclude No documentation present when converted from Thrift to Proto */
  map<string, bool> user_features = 55;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool alt_track = 56;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool in_redesign_blacklist = 57;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 reports_made = 58;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 reports_approved = 59;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 reports_rejected = 60;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool opted_out_of_redesign = 61;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 last_anti_ads_activity = 62;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 next_coin_drip_date = 63;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string register_country = 64;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_gildings_silver = 65;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_gildings_supergold = 66;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 coin_drip_expiration = 67;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string otp_login_secret = 68;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string old_style_password_salt = 69;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_subscribed_to_premium = 70;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string otp_secret = 71;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool disenfranchised = 72;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool knows_about_modnews = 73;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 admin_takedown_strikes = 74;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 loid_created = 75;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string otp_login_backup_salt = 76;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool blackhole_messages = 77;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool ignore_reports = 78;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 last_profile_visit = 79;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool whitelisted = 80;

  /* @exclude No documentation present when converted from Thrift to Proto */
  map<string, string> external_provider_ids = 81;

  /* @exclude No documentation present when converted from Thrift to Proto */
  ModMailState modmail_state = 82;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool wiki_override = 83;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_permanently_suspended = 84;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool can_be_new_mod = 85;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool butler_ignore = 86;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string stripe_customer_id = 87;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool has_gold_subscription = 88;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool archived = 89;

  /* @exclude No documentation present when converted from Thrift to Proto */
  reddit.coreplatform.common.v1.BanInfo ban_info = 90;

  /* @exclude No documentation present when converted from Thrift to Proto */
  reddit.coreplatform.common.v1.Verdict verdict = 91;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string bounce = 92;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 mod_message_time = 93;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_moderator_somewhere = 94;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_friends = 95;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int64 orangered_opt_in_message_time = 96;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_gildings_other = 97;

  /* @exclude No documentation present when converted from Thrift to Proto */
  map<string, AccountFlair> flair = 101;

  /* @exclude No documentation present when converted from Thrift to Proto */
  repeated reddit.coreplatform.common.v1.LegalBlock legal_blocks = 102;

  /* @exclude No documentation present when converted from Thrift to Proto */
  map<string, string> sort_options = 103;

  /* @exclude No documentation present when converted from Thrift to Proto */
  EmailExternalVerifiedByType email_external_verified = 104;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool password_set = 105;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_eligible_for_name_change = 106;

  /* @exclude No documentation present when converted from Thrift to Proto */
  bool is_invite_pending = 107;

  /* @exclude No documentation present when converted from Thrift to Proto */
  string snoovatar_img = 108;

  /* @exclude No documentation present when converted from Thrift to Proto */
  reddit.coreplatform.common.v1.MediaDimension snoovatar_size = 109;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_blockers = 110;

  /* @exclude No documentation present when converted from Thrift to Proto */
  int32 num_blockees = 111;

  /* @exclude No documentation present when converted from Thrift to Proto */
  Account.Type account_type = 112;

  // Indicates if this account should be blocked from creating subreddits
  // https://reddit.atlassian.net/browse/CCNTNT-134
  bool subreddit_creation_blocked = 114;
}

/* @exclude No documentation present when converted from Thrift to Proto */
enum EmailExternalVerifiedByType {
  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_UNSPECIFIED = 0;

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_NOT_YET_DETERMINED = 1 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "NOT_YET_DETERMINED"
    ordinal: 0,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_REGEX_INVALID = 2 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "REGEX_INVALID"
    ordinal: 1,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_KICKBOX_DELIVERABLE = 3 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "KICKBOX_DELIVERABLE"
    ordinal: 2,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_KICKBOX_UNDELIVERABLE = 4 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "KICKBOX_UNDELIVERABLE"
    ordinal: 3,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_KICKBOX_UNKNOWN = 5 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "KICKBOX_UNKNOWN"
    ordinal: 4,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  EMAIL_EXTERNAL_VERIFIED_BY_TYPE_KICKBOX_RISKY = 6 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "KICKBOX_RISKY"
    ordinal: 5,
  }];
}

/* @exclude No documentation present when converted from Thrift to Proto */
enum ModMailState {
  /* @exclude No documentation present when converted from Thrift to Proto */
  MOD_MAIL_STATE_UNSPECIFIED = 0;

  /* @exclude No documentation present when converted from Thrift to Proto */
  MOD_MAIL_STATE_NO_MODMAIL = 1 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "NO_MODMAIL"
    ordinal: 0,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  MOD_MAIL_STATE_NO_UNREADS = 2 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "NO_UNREADS"
    ordinal: 1,
  }];

  /* @exclude No documentation present when converted from Thrift to Proto */
  MOD_MAIL_STATE_HAS_UNREADS = 3 [(reddit.coreplatform.api.metadata.v1.thrift_alias) = {
    name: "NO_UNREADS"
    ordinal: 2,
  }];
}
