1
0

MessageHeader.pbj.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using pbd = global::Google.ProtocolBuffers.Descriptors;
  28. using pb = global::Google.ProtocolBuffers;
  29. namespace Sirikata.Protocol {
  30. public class Header : PBJ.IMessage {
  31. protected _PBJ_Internal.Header super;
  32. public _PBJ_Internal.Header _PBJSuper{ get { return super;} }
  33. public Header() {
  34. super=new _PBJ_Internal.Header();
  35. }
  36. public Header(_PBJ_Internal.Header reference) {
  37. super=reference;
  38. }
  39. public static Header defaultInstance= new Header (_PBJ_Internal.Header.DefaultInstance);
  40. public static Header DefaultInstance{
  41. get {return defaultInstance;}
  42. }
  43. public static pbd.MessageDescriptor Descriptor {
  44. get { return _PBJ_Internal.Header.Descriptor; } }
  45. public static class Types {
  46. public enum ReturnStatus {
  47. SUCCESS=_PBJ_Internal.Header.Types.ReturnStatus.SUCCESS,
  48. NETWORK_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.NETWORK_FAILURE,
  49. TIMEOUT_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.TIMEOUT_FAILURE,
  50. PROTOCOL_ERROR=_PBJ_Internal.Header.Types.ReturnStatus.PROTOCOL_ERROR,
  51. PORT_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.PORT_FAILURE,
  52. UNKNOWN_OBJECT=_PBJ_Internal.Header.Types.ReturnStatus.UNKNOWN_OBJECT
  53. };
  54. }
  55. public static bool WithinReservedFieldTagRange(int field_tag) {
  56. return false||(field_tag>=1&&field_tag<=8)||(field_tag>=1536&&field_tag<=2560)||(field_tag>=229376&&field_tag<=294912);
  57. }
  58. public static bool WithinExtensionFieldTagRange(int field_tag) {
  59. return false;
  60. }
  61. public const int SourceObjectFieldTag=1;
  62. public bool HasSourceObject{ get {return super.HasSourceObject&&PBJ._PBJ.ValidateUuid(super.SourceObject);} }
  63. public PBJ.UUID SourceObject{ get {
  64. if (HasSourceObject) {
  65. return PBJ._PBJ.CastUuid(super.SourceObject);
  66. } else {
  67. return PBJ._PBJ.CastUuid();
  68. }
  69. }
  70. }
  71. public const int SourcePortFieldTag=3;
  72. public bool HasSourcePort{ get {return super.HasSourcePort&&PBJ._PBJ.ValidateUint32(super.SourcePort);} }
  73. public uint SourcePort{ get {
  74. if (HasSourcePort) {
  75. return PBJ._PBJ.CastUint32(super.SourcePort);
  76. } else {
  77. return PBJ._PBJ.CastUint32();
  78. }
  79. }
  80. }
  81. public const int SourceSpaceFieldTag=1536;
  82. public bool HasSourceSpace{ get {return super.HasSourceSpace&&PBJ._PBJ.ValidateUuid(super.SourceSpace);} }
  83. public PBJ.UUID SourceSpace{ get {
  84. if (HasSourceSpace) {
  85. return PBJ._PBJ.CastUuid(super.SourceSpace);
  86. } else {
  87. return PBJ._PBJ.CastUuid();
  88. }
  89. }
  90. }
  91. public const int DestinationObjectFieldTag=2;
  92. public bool HasDestinationObject{ get {return super.HasDestinationObject&&PBJ._PBJ.ValidateUuid(super.DestinationObject);} }
  93. public PBJ.UUID DestinationObject{ get {
  94. if (HasDestinationObject) {
  95. return PBJ._PBJ.CastUuid(super.DestinationObject);
  96. } else {
  97. return PBJ._PBJ.CastUuid();
  98. }
  99. }
  100. }
  101. public const int DestinationPortFieldTag=4;
  102. public bool HasDestinationPort{ get {return super.HasDestinationPort&&PBJ._PBJ.ValidateUint32(super.DestinationPort);} }
  103. public uint DestinationPort{ get {
  104. if (HasDestinationPort) {
  105. return PBJ._PBJ.CastUint32(super.DestinationPort);
  106. } else {
  107. return PBJ._PBJ.CastUint32();
  108. }
  109. }
  110. }
  111. public const int DestinationSpaceFieldTag=1537;
  112. public bool HasDestinationSpace{ get {return super.HasDestinationSpace&&PBJ._PBJ.ValidateUuid(super.DestinationSpace);} }
  113. public PBJ.UUID DestinationSpace{ get {
  114. if (HasDestinationSpace) {
  115. return PBJ._PBJ.CastUuid(super.DestinationSpace);
  116. } else {
  117. return PBJ._PBJ.CastUuid();
  118. }
  119. }
  120. }
  121. public const int IdFieldTag=7;
  122. public bool HasId{ get {return super.HasId&&PBJ._PBJ.ValidateInt64(super.Id);} }
  123. public long Id{ get {
  124. if (HasId) {
  125. return PBJ._PBJ.CastInt64(super.Id);
  126. } else {
  127. return PBJ._PBJ.CastInt64();
  128. }
  129. }
  130. }
  131. public const int ReplyIdFieldTag=8;
  132. public bool HasReplyId{ get {return super.HasReplyId&&PBJ._PBJ.ValidateInt64(super.ReplyId);} }
  133. public long ReplyId{ get {
  134. if (HasReplyId) {
  135. return PBJ._PBJ.CastInt64(super.ReplyId);
  136. } else {
  137. return PBJ._PBJ.CastInt64();
  138. }
  139. }
  140. }
  141. public const int ReturnStatusFieldTag=1792;
  142. public bool HasReturnStatus{ get {return super.HasReturnStatus;} }
  143. public Types.ReturnStatus ReturnStatus{ get {
  144. if (HasReturnStatus) {
  145. return (Types.ReturnStatus)super.ReturnStatus;
  146. } else {
  147. return new Types.ReturnStatus();
  148. }
  149. }
  150. }
  151. public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
  152. public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
  153. public static Builder CreateBuilder() { return new Builder(); }
  154. public static Builder CreateBuilder(Header prototype) {
  155. return (Builder)new Builder().MergeFrom(prototype);
  156. }
  157. public static Header ParseFrom(pb::ByteString data) {
  158. return new Header(_PBJ_Internal.Header.ParseFrom(data));
  159. }
  160. public static Header ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
  161. return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
  162. }
  163. public static Header ParseFrom(byte[] data) {
  164. return new Header(_PBJ_Internal.Header.ParseFrom(data));
  165. }
  166. public static Header ParseFrom(byte[] data, pb::ExtensionRegistry er) {
  167. return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
  168. }
  169. public static Header ParseFrom(global::System.IO.Stream data) {
  170. return new Header(_PBJ_Internal.Header.ParseFrom(data));
  171. }
  172. public static Header ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
  173. return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
  174. }
  175. public static Header ParseFrom(pb::CodedInputStream data) {
  176. return new Header(_PBJ_Internal.Header.ParseFrom(data));
  177. }
  178. public static Header ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
  179. return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
  180. }
  181. protected override bool _HasAllPBJFields{ get {
  182. return true
  183. ;
  184. } }
  185. public bool IsInitialized { get {
  186. return super.IsInitialized&&_HasAllPBJFields;
  187. } }
  188. public class Builder : global::PBJ.IMessage.IBuilder{
  189. protected override bool _HasAllPBJFields{ get {
  190. return true
  191. ;
  192. } }
  193. public bool IsInitialized { get {
  194. return super.IsInitialized&&_HasAllPBJFields;
  195. } }
  196. protected _PBJ_Internal.Header.Builder super;
  197. public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
  198. public _PBJ_Internal.Header.Builder _PBJSuper{ get { return super;} }
  199. public Builder() {super = new _PBJ_Internal.Header.Builder();}
  200. public Builder(_PBJ_Internal.Header.Builder other) {
  201. super=other;
  202. }
  203. public Builder Clone() {return new Builder(super.Clone());}
  204. public Builder MergeFrom(Header prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
  205. public Builder Clear() {super.Clear();return this;}
  206. public Header BuildPartial() {return new Header(super.BuildPartial());}
  207. public Header Build() {if (_HasAllPBJFields) return new Header(super.Build());return null;}
  208. public pbd::MessageDescriptor DescriptorForType {
  209. get { return Header.Descriptor; } }
  210. public Builder ClearSourceObject() { super.ClearSourceObject();return this;}
  211. public const int SourceObjectFieldTag=1;
  212. public bool HasSourceObject{ get {return super.HasSourceObject&&PBJ._PBJ.ValidateUuid(super.SourceObject);} }
  213. public PBJ.UUID SourceObject{ get {
  214. if (HasSourceObject) {
  215. return PBJ._PBJ.CastUuid(super.SourceObject);
  216. } else {
  217. return PBJ._PBJ.CastUuid();
  218. }
  219. }
  220. set {
  221. super.SourceObject=(PBJ._PBJ.Construct(value));
  222. }
  223. }
  224. public Builder ClearSourcePort() { super.ClearSourcePort();return this;}
  225. public const int SourcePortFieldTag=3;
  226. public bool HasSourcePort{ get {return super.HasSourcePort&&PBJ._PBJ.ValidateUint32(super.SourcePort);} }
  227. public uint SourcePort{ get {
  228. if (HasSourcePort) {
  229. return PBJ._PBJ.CastUint32(super.SourcePort);
  230. } else {
  231. return PBJ._PBJ.CastUint32();
  232. }
  233. }
  234. set {
  235. super.SourcePort=(PBJ._PBJ.Construct(value));
  236. }
  237. }
  238. public Builder ClearSourceSpace() { super.ClearSourceSpace();return this;}
  239. public const int SourceSpaceFieldTag=1536;
  240. public bool HasSourceSpace{ get {return super.HasSourceSpace&&PBJ._PBJ.ValidateUuid(super.SourceSpace);} }
  241. public PBJ.UUID SourceSpace{ get {
  242. if (HasSourceSpace) {
  243. return PBJ._PBJ.CastUuid(super.SourceSpace);
  244. } else {
  245. return PBJ._PBJ.CastUuid();
  246. }
  247. }
  248. set {
  249. super.SourceSpace=(PBJ._PBJ.Construct(value));
  250. }
  251. }
  252. public Builder ClearDestinationObject() { super.ClearDestinationObject();return this;}
  253. public const int DestinationObjectFieldTag=2;
  254. public bool HasDestinationObject{ get {return super.HasDestinationObject&&PBJ._PBJ.ValidateUuid(super.DestinationObject);} }
  255. public PBJ.UUID DestinationObject{ get {
  256. if (HasDestinationObject) {
  257. return PBJ._PBJ.CastUuid(super.DestinationObject);
  258. } else {
  259. return PBJ._PBJ.CastUuid();
  260. }
  261. }
  262. set {
  263. super.DestinationObject=(PBJ._PBJ.Construct(value));
  264. }
  265. }
  266. public Builder ClearDestinationPort() { super.ClearDestinationPort();return this;}
  267. public const int DestinationPortFieldTag=4;
  268. public bool HasDestinationPort{ get {return super.HasDestinationPort&&PBJ._PBJ.ValidateUint32(super.DestinationPort);} }
  269. public uint DestinationPort{ get {
  270. if (HasDestinationPort) {
  271. return PBJ._PBJ.CastUint32(super.DestinationPort);
  272. } else {
  273. return PBJ._PBJ.CastUint32();
  274. }
  275. }
  276. set {
  277. super.DestinationPort=(PBJ._PBJ.Construct(value));
  278. }
  279. }
  280. public Builder ClearDestinationSpace() { super.ClearDestinationSpace();return this;}
  281. public const int DestinationSpaceFieldTag=1537;
  282. public bool HasDestinationSpace{ get {return super.HasDestinationSpace&&PBJ._PBJ.ValidateUuid(super.DestinationSpace);} }
  283. public PBJ.UUID DestinationSpace{ get {
  284. if (HasDestinationSpace) {
  285. return PBJ._PBJ.CastUuid(super.DestinationSpace);
  286. } else {
  287. return PBJ._PBJ.CastUuid();
  288. }
  289. }
  290. set {
  291. super.DestinationSpace=(PBJ._PBJ.Construct(value));
  292. }
  293. }
  294. public Builder ClearId() { super.ClearId();return this;}
  295. public const int IdFieldTag=7;
  296. public bool HasId{ get {return super.HasId&&PBJ._PBJ.ValidateInt64(super.Id);} }
  297. public long Id{ get {
  298. if (HasId) {
  299. return PBJ._PBJ.CastInt64(super.Id);
  300. } else {
  301. return PBJ._PBJ.CastInt64();
  302. }
  303. }
  304. set {
  305. super.Id=(PBJ._PBJ.Construct(value));
  306. }
  307. }
  308. public Builder ClearReplyId() { super.ClearReplyId();return this;}
  309. public const int ReplyIdFieldTag=8;
  310. public bool HasReplyId{ get {return super.HasReplyId&&PBJ._PBJ.ValidateInt64(super.ReplyId);} }
  311. public long ReplyId{ get {
  312. if (HasReplyId) {
  313. return PBJ._PBJ.CastInt64(super.ReplyId);
  314. } else {
  315. return PBJ._PBJ.CastInt64();
  316. }
  317. }
  318. set {
  319. super.ReplyId=(PBJ._PBJ.Construct(value));
  320. }
  321. }
  322. public Builder ClearReturnStatus() { super.ClearReturnStatus();return this;}
  323. public const int ReturnStatusFieldTag=1792;
  324. public bool HasReturnStatus{ get {return super.HasReturnStatus;} }
  325. public Types.ReturnStatus ReturnStatus{ get {
  326. if (HasReturnStatus) {
  327. return (Types.ReturnStatus)super.ReturnStatus;
  328. } else {
  329. return new Types.ReturnStatus();
  330. }
  331. }
  332. set {
  333. super.ReturnStatus=((_PBJ_Internal.Header.Types.ReturnStatus)value);
  334. }
  335. }
  336. }
  337. }
  338. }