PageRenderTime 44ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/DotNet/Source/ProtoBufRemote/RpcMessage.cs

https://code.google.com/p/protobuf-remote/
C# | 333 lines | 285 code | 38 blank | 10 comment | 36 complexity | 99d0ef27beba871eecea231860b65720 MD5 | raw file
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. //
  5. // Changes to this file may cause incorrect behavior and will be lost if
  6. // the code is regenerated.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. // Option: missing-value detection (*Specified/ShouldSerialize*/Reset*) enabled
  10. // Generated from: RpcMessage.proto
  11. namespace ProtoBufRemote
  12. {
  13. [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"RpcMessage")]
  14. public partial class RpcMessage : global::ProtoBuf.IExtensible
  15. {
  16. public RpcMessage() {}
  17. private int _id;
  18. [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"id", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
  19. public int Id
  20. {
  21. get { return _id; }
  22. set { _id = value; }
  23. }
  24. private ProtoBufRemote.RpcMessage.Call _callMessage = null;
  25. [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"call_message", DataFormat = global::ProtoBuf.DataFormat.Default)]
  26. [global::System.ComponentModel.DefaultValue(null)]
  27. public ProtoBufRemote.RpcMessage.Call CallMessage
  28. {
  29. get { return _callMessage; }
  30. set { _callMessage = value; }
  31. }
  32. private ProtoBufRemote.RpcMessage.Result _resultMessage = null;
  33. [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"result_message", DataFormat = global::ProtoBuf.DataFormat.Default)]
  34. [global::System.ComponentModel.DefaultValue(null)]
  35. public ProtoBufRemote.RpcMessage.Result ResultMessage
  36. {
  37. get { return _resultMessage; }
  38. set { _resultMessage = value; }
  39. }
  40. [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"Call")]
  41. public partial class Call : global::ProtoBuf.IExtensible
  42. {
  43. public Call() {}
  44. private string _service;
  45. [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"service", DataFormat = global::ProtoBuf.DataFormat.Default)]
  46. public string Service
  47. {
  48. get { return _service; }
  49. set { _service = value; }
  50. }
  51. private string _method;
  52. [global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"method", DataFormat = global::ProtoBuf.DataFormat.Default)]
  53. public string Method
  54. {
  55. get { return _method; }
  56. set { _method = value; }
  57. }
  58. private readonly global::System.Collections.Generic.List<ProtoBufRemote.RpcMessage.Parameter> _parameters = new global::System.Collections.Generic.List<ProtoBufRemote.RpcMessage.Parameter>();
  59. [global::ProtoBuf.ProtoMember(3, Name=@"parameters", DataFormat = global::ProtoBuf.DataFormat.Default)]
  60. public global::System.Collections.Generic.List<ProtoBufRemote.RpcMessage.Parameter> Parameters
  61. {
  62. get { return _parameters; }
  63. }
  64. private bool _expectsResult;
  65. [global::ProtoBuf.ProtoMember(4, IsRequired = true, Name=@"expects_result", DataFormat = global::ProtoBuf.DataFormat.Default)]
  66. public bool ExpectsResult
  67. {
  68. get { return _expectsResult; }
  69. set { _expectsResult = value; }
  70. }
  71. private global::ProtoBuf.IExtension extensionObject;
  72. global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
  73. { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  74. }
  75. [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"Result")]
  76. public partial class Result : global::ProtoBuf.IExtensible
  77. {
  78. public Result() {}
  79. private bool? _isFailed;
  80. [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"is_failed", DataFormat = global::ProtoBuf.DataFormat.Default)]
  81. public bool IsFailed
  82. {
  83. get { return _isFailed?? default(bool); }
  84. set { _isFailed = value; }
  85. }
  86. [global::System.Xml.Serialization.XmlIgnore]
  87. [global::System.ComponentModel.Browsable(false)]
  88. public bool IsFailedSpecified
  89. {
  90. get { return _isFailed != null; }
  91. set { if (value == (_isFailed== null)) _isFailed = value ? IsFailed : (bool?)null; }
  92. }
  93. private bool ShouldSerializeIsFailed() { return IsFailedSpecified; }
  94. private void ResetIsFailed() { IsFailedSpecified = false; }
  95. private string _errorMessage;
  96. [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"error_message", DataFormat = global::ProtoBuf.DataFormat.Default)]
  97. public string ErrorMessage
  98. {
  99. get { return _errorMessage?? ""; }
  100. set { _errorMessage = value; }
  101. }
  102. [global::System.Xml.Serialization.XmlIgnore]
  103. [global::System.ComponentModel.Browsable(false)]
  104. public bool ErrorMessageSpecified
  105. {
  106. get { return _errorMessage != null; }
  107. set { if (value == (_errorMessage== null)) _errorMessage = value ? ErrorMessage : (string)null; }
  108. }
  109. private bool ShouldSerializeErrorMessage() { return ErrorMessageSpecified; }
  110. private void ResetErrorMessage() { ErrorMessageSpecified = false; }
  111. private ProtoBufRemote.RpcMessage.Parameter _callResult = null;
  112. [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"call_result", DataFormat = global::ProtoBuf.DataFormat.Default)]
  113. [global::System.ComponentModel.DefaultValue(null)]
  114. public ProtoBufRemote.RpcMessage.Parameter CallResult
  115. {
  116. get { return _callResult; }
  117. set { _callResult = value; }
  118. }
  119. private global::ProtoBuf.IExtension extensionObject;
  120. global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
  121. { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  122. }
  123. [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"Parameter")]
  124. public partial class Parameter : global::ProtoBuf.IExtensible
  125. {
  126. public Parameter() {}
  127. private byte[] _protoParam;
  128. [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"proto_param", DataFormat = global::ProtoBuf.DataFormat.Default)]
  129. public byte[] ProtoParam
  130. {
  131. get { return _protoParam?? null; }
  132. set { _protoParam = value; }
  133. }
  134. [global::System.Xml.Serialization.XmlIgnore]
  135. [global::System.ComponentModel.Browsable(false)]
  136. public bool ProtoParamSpecified
  137. {
  138. get { return _protoParam != null; }
  139. set { if (value == (_protoParam== null)) _protoParam = value ? ProtoParam : (byte[])null; }
  140. }
  141. private bool ShouldSerializeProtoParam() { return ProtoParamSpecified; }
  142. private void ResetProtoParam() { ProtoParamSpecified = false; }
  143. private string _stringParam;
  144. [global::ProtoBuf.ProtoMember(2, IsRequired = false, Name=@"string_param", DataFormat = global::ProtoBuf.DataFormat.Default)]
  145. public string StringParam
  146. {
  147. get { return _stringParam?? ""; }
  148. set { _stringParam = value; }
  149. }
  150. [global::System.Xml.Serialization.XmlIgnore]
  151. [global::System.ComponentModel.Browsable(false)]
  152. public bool StringParamSpecified
  153. {
  154. get { return _stringParam != null; }
  155. set { if (value == (_stringParam== null)) _stringParam = value ? StringParam : (string)null; }
  156. }
  157. private bool ShouldSerializeStringParam() { return StringParamSpecified; }
  158. private void ResetStringParam() { StringParamSpecified = false; }
  159. private int? _intParam;
  160. [global::ProtoBuf.ProtoMember(3, IsRequired = false, Name=@"int_param", DataFormat = global::ProtoBuf.DataFormat.ZigZag)]
  161. public int IntParam
  162. {
  163. get { return _intParam?? default(int); }
  164. set { _intParam = value; }
  165. }
  166. [global::System.Xml.Serialization.XmlIgnore]
  167. [global::System.ComponentModel.Browsable(false)]
  168. public bool IntParamSpecified
  169. {
  170. get { return _intParam != null; }
  171. set { if (value == (_intParam== null)) _intParam = value ? IntParam : (int?)null; }
  172. }
  173. private bool ShouldSerializeIntParam() { return IntParamSpecified; }
  174. private void ResetIntParam() { IntParamSpecified = false; }
  175. private uint? _uintParam;
  176. [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"uint_param", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
  177. public uint UintParam
  178. {
  179. get { return _uintParam?? default(uint); }
  180. set { _uintParam = value; }
  181. }
  182. [global::System.Xml.Serialization.XmlIgnore]
  183. [global::System.ComponentModel.Browsable(false)]
  184. public bool UintParamSpecified
  185. {
  186. get { return _uintParam != null; }
  187. set { if (value == (_uintParam== null)) _uintParam = value ? UintParam : (uint?)null; }
  188. }
  189. private bool ShouldSerializeUintParam() { return UintParamSpecified; }
  190. private void ResetUintParam() { UintParamSpecified = false; }
  191. private long? _int64Param;
  192. [global::ProtoBuf.ProtoMember(5, IsRequired = false, Name=@"int64_param", DataFormat = global::ProtoBuf.DataFormat.ZigZag)]
  193. public long Int64Param
  194. {
  195. get { return _int64Param?? default(long); }
  196. set { _int64Param = value; }
  197. }
  198. [global::System.Xml.Serialization.XmlIgnore]
  199. [global::System.ComponentModel.Browsable(false)]
  200. public bool Int64ParamSpecified
  201. {
  202. get { return _int64Param != null; }
  203. set { if (value == (_int64Param== null)) _int64Param = value ? Int64Param : (long?)null; }
  204. }
  205. private bool ShouldSerializeInt64Param() { return Int64ParamSpecified; }
  206. private void ResetInt64Param() { Int64ParamSpecified = false; }
  207. private ulong? _uint64Param;
  208. [global::ProtoBuf.ProtoMember(6, IsRequired = false, Name=@"uint64_param", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
  209. public ulong Uint64Param
  210. {
  211. get { return _uint64Param?? default(ulong); }
  212. set { _uint64Param = value; }
  213. }
  214. [global::System.Xml.Serialization.XmlIgnore]
  215. [global::System.ComponentModel.Browsable(false)]
  216. public bool Uint64ParamSpecified
  217. {
  218. get { return _uint64Param != null; }
  219. set { if (value == (_uint64Param== null)) _uint64Param = value ? Uint64Param : (ulong?)null; }
  220. }
  221. private bool ShouldSerializeUint64Param() { return Uint64ParamSpecified; }
  222. private void ResetUint64Param() { Uint64ParamSpecified = false; }
  223. private bool? _boolParam;
  224. [global::ProtoBuf.ProtoMember(7, IsRequired = false, Name=@"bool_param", DataFormat = global::ProtoBuf.DataFormat.Default)]
  225. public bool BoolParam
  226. {
  227. get { return _boolParam?? default(bool); }
  228. set { _boolParam = value; }
  229. }
  230. [global::System.Xml.Serialization.XmlIgnore]
  231. [global::System.ComponentModel.Browsable(false)]
  232. public bool BoolParamSpecified
  233. {
  234. get { return _boolParam != null; }
  235. set { if (value == (_boolParam== null)) _boolParam = value ? BoolParam : (bool?)null; }
  236. }
  237. private bool ShouldSerializeBoolParam() { return BoolParamSpecified; }
  238. private void ResetBoolParam() { BoolParamSpecified = false; }
  239. private float? _floatParam;
  240. [global::ProtoBuf.ProtoMember(8, IsRequired = false, Name=@"float_param", DataFormat = global::ProtoBuf.DataFormat.FixedSize)]
  241. public float FloatParam
  242. {
  243. get { return _floatParam?? default(float); }
  244. set { _floatParam = value; }
  245. }
  246. [global::System.Xml.Serialization.XmlIgnore]
  247. [global::System.ComponentModel.Browsable(false)]
  248. public bool FloatParamSpecified
  249. {
  250. get { return _floatParam != null; }
  251. set { if (value == (_floatParam== null)) _floatParam = value ? FloatParam : (float?)null; }
  252. }
  253. private bool ShouldSerializeFloatParam() { return FloatParamSpecified; }
  254. private void ResetFloatParam() { FloatParamSpecified = false; }
  255. private double? _doubleParam;
  256. [global::ProtoBuf.ProtoMember(9, IsRequired = false, Name=@"double_param", DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
  257. public double DoubleParam
  258. {
  259. get { return _doubleParam?? default(double); }
  260. set { _doubleParam = value; }
  261. }
  262. [global::System.Xml.Serialization.XmlIgnore]
  263. [global::System.ComponentModel.Browsable(false)]
  264. public bool DoubleParamSpecified
  265. {
  266. get { return _doubleParam != null; }
  267. set { if (value == (_doubleParam== null)) _doubleParam = value ? DoubleParam : (double?)null; }
  268. }
  269. private bool ShouldSerializeDoubleParam() { return DoubleParamSpecified; }
  270. private void ResetDoubleParam() { DoubleParamSpecified = false; }
  271. private bool? _isNull;
  272. [global::ProtoBuf.ProtoMember(10, IsRequired = false, Name=@"is_null", DataFormat = global::ProtoBuf.DataFormat.Default)]
  273. public bool IsNull
  274. {
  275. get { return _isNull?? default(bool); }
  276. set { _isNull = value; }
  277. }
  278. [global::System.Xml.Serialization.XmlIgnore]
  279. [global::System.ComponentModel.Browsable(false)]
  280. public bool IsNullSpecified
  281. {
  282. get { return _isNull != null; }
  283. set { if (value == (_isNull== null)) _isNull = value ? IsNull : (bool?)null; }
  284. }
  285. private bool ShouldSerializeIsNull() { return IsNullSpecified; }
  286. private void ResetIsNull() { IsNullSpecified = false; }
  287. private global::ProtoBuf.IExtension extensionObject;
  288. global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
  289. { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  290. }
  291. private global::ProtoBuf.IExtension extensionObject;
  292. global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
  293. { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  294. }
  295. }