Userinfo.cs 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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. "Cg51c2VyaW5mby5wcm90bxIGcHJvdG9zIl0KCFVzZXJJbmZvEg4KBlVzZXJJ",
  22. "RBgBIAEoBRIOCgZPcGVuaWQYAiABKAkSDwoHVW5pb25pZBgDIAEoCRIQCghO",
  23. "aWNrbmFtZRgEIAEoCRIOCgZBdmF0YXIYBSABKAliBnByb3RvMw=="));
  24. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  25. new pbr::FileDescriptor[] { },
  26. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  27. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.UserInfo), global::Protos.UserInfo.Parser, new[]{ "UserID", "Openid", "Unionid", "Nickname", "Avatar" }, null, null, null)
  28. }));
  29. }
  30. #endregion
  31. }
  32. #region Messages
  33. public sealed partial class UserInfo : pb::IMessage<UserInfo> {
  34. private static readonly pb::MessageParser<UserInfo> _parser = new pb::MessageParser<UserInfo>(() => new UserInfo());
  35. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  36. public static pb::MessageParser<UserInfo> Parser { get { return _parser; } }
  37. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  38. public static pbr::MessageDescriptor Descriptor {
  39. get { return global::Protos.UserinfoReflection.Descriptor.MessageTypes[0]; }
  40. }
  41. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  42. pbr::MessageDescriptor pb::IMessage.Descriptor {
  43. get { return Descriptor; }
  44. }
  45. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  46. public UserInfo() {
  47. OnConstruction();
  48. }
  49. partial void OnConstruction();
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. public UserInfo(UserInfo other) : this() {
  52. userID_ = other.userID_;
  53. openid_ = other.openid_;
  54. unionid_ = other.unionid_;
  55. nickname_ = other.nickname_;
  56. avatar_ = other.avatar_;
  57. }
  58. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  59. public UserInfo Clone() {
  60. return new UserInfo(this);
  61. }
  62. /// <summary>Field number for the "UserID" field.</summary>
  63. public const int UserIDFieldNumber = 1;
  64. private int userID_;
  65. /// <summary>
  66. /// 用户id
  67. /// </summary>
  68. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  69. public int UserID {
  70. get { return userID_; }
  71. set {
  72. userID_ = value;
  73. }
  74. }
  75. /// <summary>Field number for the "Openid" field.</summary>
  76. public const int OpenidFieldNumber = 2;
  77. private string openid_ = "";
  78. /// <summary>
  79. /// 平台openid
  80. /// </summary>
  81. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  82. public string Openid {
  83. get { return openid_; }
  84. set {
  85. openid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  86. }
  87. }
  88. /// <summary>Field number for the "Unionid" field.</summary>
  89. public const int UnionidFieldNumber = 3;
  90. private string unionid_ = "";
  91. /// <summary>
  92. /// 平台unionid
  93. /// </summary>
  94. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  95. public string Unionid {
  96. get { return unionid_; }
  97. set {
  98. unionid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  99. }
  100. }
  101. /// <summary>Field number for the "Nickname" field.</summary>
  102. public const int NicknameFieldNumber = 4;
  103. private string nickname_ = "";
  104. /// <summary>
  105. /// 用户昵称
  106. /// </summary>
  107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  108. public string Nickname {
  109. get { return nickname_; }
  110. set {
  111. nickname_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  112. }
  113. }
  114. /// <summary>Field number for the "Avatar" field.</summary>
  115. public const int AvatarFieldNumber = 5;
  116. private string avatar_ = "";
  117. /// <summary>
  118. /// 用户形象
  119. /// </summary>
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  121. public string Avatar {
  122. get { return avatar_; }
  123. set {
  124. avatar_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  125. }
  126. }
  127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  128. public override bool Equals(object other) {
  129. return Equals(other as UserInfo);
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. public bool Equals(UserInfo other) {
  133. if (ReferenceEquals(other, null)) {
  134. return false;
  135. }
  136. if (ReferenceEquals(other, this)) {
  137. return true;
  138. }
  139. if (UserID != other.UserID) return false;
  140. if (Openid != other.Openid) return false;
  141. if (Unionid != other.Unionid) return false;
  142. if (Nickname != other.Nickname) return false;
  143. if (Avatar != other.Avatar) return false;
  144. return true;
  145. }
  146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  147. public override int GetHashCode() {
  148. int hash = 1;
  149. if (UserID != 0) hash ^= UserID.GetHashCode();
  150. if (Openid.Length != 0) hash ^= Openid.GetHashCode();
  151. if (Unionid.Length != 0) hash ^= Unionid.GetHashCode();
  152. if (Nickname.Length != 0) hash ^= Nickname.GetHashCode();
  153. if (Avatar.Length != 0) hash ^= Avatar.GetHashCode();
  154. return hash;
  155. }
  156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  157. public override string ToString() {
  158. return pb::JsonFormatter.ToDiagnosticString(this);
  159. }
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  161. public void WriteTo(pb::CodedOutputStream output) {
  162. if (UserID != 0) {
  163. output.WriteRawTag(8);
  164. output.WriteInt32(UserID);
  165. }
  166. if (Openid.Length != 0) {
  167. output.WriteRawTag(18);
  168. output.WriteString(Openid);
  169. }
  170. if (Unionid.Length != 0) {
  171. output.WriteRawTag(26);
  172. output.WriteString(Unionid);
  173. }
  174. if (Nickname.Length != 0) {
  175. output.WriteRawTag(34);
  176. output.WriteString(Nickname);
  177. }
  178. if (Avatar.Length != 0) {
  179. output.WriteRawTag(42);
  180. output.WriteString(Avatar);
  181. }
  182. }
  183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  184. public int CalculateSize() {
  185. int size = 0;
  186. if (UserID != 0) {
  187. size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserID);
  188. }
  189. if (Openid.Length != 0) {
  190. size += 1 + pb::CodedOutputStream.ComputeStringSize(Openid);
  191. }
  192. if (Unionid.Length != 0) {
  193. size += 1 + pb::CodedOutputStream.ComputeStringSize(Unionid);
  194. }
  195. if (Nickname.Length != 0) {
  196. size += 1 + pb::CodedOutputStream.ComputeStringSize(Nickname);
  197. }
  198. if (Avatar.Length != 0) {
  199. size += 1 + pb::CodedOutputStream.ComputeStringSize(Avatar);
  200. }
  201. return size;
  202. }
  203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  204. public void MergeFrom(UserInfo other) {
  205. if (other == null) {
  206. return;
  207. }
  208. if (other.UserID != 0) {
  209. UserID = other.UserID;
  210. }
  211. if (other.Openid.Length != 0) {
  212. Openid = other.Openid;
  213. }
  214. if (other.Unionid.Length != 0) {
  215. Unionid = other.Unionid;
  216. }
  217. if (other.Nickname.Length != 0) {
  218. Nickname = other.Nickname;
  219. }
  220. if (other.Avatar.Length != 0) {
  221. Avatar = other.Avatar;
  222. }
  223. }
  224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  225. public void MergeFrom(pb::CodedInputStream input) {
  226. uint tag;
  227. while ((tag = input.ReadTag()) != 0) {
  228. switch(tag) {
  229. default:
  230. input.SkipLastField();
  231. break;
  232. case 8: {
  233. UserID = input.ReadInt32();
  234. break;
  235. }
  236. case 18: {
  237. Openid = input.ReadString();
  238. break;
  239. }
  240. case 26: {
  241. Unionid = input.ReadString();
  242. break;
  243. }
  244. case 34: {
  245. Nickname = input.ReadString();
  246. break;
  247. }
  248. case 42: {
  249. Avatar = input.ReadString();
  250. break;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. #endregion
  257. }
  258. #endregion Designer generated code