Time.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. using pb = global::Google.ProtocolBuffers;
  3. using pbc = global::Google.ProtocolBuffers.Collections;
  4. using pbd = global::Google.ProtocolBuffers.Descriptors;
  5. using scg = global::System.Collections.Generic;
  6. namespace Sirikata.Network.Protocol._PBJ_Internal {
  7. public static partial class Time {
  8. #region Extension registration
  9. public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
  10. }
  11. #endregion
  12. #region Static variables
  13. internal static pbd::MessageDescriptor internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor;
  14. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync, global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Builder> internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable;
  15. #endregion
  16. #region Descriptor
  17. public static pbd::FileDescriptor Descriptor {
  18. get { return descriptor; }
  19. }
  20. private static pbd::FileDescriptor descriptor;
  21. static Time() {
  22. byte[] descriptorData = global::System.Convert.FromBase64String(
  23. "CgpUaW1lLnByb3RvEidTaXJpa2F0YS5OZXR3b3JrLlByb3RvY29sLl9QQkpf" +
  24. "SW50ZXJuYWwirQEKCFRpbWVTeW5jEhMKC2NsaWVudF90aW1lGAkgASgGEhMK" +
  25. "C3NlcnZlcl90aW1lGAogASgGEhIKCnN5bmNfcm91bmQYCyABKAQSFgoOcmV0" +
  26. "dXJuX29wdGlvbnMYDiABKA0SEwoKcm91bmRfdHJpcBiBFCABKAYiNgoNUmV0" +
  27. "dXJuT3B0aW9ucxISCg5SRVBMWV9SRUxJQUJMRRABEhEKDVJFUExZX09SREVS" +
  28. "RUQQAg==");
  29. pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
  30. descriptor = root;
  31. internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor = Descriptor.MessageTypes[0];
  32. internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable =
  33. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync, global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Builder>(internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor,
  34. new string[] { "ClientTime", "ServerTime", "SyncRound", "ReturnOptions", "RoundTrip", });
  35. return null;
  36. };
  37. pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
  38. new pbd::FileDescriptor[] {
  39. }, assigner);
  40. }
  41. #endregion
  42. }
  43. #region Messages
  44. public sealed partial class TimeSync : pb::GeneratedMessage<TimeSync, TimeSync.Builder> {
  45. private static readonly TimeSync defaultInstance = new Builder().BuildPartial();
  46. public static TimeSync DefaultInstance {
  47. get { return defaultInstance; }
  48. }
  49. public override TimeSync DefaultInstanceForType {
  50. get { return defaultInstance; }
  51. }
  52. protected override TimeSync ThisMessage {
  53. get { return this; }
  54. }
  55. public static pbd::MessageDescriptor Descriptor {
  56. get { return global::Sirikata.Network.Protocol._PBJ_Internal.Time.internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor; }
  57. }
  58. protected override pb::FieldAccess.FieldAccessorTable<TimeSync, TimeSync.Builder> InternalFieldAccessors {
  59. get { return global::Sirikata.Network.Protocol._PBJ_Internal.Time.internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable; }
  60. }
  61. #region Nested types
  62. public static class Types {
  63. public enum ReturnOptions {
  64. REPLY_RELIABLE = 1,
  65. REPLY_ORDERED = 2,
  66. }
  67. }
  68. #endregion
  69. public const int ClientTimeFieldNumber = 9;
  70. private bool hasClientTime;
  71. private ulong clientTime_ = 0;
  72. public bool HasClientTime {
  73. get { return hasClientTime; }
  74. }
  75. [global::System.CLSCompliant(false)]
  76. public ulong ClientTime {
  77. get { return clientTime_; }
  78. }
  79. public const int ServerTimeFieldNumber = 10;
  80. private bool hasServerTime;
  81. private ulong serverTime_ = 0;
  82. public bool HasServerTime {
  83. get { return hasServerTime; }
  84. }
  85. [global::System.CLSCompliant(false)]
  86. public ulong ServerTime {
  87. get { return serverTime_; }
  88. }
  89. public const int SyncRoundFieldNumber = 11;
  90. private bool hasSyncRound;
  91. private ulong syncRound_ = 0UL;
  92. public bool HasSyncRound {
  93. get { return hasSyncRound; }
  94. }
  95. [global::System.CLSCompliant(false)]
  96. public ulong SyncRound {
  97. get { return syncRound_; }
  98. }
  99. public const int ReturnOptionsFieldNumber = 14;
  100. private bool hasReturnOptions;
  101. private uint returnOptions_ = 0;
  102. public bool HasReturnOptions {
  103. get { return hasReturnOptions; }
  104. }
  105. [global::System.CLSCompliant(false)]
  106. public uint ReturnOptions {
  107. get { return returnOptions_; }
  108. }
  109. public const int RoundTripFieldNumber = 2561;
  110. private bool hasRoundTrip;
  111. private ulong roundTrip_ = 0;
  112. public bool HasRoundTrip {
  113. get { return hasRoundTrip; }
  114. }
  115. [global::System.CLSCompliant(false)]
  116. public ulong RoundTrip {
  117. get { return roundTrip_; }
  118. }
  119. public override bool IsInitialized {
  120. get {
  121. return true;
  122. }
  123. }
  124. public override void WriteTo(pb::CodedOutputStream output) {
  125. if (HasClientTime) {
  126. output.WriteFixed64(9, ClientTime);
  127. }
  128. if (HasServerTime) {
  129. output.WriteFixed64(10, ServerTime);
  130. }
  131. if (HasSyncRound) {
  132. output.WriteUInt64(11, SyncRound);
  133. }
  134. if (HasReturnOptions) {
  135. output.WriteUInt32(14, ReturnOptions);
  136. }
  137. if (HasRoundTrip) {
  138. output.WriteFixed64(2561, RoundTrip);
  139. }
  140. UnknownFields.WriteTo(output);
  141. }
  142. private int memoizedSerializedSize = -1;
  143. public override int SerializedSize {
  144. get {
  145. int size = memoizedSerializedSize;
  146. if (size != -1) return size;
  147. size = 0;
  148. if (HasClientTime) {
  149. size += pb::CodedOutputStream.ComputeFixed64Size(9, ClientTime);
  150. }
  151. if (HasServerTime) {
  152. size += pb::CodedOutputStream.ComputeFixed64Size(10, ServerTime);
  153. }
  154. if (HasSyncRound) {
  155. size += pb::CodedOutputStream.ComputeUInt64Size(11, SyncRound);
  156. }
  157. if (HasReturnOptions) {
  158. size += pb::CodedOutputStream.ComputeUInt32Size(14, ReturnOptions);
  159. }
  160. if (HasRoundTrip) {
  161. size += pb::CodedOutputStream.ComputeFixed64Size(2561, RoundTrip);
  162. }
  163. size += UnknownFields.SerializedSize;
  164. memoizedSerializedSize = size;
  165. return size;
  166. }
  167. }
  168. public static TimeSync ParseFrom(pb::ByteString data) {
  169. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  170. }
  171. public static TimeSync ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  172. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  173. }
  174. public static TimeSync ParseFrom(byte[] data) {
  175. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  176. }
  177. public static TimeSync ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  178. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  179. }
  180. public static TimeSync ParseFrom(global::System.IO.Stream input) {
  181. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  182. }
  183. public static TimeSync ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  184. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  185. }
  186. public static TimeSync ParseDelimitedFrom(global::System.IO.Stream input) {
  187. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  188. }
  189. public static TimeSync ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  190. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  191. }
  192. public static TimeSync ParseFrom(pb::CodedInputStream input) {
  193. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  194. }
  195. public static TimeSync ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  196. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  197. }
  198. public static Builder CreateBuilder() { return new Builder(); }
  199. public override Builder ToBuilder() { return CreateBuilder(this); }
  200. public override Builder CreateBuilderForType() { return new Builder(); }
  201. public static Builder CreateBuilder(TimeSync prototype) {
  202. return (Builder) new Builder().MergeFrom(prototype);
  203. }
  204. public sealed partial class Builder : pb::GeneratedBuilder<TimeSync, Builder> {
  205. protected override Builder ThisBuilder {
  206. get { return this; }
  207. }
  208. public Builder() {}
  209. TimeSync result = new TimeSync();
  210. protected override TimeSync MessageBeingBuilt {
  211. get { return result; }
  212. }
  213. public override Builder Clear() {
  214. result = new TimeSync();
  215. return this;
  216. }
  217. public override Builder Clone() {
  218. return new Builder().MergeFrom(result);
  219. }
  220. public override pbd::MessageDescriptor DescriptorForType {
  221. get { return global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Descriptor; }
  222. }
  223. public override TimeSync DefaultInstanceForType {
  224. get { return global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.DefaultInstance; }
  225. }
  226. public override TimeSync BuildPartial() {
  227. if (result == null) {
  228. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  229. }
  230. TimeSync returnMe = result;
  231. result = null;
  232. return returnMe;
  233. }
  234. public override Builder MergeFrom(pb::IMessage other) {
  235. if (other is TimeSync) {
  236. return MergeFrom((TimeSync) other);
  237. } else {
  238. base.MergeFrom(other);
  239. return this;
  240. }
  241. }
  242. public override Builder MergeFrom(TimeSync other) {
  243. if (other == global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.DefaultInstance) return this;
  244. if (other.HasClientTime) {
  245. ClientTime = other.ClientTime;
  246. }
  247. if (other.HasServerTime) {
  248. ServerTime = other.ServerTime;
  249. }
  250. if (other.HasSyncRound) {
  251. SyncRound = other.SyncRound;
  252. }
  253. if (other.HasReturnOptions) {
  254. ReturnOptions = other.ReturnOptions;
  255. }
  256. if (other.HasRoundTrip) {
  257. RoundTrip = other.RoundTrip;
  258. }
  259. this.MergeUnknownFields(other.UnknownFields);
  260. return this;
  261. }
  262. public override Builder MergeFrom(pb::CodedInputStream input) {
  263. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  264. }
  265. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  266. pb::UnknownFieldSet.Builder unknownFields = null;
  267. while (true) {
  268. uint tag = input.ReadTag();
  269. switch (tag) {
  270. case 0: {
  271. if (unknownFields != null) {
  272. this.UnknownFields = unknownFields.Build();
  273. }
  274. return this;
  275. }
  276. default: {
  277. if (pb::WireFormat.IsEndGroupTag(tag)) {
  278. if (unknownFields != null) {
  279. this.UnknownFields = unknownFields.Build();
  280. }
  281. return this;
  282. }
  283. if (unknownFields == null) {
  284. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  285. }
  286. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  287. break;
  288. }
  289. case 73: {
  290. ClientTime = input.ReadFixed64();
  291. break;
  292. }
  293. case 81: {
  294. ServerTime = input.ReadFixed64();
  295. break;
  296. }
  297. case 88: {
  298. SyncRound = input.ReadUInt64();
  299. break;
  300. }
  301. case 112: {
  302. ReturnOptions = input.ReadUInt32();
  303. break;
  304. }
  305. case 20489: {
  306. RoundTrip = input.ReadFixed64();
  307. break;
  308. }
  309. }
  310. }
  311. }
  312. public bool HasClientTime {
  313. get { return result.HasClientTime; }
  314. }
  315. [global::System.CLSCompliant(false)]
  316. public ulong ClientTime {
  317. get { return result.ClientTime; }
  318. set { SetClientTime(value); }
  319. }
  320. [global::System.CLSCompliant(false)]
  321. public Builder SetClientTime(ulong value) {
  322. result.hasClientTime = true;
  323. result.clientTime_ = value;
  324. return this;
  325. }
  326. public Builder ClearClientTime() {
  327. result.hasClientTime = false;
  328. result.clientTime_ = 0;
  329. return this;
  330. }
  331. public bool HasServerTime {
  332. get { return result.HasServerTime; }
  333. }
  334. [global::System.CLSCompliant(false)]
  335. public ulong ServerTime {
  336. get { return result.ServerTime; }
  337. set { SetServerTime(value); }
  338. }
  339. [global::System.CLSCompliant(false)]
  340. public Builder SetServerTime(ulong value) {
  341. result.hasServerTime = true;
  342. result.serverTime_ = value;
  343. return this;
  344. }
  345. public Builder ClearServerTime() {
  346. result.hasServerTime = false;
  347. result.serverTime_ = 0;
  348. return this;
  349. }
  350. public bool HasSyncRound {
  351. get { return result.HasSyncRound; }
  352. }
  353. [global::System.CLSCompliant(false)]
  354. public ulong SyncRound {
  355. get { return result.SyncRound; }
  356. set { SetSyncRound(value); }
  357. }
  358. [global::System.CLSCompliant(false)]
  359. public Builder SetSyncRound(ulong value) {
  360. result.hasSyncRound = true;
  361. result.syncRound_ = value;
  362. return this;
  363. }
  364. public Builder ClearSyncRound() {
  365. result.hasSyncRound = false;
  366. result.syncRound_ = 0UL;
  367. return this;
  368. }
  369. public bool HasReturnOptions {
  370. get { return result.HasReturnOptions; }
  371. }
  372. [global::System.CLSCompliant(false)]
  373. public uint ReturnOptions {
  374. get { return result.ReturnOptions; }
  375. set { SetReturnOptions(value); }
  376. }
  377. [global::System.CLSCompliant(false)]
  378. public Builder SetReturnOptions(uint value) {
  379. result.hasReturnOptions = true;
  380. result.returnOptions_ = value;
  381. return this;
  382. }
  383. public Builder ClearReturnOptions() {
  384. result.hasReturnOptions = false;
  385. result.returnOptions_ = 0;
  386. return this;
  387. }
  388. public bool HasRoundTrip {
  389. get { return result.HasRoundTrip; }
  390. }
  391. [global::System.CLSCompliant(false)]
  392. public ulong RoundTrip {
  393. get { return result.RoundTrip; }
  394. set { SetRoundTrip(value); }
  395. }
  396. [global::System.CLSCompliant(false)]
  397. public Builder SetRoundTrip(ulong value) {
  398. result.hasRoundTrip = true;
  399. result.roundTrip_ = value;
  400. return this;
  401. }
  402. public Builder ClearRoundTrip() {
  403. result.hasRoundTrip = false;
  404. result.roundTrip_ = 0;
  405. return this;
  406. }
  407. }
  408. static TimeSync() {
  409. object.ReferenceEquals(global::Sirikata.Network.Protocol._PBJ_Internal.Time.Descriptor, null);
  410. }
  411. }
  412. #endregion
  413. }