Userinfo.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: userinfo.proto
  3. #pragma warning disable 1591, 0612, 3021
  4. #region Designer generated code
  5. using pb = global::Google.Protobuf;
  6. using pbc = global::Google.Protobuf.Collections;
  7. using pbr = global::Google.Protobuf.Reflection;
  8. using scg = global::System.Collections.Generic;
  9. namespace Protos {
  10. /// <summary>Holder for reflection information generated from userinfo.proto</summary>
  11. public static partial class UserinfoReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for userinfo.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static UserinfoReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "Cg51c2VyaW5mby5wcm90bxIGcHJvdG9zIosBCghVc2VySW5mbxIOCgZVc2Vy",
  22. "SUQYASABKA0SDgoGT3BlbmlkGAIgASgJEg8KB1VuaW9uaWQYAyABKAkSEAoI",
  23. "Tmlja25hbWUYBCABKAkSDgoGQXZhdGFyGAUgASgJEhAKCElkZW50aXR5GAYg",
  24. "ASgNEg0KBVJlYWR5GAcgASgIEgsKA3NpdBgIIAEoDWIGcHJvdG8z"));
  25. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  26. new pbr::FileDescriptor[] { },
  27. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  28. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.UserInfo), global::Protos.UserInfo.Parser, new[]{ "UserID", "Openid", "Unionid", "Nickname", "Avatar", "Identity", "Ready", "Sit" }, null, null, null)
  29. }));
  30. }
  31. #endregion
  32. }
  33. #region Messages
  34. public sealed partial class UserInfo : pb::IMessage<UserInfo> {
  35. private static readonly pb::MessageParser<UserInfo> _parser = new pb::MessageParser<UserInfo>(() => new UserInfo());
  36. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  37. public static pb::MessageParser<UserInfo> Parser { get { return _parser; } }
  38. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  39. public static pbr::MessageDescriptor Descriptor {
  40. get { return global::Protos.UserinfoReflection.Descriptor.MessageTypes[0]; }
  41. }
  42. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  43. pbr::MessageDescriptor pb::IMessage.Descriptor {
  44. get { return Descriptor; }
  45. }
  46. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  47. public UserInfo() {
  48. OnConstruction();
  49. }
  50. partial void OnConstruction();
  51. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  52. public UserInfo(UserInfo other) : this() {
  53. userID_ = other.userID_;
  54. openid_ = other.openid_;
  55. unionid_ = other.unionid_;
  56. nickname_ = other.nickname_;
  57. avatar_ = other.avatar_;
  58. identity_ = other.identity_;
  59. ready_ = other.ready_;
  60. sit_ = other.sit_;
  61. }
  62. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  63. public UserInfo Clone() {
  64. return new UserInfo(this);
  65. }
  66. /// <summary>Field number for the "UserID" field.</summary>
  67. public const int UserIDFieldNumber = 1;
  68. private uint userID_;
  69. /// <summary>
  70. /// 用户id
  71. /// </summary>
  72. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  73. public uint UserID {
  74. get { return userID_; }
  75. set {
  76. userID_ = value;
  77. }
  78. }
  79. /// <summary>Field number for the "Openid" field.</summary>
  80. public const int OpenidFieldNumber = 2;
  81. private string openid_ = "";
  82. /// <summary>
  83. /// 平台openid
  84. /// </summary>
  85. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  86. public string Openid {
  87. get { return openid_; }
  88. set {
  89. openid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  90. }
  91. }
  92. /// <summary>Field number for the "Unionid" field.</summary>
  93. public const int UnionidFieldNumber = 3;
  94. private string unionid_ = "";
  95. /// <summary>
  96. /// 平台unionid
  97. /// </summary>
  98. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  99. public string Unionid {
  100. get { return unionid_; }
  101. set {
  102. unionid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  103. }
  104. }
  105. /// <summary>Field number for the "Nickname" field.</summary>
  106. public const int NicknameFieldNumber = 4;
  107. private string nickname_ = "";
  108. /// <summary>
  109. /// 用户昵称
  110. /// </summary>
  111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  112. public string Nickname {
  113. get { return nickname_; }
  114. set {
  115. nickname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  116. }
  117. }
  118. /// <summary>Field number for the "Avatar" field.</summary>
  119. public const int AvatarFieldNumber = 5;
  120. private string avatar_ = "";
  121. /// <summary>
  122. /// 用户形象
  123. /// </summary>
  124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  125. public string Avatar {
  126. get { return avatar_; }
  127. set {
  128. avatar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  129. }
  130. }
  131. /// <summary>Field number for the "Identity" field.</summary>
  132. public const int IdentityFieldNumber = 6;
  133. private uint identity_;
  134. /// <summary>
  135. /// 其他扩展属性
  136. /// </summary>
  137. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  138. public uint Identity {
  139. get { return identity_; }
  140. set {
  141. identity_ = value;
  142. }
  143. }
  144. /// <summary>Field number for the "Ready" field.</summary>
  145. public const int ReadyFieldNumber = 7;
  146. private bool ready_;
  147. /// <summary>
  148. /// 用户状态 0=未准备; 1=已准备
  149. /// </summary>
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  151. public bool Ready {
  152. get { return ready_; }
  153. set {
  154. ready_ = value;
  155. }
  156. }
  157. /// <summary>Field number for the "sit" field.</summary>
  158. public const int SitFieldNumber = 8;
  159. private uint sit_;
  160. /// <summary>
  161. /// 用户座位号 0 ~ n
  162. /// </summary>
  163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  164. public uint Sit {
  165. get { return sit_; }
  166. set {
  167. sit_ = value;
  168. }
  169. }
  170. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  171. public override bool Equals(object other) {
  172. return Equals(other as UserInfo);
  173. }
  174. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  175. public bool Equals(UserInfo other) {
  176. if (ReferenceEquals(other, null)) {
  177. return false;
  178. }
  179. if (ReferenceEquals(other, this)) {
  180. return true;
  181. }
  182. if (UserID != other.UserID) return false;
  183. if (Openid != other.Openid) return false;
  184. if (Unionid != other.Unionid) return false;
  185. if (Nickname != other.Nickname) return false;
  186. if (Avatar != other.Avatar) return false;
  187. if (Identity != other.Identity) return false;
  188. if (Ready != other.Ready) return false;
  189. if (Sit != other.Sit) return false;
  190. return true;
  191. }
  192. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  193. public override int GetHashCode() {
  194. int hash = 1;
  195. if (UserID != 0) hash ^= UserID.GetHashCode();
  196. if (Openid.Length != 0) hash ^= Openid.GetHashCode();
  197. if (Unionid.Length != 0) hash ^= Unionid.GetHashCode();
  198. if (Nickname.Length != 0) hash ^= Nickname.GetHashCode();
  199. if (Avatar.Length != 0) hash ^= Avatar.GetHashCode();
  200. if (Identity != 0) hash ^= Identity.GetHashCode();
  201. if (Ready != false) hash ^= Ready.GetHashCode();
  202. if (Sit != 0) hash ^= Sit.GetHashCode();
  203. return hash;
  204. }
  205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  206. public override string ToString() {
  207. return pb::JsonFormatter.ToDiagnosticString(this);
  208. }
  209. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  210. public void WriteTo(pb::CodedOutputStream output) {
  211. if (UserID != 0) {
  212. output.WriteRawTag(8);
  213. output.WriteUInt32(UserID);
  214. }
  215. if (Openid.Length != 0) {
  216. output.WriteRawTag(18);
  217. output.WriteString(Openid);
  218. }
  219. if (Unionid.Length != 0) {
  220. output.WriteRawTag(26);
  221. output.WriteString(Unionid);
  222. }
  223. if (Nickname.Length != 0) {
  224. output.WriteRawTag(34);
  225. output.WriteString(Nickname);
  226. }
  227. if (Avatar.Length != 0) {
  228. output.WriteRawTag(42);
  229. output.WriteString(Avatar);
  230. }
  231. if (Identity != 0) {
  232. output.WriteRawTag(48);
  233. output.WriteUInt32(Identity);
  234. }
  235. if (Ready != false) {
  236. output.WriteRawTag(56);
  237. output.WriteBool(Ready);
  238. }
  239. if (Sit != 0) {
  240. output.WriteRawTag(64);
  241. output.WriteUInt32(Sit);
  242. }
  243. }
  244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  245. public int CalculateSize() {
  246. int size = 0;
  247. if (UserID != 0) {
  248. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UserID);
  249. }
  250. if (Openid.Length != 0) {
  251. size += 1 + pb::CodedOutputStream.ComputeStringSize(Openid);
  252. }
  253. if (Unionid.Length != 0) {
  254. size += 1 + pb::CodedOutputStream.ComputeStringSize(Unionid);
  255. }
  256. if (Nickname.Length != 0) {
  257. size += 1 + pb::CodedOutputStream.ComputeStringSize(Nickname);
  258. }
  259. if (Avatar.Length != 0) {
  260. size += 1 + pb::CodedOutputStream.ComputeStringSize(Avatar);
  261. }
  262. if (Identity != 0) {
  263. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Identity);
  264. }
  265. if (Ready != false) {
  266. size += 1 + 1;
  267. }
  268. if (Sit != 0) {
  269. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Sit);
  270. }
  271. return size;
  272. }
  273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  274. public void MergeFrom(UserInfo other) {
  275. if (other == null) {
  276. return;
  277. }
  278. if (other.UserID != 0) {
  279. UserID = other.UserID;
  280. }
  281. if (other.Openid.Length != 0) {
  282. Openid = other.Openid;
  283. }
  284. if (other.Unionid.Length != 0) {
  285. Unionid = other.Unionid;
  286. }
  287. if (other.Nickname.Length != 0) {
  288. Nickname = other.Nickname;
  289. }
  290. if (other.Avatar.Length != 0) {
  291. Avatar = other.Avatar;
  292. }
  293. if (other.Identity != 0) {
  294. Identity = other.Identity;
  295. }
  296. if (other.Ready != false) {
  297. Ready = other.Ready;
  298. }
  299. if (other.Sit != 0) {
  300. Sit = other.Sit;
  301. }
  302. }
  303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  304. public void MergeFrom(pb::CodedInputStream input) {
  305. uint tag;
  306. while ((tag = input.ReadTag()) != 0) {
  307. switch(tag) {
  308. default:
  309. input.SkipLastField();
  310. break;
  311. case 8: {
  312. UserID = input.ReadUInt32();
  313. break;
  314. }
  315. case 18: {
  316. Openid = input.ReadString();
  317. break;
  318. }
  319. case 26: {
  320. Unionid = input.ReadString();
  321. break;
  322. }
  323. case 34: {
  324. Nickname = input.ReadString();
  325. break;
  326. }
  327. case 42: {
  328. Avatar = input.ReadString();
  329. break;
  330. }
  331. case 48: {
  332. Identity = input.ReadUInt32();
  333. break;
  334. }
  335. case 56: {
  336. Ready = input.ReadBool();
  337. break;
  338. }
  339. case 64: {
  340. Sit = input.ReadUInt32();
  341. break;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. #endregion
  348. }
  349. #endregion Designer generated code