1
0

Subscription.cs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  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.Subscription.Protocol._PBJ_Internal {
  7. public static partial class Subscription {
  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_Subscription_Protocol__PBJ_Internal_Address__Descriptor;
  14. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Address, global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable;
  15. internal static pbd::MessageDescriptor internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor;
  16. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe, global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable;
  17. internal static pbd::MessageDescriptor internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor;
  18. internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast, global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable;
  19. #endregion
  20. #region Descriptor
  21. public static pbd::FileDescriptor Descriptor {
  22. get { return descriptor; }
  23. }
  24. private static pbd::FileDescriptor descriptor;
  25. static Subscription() {
  26. byte[] descriptorData = global::System.Convert.FromBase64String(
  27. "ChJTdWJzY3JpcHRpb24ucHJvdG8SLFNpcmlrYXRhLlN1YnNjcmlwdGlvbi5Q" +
  28. "cm90b2NvbC5fUEJKX0ludGVybmFsIiwKB0FkZHJlc3MSEAoIaG9zdG5hbWUY" +
  29. "ASABKAkSDwoHc2VydmljZRgCIAEoCSKMAQoJU3Vic2NyaWJlElAKEWJyb2Fk" +
  30. "Y2FzdF9hZGRyZXNzGAcgASgLMjUuU2lyaWthdGEuU3Vic2NyaXB0aW9uLlBy" +
  31. "b3RvY29sLl9QQkpfSW50ZXJuYWwuQWRkcmVzcxIWCg5icm9hZGNhc3RfbmFt" +
  32. "ZRgIIAEoDBIVCg11cGRhdGVfcGVyaW9kGAkgASgQIiMKCUJyb2FkY2FzdBIW" +
  33. "Cg5icm9hZGNhc3RfbmFtZRgHIAEoDA==");
  34. pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
  35. descriptor = root;
  36. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor = Descriptor.MessageTypes[0];
  37. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable =
  38. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Address, global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor,
  39. new string[] { "Hostname", "Service", });
  40. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor = Descriptor.MessageTypes[1];
  41. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable =
  42. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe, global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor,
  43. new string[] { "BroadcastAddress", "BroadcastName", "UpdatePeriod", });
  44. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor = Descriptor.MessageTypes[2];
  45. internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable =
  46. new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast, global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor,
  47. new string[] { "BroadcastName", });
  48. return null;
  49. };
  50. pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
  51. new pbd::FileDescriptor[] {
  52. }, assigner);
  53. }
  54. #endregion
  55. }
  56. #region Messages
  57. public sealed partial class Address : pb::GeneratedMessage<Address, Address.Builder> {
  58. private static readonly Address defaultInstance = new Builder().BuildPartial();
  59. public static Address DefaultInstance {
  60. get { return defaultInstance; }
  61. }
  62. public override Address DefaultInstanceForType {
  63. get { return defaultInstance; }
  64. }
  65. protected override Address ThisMessage {
  66. get { return this; }
  67. }
  68. public static pbd::MessageDescriptor Descriptor {
  69. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor; }
  70. }
  71. protected override pb::FieldAccess.FieldAccessorTable<Address, Address.Builder> InternalFieldAccessors {
  72. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable; }
  73. }
  74. public const int HostnameFieldNumber = 1;
  75. private bool hasHostname;
  76. private string hostname_ = "";
  77. public bool HasHostname {
  78. get { return hasHostname; }
  79. }
  80. public string Hostname {
  81. get { return hostname_; }
  82. }
  83. public const int ServiceFieldNumber = 2;
  84. private bool hasService;
  85. private string service_ = "";
  86. public bool HasService {
  87. get { return hasService; }
  88. }
  89. public string Service {
  90. get { return service_; }
  91. }
  92. public override bool IsInitialized {
  93. get {
  94. return true;
  95. }
  96. }
  97. public override void WriteTo(pb::CodedOutputStream output) {
  98. if (HasHostname) {
  99. output.WriteString(1, Hostname);
  100. }
  101. if (HasService) {
  102. output.WriteString(2, Service);
  103. }
  104. UnknownFields.WriteTo(output);
  105. }
  106. private int memoizedSerializedSize = -1;
  107. public override int SerializedSize {
  108. get {
  109. int size = memoizedSerializedSize;
  110. if (size != -1) return size;
  111. size = 0;
  112. if (HasHostname) {
  113. size += pb::CodedOutputStream.ComputeStringSize(1, Hostname);
  114. }
  115. if (HasService) {
  116. size += pb::CodedOutputStream.ComputeStringSize(2, Service);
  117. }
  118. size += UnknownFields.SerializedSize;
  119. memoizedSerializedSize = size;
  120. return size;
  121. }
  122. }
  123. public static Address ParseFrom(pb::ByteString data) {
  124. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  125. }
  126. public static Address ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  127. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  128. }
  129. public static Address ParseFrom(byte[] data) {
  130. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  131. }
  132. public static Address ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  133. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  134. }
  135. public static Address ParseFrom(global::System.IO.Stream input) {
  136. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  137. }
  138. public static Address ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  139. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  140. }
  141. public static Address ParseDelimitedFrom(global::System.IO.Stream input) {
  142. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  143. }
  144. public static Address ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  145. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  146. }
  147. public static Address ParseFrom(pb::CodedInputStream input) {
  148. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  149. }
  150. public static Address ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  151. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  152. }
  153. public static Builder CreateBuilder() { return new Builder(); }
  154. public override Builder ToBuilder() { return CreateBuilder(this); }
  155. public override Builder CreateBuilderForType() { return new Builder(); }
  156. public static Builder CreateBuilder(Address prototype) {
  157. return (Builder) new Builder().MergeFrom(prototype);
  158. }
  159. public sealed partial class Builder : pb::GeneratedBuilder<Address, Builder> {
  160. protected override Builder ThisBuilder {
  161. get { return this; }
  162. }
  163. public Builder() {}
  164. Address result = new Address();
  165. protected override Address MessageBeingBuilt {
  166. get { return result; }
  167. }
  168. public override Builder Clear() {
  169. result = new Address();
  170. return this;
  171. }
  172. public override Builder Clone() {
  173. return new Builder().MergeFrom(result);
  174. }
  175. public override pbd::MessageDescriptor DescriptorForType {
  176. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Descriptor; }
  177. }
  178. public override Address DefaultInstanceForType {
  179. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance; }
  180. }
  181. public override Address BuildPartial() {
  182. if (result == null) {
  183. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  184. }
  185. Address returnMe = result;
  186. result = null;
  187. return returnMe;
  188. }
  189. public override Builder MergeFrom(pb::IMessage other) {
  190. if (other is Address) {
  191. return MergeFrom((Address) other);
  192. } else {
  193. base.MergeFrom(other);
  194. return this;
  195. }
  196. }
  197. public override Builder MergeFrom(Address other) {
  198. if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance) return this;
  199. if (other.HasHostname) {
  200. Hostname = other.Hostname;
  201. }
  202. if (other.HasService) {
  203. Service = other.Service;
  204. }
  205. this.MergeUnknownFields(other.UnknownFields);
  206. return this;
  207. }
  208. public override Builder MergeFrom(pb::CodedInputStream input) {
  209. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  210. }
  211. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  212. pb::UnknownFieldSet.Builder unknownFields = null;
  213. while (true) {
  214. uint tag = input.ReadTag();
  215. switch (tag) {
  216. case 0: {
  217. if (unknownFields != null) {
  218. this.UnknownFields = unknownFields.Build();
  219. }
  220. return this;
  221. }
  222. default: {
  223. if (pb::WireFormat.IsEndGroupTag(tag)) {
  224. if (unknownFields != null) {
  225. this.UnknownFields = unknownFields.Build();
  226. }
  227. return this;
  228. }
  229. if (unknownFields == null) {
  230. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  231. }
  232. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  233. break;
  234. }
  235. case 10: {
  236. Hostname = input.ReadString();
  237. break;
  238. }
  239. case 18: {
  240. Service = input.ReadString();
  241. break;
  242. }
  243. }
  244. }
  245. }
  246. public bool HasHostname {
  247. get { return result.HasHostname; }
  248. }
  249. public string Hostname {
  250. get { return result.Hostname; }
  251. set { SetHostname(value); }
  252. }
  253. public Builder SetHostname(string value) {
  254. pb::ThrowHelper.ThrowIfNull(value, "value");
  255. result.hasHostname = true;
  256. result.hostname_ = value;
  257. return this;
  258. }
  259. public Builder ClearHostname() {
  260. result.hasHostname = false;
  261. result.hostname_ = "";
  262. return this;
  263. }
  264. public bool HasService {
  265. get { return result.HasService; }
  266. }
  267. public string Service {
  268. get { return result.Service; }
  269. set { SetService(value); }
  270. }
  271. public Builder SetService(string value) {
  272. pb::ThrowHelper.ThrowIfNull(value, "value");
  273. result.hasService = true;
  274. result.service_ = value;
  275. return this;
  276. }
  277. public Builder ClearService() {
  278. result.hasService = false;
  279. result.service_ = "";
  280. return this;
  281. }
  282. }
  283. static Address() {
  284. object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
  285. }
  286. }
  287. public sealed partial class Subscribe : pb::GeneratedMessage<Subscribe, Subscribe.Builder> {
  288. private static readonly Subscribe defaultInstance = new Builder().BuildPartial();
  289. public static Subscribe DefaultInstance {
  290. get { return defaultInstance; }
  291. }
  292. public override Subscribe DefaultInstanceForType {
  293. get { return defaultInstance; }
  294. }
  295. protected override Subscribe ThisMessage {
  296. get { return this; }
  297. }
  298. public static pbd::MessageDescriptor Descriptor {
  299. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor; }
  300. }
  301. protected override pb::FieldAccess.FieldAccessorTable<Subscribe, Subscribe.Builder> InternalFieldAccessors {
  302. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable; }
  303. }
  304. public const int BroadcastAddressFieldNumber = 7;
  305. private bool hasBroadcastAddress;
  306. private global::Sirikata.Subscription.Protocol._PBJ_Internal.Address broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance;
  307. public bool HasBroadcastAddress {
  308. get { return hasBroadcastAddress; }
  309. }
  310. public global::Sirikata.Subscription.Protocol._PBJ_Internal.Address BroadcastAddress {
  311. get { return broadcastAddress_; }
  312. }
  313. public const int BroadcastNameFieldNumber = 8;
  314. private bool hasBroadcastName;
  315. private pb::ByteString broadcastName_ = pb::ByteString.Empty;
  316. public bool HasBroadcastName {
  317. get { return hasBroadcastName; }
  318. }
  319. public pb::ByteString BroadcastName {
  320. get { return broadcastName_; }
  321. }
  322. public const int UpdatePeriodFieldNumber = 9;
  323. private bool hasUpdatePeriod;
  324. private long updatePeriod_ = 0;
  325. public bool HasUpdatePeriod {
  326. get { return hasUpdatePeriod; }
  327. }
  328. public long UpdatePeriod {
  329. get { return updatePeriod_; }
  330. }
  331. public override bool IsInitialized {
  332. get {
  333. return true;
  334. }
  335. }
  336. public override void WriteTo(pb::CodedOutputStream output) {
  337. if (HasBroadcastAddress) {
  338. output.WriteMessage(7, BroadcastAddress);
  339. }
  340. if (HasBroadcastName) {
  341. output.WriteBytes(8, BroadcastName);
  342. }
  343. if (HasUpdatePeriod) {
  344. output.WriteSFixed64(9, UpdatePeriod);
  345. }
  346. UnknownFields.WriteTo(output);
  347. }
  348. private int memoizedSerializedSize = -1;
  349. public override int SerializedSize {
  350. get {
  351. int size = memoizedSerializedSize;
  352. if (size != -1) return size;
  353. size = 0;
  354. if (HasBroadcastAddress) {
  355. size += pb::CodedOutputStream.ComputeMessageSize(7, BroadcastAddress);
  356. }
  357. if (HasBroadcastName) {
  358. size += pb::CodedOutputStream.ComputeBytesSize(8, BroadcastName);
  359. }
  360. if (HasUpdatePeriod) {
  361. size += pb::CodedOutputStream.ComputeSFixed64Size(9, UpdatePeriod);
  362. }
  363. size += UnknownFields.SerializedSize;
  364. memoizedSerializedSize = size;
  365. return size;
  366. }
  367. }
  368. public static Subscribe ParseFrom(pb::ByteString data) {
  369. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  370. }
  371. public static Subscribe ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  372. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  373. }
  374. public static Subscribe ParseFrom(byte[] data) {
  375. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  376. }
  377. public static Subscribe ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  378. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  379. }
  380. public static Subscribe ParseFrom(global::System.IO.Stream input) {
  381. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  382. }
  383. public static Subscribe ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  384. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  385. }
  386. public static Subscribe ParseDelimitedFrom(global::System.IO.Stream input) {
  387. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  388. }
  389. public static Subscribe ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  390. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  391. }
  392. public static Subscribe ParseFrom(pb::CodedInputStream input) {
  393. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  394. }
  395. public static Subscribe ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  396. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  397. }
  398. public static Builder CreateBuilder() { return new Builder(); }
  399. public override Builder ToBuilder() { return CreateBuilder(this); }
  400. public override Builder CreateBuilderForType() { return new Builder(); }
  401. public static Builder CreateBuilder(Subscribe prototype) {
  402. return (Builder) new Builder().MergeFrom(prototype);
  403. }
  404. public sealed partial class Builder : pb::GeneratedBuilder<Subscribe, Builder> {
  405. protected override Builder ThisBuilder {
  406. get { return this; }
  407. }
  408. public Builder() {}
  409. Subscribe result = new Subscribe();
  410. protected override Subscribe MessageBeingBuilt {
  411. get { return result; }
  412. }
  413. public override Builder Clear() {
  414. result = new Subscribe();
  415. return this;
  416. }
  417. public override Builder Clone() {
  418. return new Builder().MergeFrom(result);
  419. }
  420. public override pbd::MessageDescriptor DescriptorForType {
  421. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Descriptor; }
  422. }
  423. public override Subscribe DefaultInstanceForType {
  424. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.DefaultInstance; }
  425. }
  426. public override Subscribe BuildPartial() {
  427. if (result == null) {
  428. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  429. }
  430. Subscribe returnMe = result;
  431. result = null;
  432. return returnMe;
  433. }
  434. public override Builder MergeFrom(pb::IMessage other) {
  435. if (other is Subscribe) {
  436. return MergeFrom((Subscribe) other);
  437. } else {
  438. base.MergeFrom(other);
  439. return this;
  440. }
  441. }
  442. public override Builder MergeFrom(Subscribe other) {
  443. if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.DefaultInstance) return this;
  444. if (other.HasBroadcastAddress) {
  445. MergeBroadcastAddress(other.BroadcastAddress);
  446. }
  447. if (other.HasBroadcastName) {
  448. BroadcastName = other.BroadcastName;
  449. }
  450. if (other.HasUpdatePeriod) {
  451. UpdatePeriod = other.UpdatePeriod;
  452. }
  453. this.MergeUnknownFields(other.UnknownFields);
  454. return this;
  455. }
  456. public override Builder MergeFrom(pb::CodedInputStream input) {
  457. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  458. }
  459. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  460. pb::UnknownFieldSet.Builder unknownFields = null;
  461. while (true) {
  462. uint tag = input.ReadTag();
  463. switch (tag) {
  464. case 0: {
  465. if (unknownFields != null) {
  466. this.UnknownFields = unknownFields.Build();
  467. }
  468. return this;
  469. }
  470. default: {
  471. if (pb::WireFormat.IsEndGroupTag(tag)) {
  472. if (unknownFields != null) {
  473. this.UnknownFields = unknownFields.Build();
  474. }
  475. return this;
  476. }
  477. if (unknownFields == null) {
  478. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  479. }
  480. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  481. break;
  482. }
  483. case 58: {
  484. global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder subBuilder = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.CreateBuilder();
  485. if (HasBroadcastAddress) {
  486. subBuilder.MergeFrom(BroadcastAddress);
  487. }
  488. input.ReadMessage(subBuilder, extensionRegistry);
  489. BroadcastAddress = subBuilder.BuildPartial();
  490. break;
  491. }
  492. case 66: {
  493. BroadcastName = input.ReadBytes();
  494. break;
  495. }
  496. case 73: {
  497. UpdatePeriod = input.ReadSFixed64();
  498. break;
  499. }
  500. }
  501. }
  502. }
  503. public bool HasBroadcastAddress {
  504. get { return result.HasBroadcastAddress; }
  505. }
  506. public global::Sirikata.Subscription.Protocol._PBJ_Internal.Address BroadcastAddress {
  507. get { return result.BroadcastAddress; }
  508. set { SetBroadcastAddress(value); }
  509. }
  510. public Builder SetBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address value) {
  511. pb::ThrowHelper.ThrowIfNull(value, "value");
  512. result.hasBroadcastAddress = true;
  513. result.broadcastAddress_ = value;
  514. return this;
  515. }
  516. public Builder SetBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder builderForValue) {
  517. pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
  518. result.hasBroadcastAddress = true;
  519. result.broadcastAddress_ = builderForValue.Build();
  520. return this;
  521. }
  522. public Builder MergeBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address value) {
  523. pb::ThrowHelper.ThrowIfNull(value, "value");
  524. if (result.HasBroadcastAddress &&
  525. result.broadcastAddress_ != global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance) {
  526. result.broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.CreateBuilder(result.broadcastAddress_).MergeFrom(value).BuildPartial();
  527. } else {
  528. result.broadcastAddress_ = value;
  529. }
  530. result.hasBroadcastAddress = true;
  531. return this;
  532. }
  533. public Builder ClearBroadcastAddress() {
  534. result.hasBroadcastAddress = false;
  535. result.broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance;
  536. return this;
  537. }
  538. public bool HasBroadcastName {
  539. get { return result.HasBroadcastName; }
  540. }
  541. public pb::ByteString BroadcastName {
  542. get { return result.BroadcastName; }
  543. set { SetBroadcastName(value); }
  544. }
  545. public Builder SetBroadcastName(pb::ByteString value) {
  546. pb::ThrowHelper.ThrowIfNull(value, "value");
  547. result.hasBroadcastName = true;
  548. result.broadcastName_ = value;
  549. return this;
  550. }
  551. public Builder ClearBroadcastName() {
  552. result.hasBroadcastName = false;
  553. result.broadcastName_ = pb::ByteString.Empty;
  554. return this;
  555. }
  556. public bool HasUpdatePeriod {
  557. get { return result.HasUpdatePeriod; }
  558. }
  559. public long UpdatePeriod {
  560. get { return result.UpdatePeriod; }
  561. set { SetUpdatePeriod(value); }
  562. }
  563. public Builder SetUpdatePeriod(long value) {
  564. result.hasUpdatePeriod = true;
  565. result.updatePeriod_ = value;
  566. return this;
  567. }
  568. public Builder ClearUpdatePeriod() {
  569. result.hasUpdatePeriod = false;
  570. result.updatePeriod_ = 0;
  571. return this;
  572. }
  573. }
  574. static Subscribe() {
  575. object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
  576. }
  577. }
  578. public sealed partial class Broadcast : pb::GeneratedMessage<Broadcast, Broadcast.Builder> {
  579. private static readonly Broadcast defaultInstance = new Builder().BuildPartial();
  580. public static Broadcast DefaultInstance {
  581. get { return defaultInstance; }
  582. }
  583. public override Broadcast DefaultInstanceForType {
  584. get { return defaultInstance; }
  585. }
  586. protected override Broadcast ThisMessage {
  587. get { return this; }
  588. }
  589. public static pbd::MessageDescriptor Descriptor {
  590. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor; }
  591. }
  592. protected override pb::FieldAccess.FieldAccessorTable<Broadcast, Broadcast.Builder> InternalFieldAccessors {
  593. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable; }
  594. }
  595. public const int BroadcastNameFieldNumber = 7;
  596. private bool hasBroadcastName;
  597. private pb::ByteString broadcastName_ = pb::ByteString.Empty;
  598. public bool HasBroadcastName {
  599. get { return hasBroadcastName; }
  600. }
  601. public pb::ByteString BroadcastName {
  602. get { return broadcastName_; }
  603. }
  604. public override bool IsInitialized {
  605. get {
  606. return true;
  607. }
  608. }
  609. public override void WriteTo(pb::CodedOutputStream output) {
  610. if (HasBroadcastName) {
  611. output.WriteBytes(7, BroadcastName);
  612. }
  613. UnknownFields.WriteTo(output);
  614. }
  615. private int memoizedSerializedSize = -1;
  616. public override int SerializedSize {
  617. get {
  618. int size = memoizedSerializedSize;
  619. if (size != -1) return size;
  620. size = 0;
  621. if (HasBroadcastName) {
  622. size += pb::CodedOutputStream.ComputeBytesSize(7, BroadcastName);
  623. }
  624. size += UnknownFields.SerializedSize;
  625. memoizedSerializedSize = size;
  626. return size;
  627. }
  628. }
  629. public static Broadcast ParseFrom(pb::ByteString data) {
  630. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  631. }
  632. public static Broadcast ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
  633. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  634. }
  635. public static Broadcast ParseFrom(byte[] data) {
  636. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  637. }
  638. public static Broadcast ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
  639. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
  640. }
  641. public static Broadcast ParseFrom(global::System.IO.Stream input) {
  642. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  643. }
  644. public static Broadcast ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  645. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  646. }
  647. public static Broadcast ParseDelimitedFrom(global::System.IO.Stream input) {
  648. return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
  649. }
  650. public static Broadcast ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
  651. return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
  652. }
  653. public static Broadcast ParseFrom(pb::CodedInputStream input) {
  654. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  655. }
  656. public static Broadcast ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  657. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
  658. }
  659. public static Builder CreateBuilder() { return new Builder(); }
  660. public override Builder ToBuilder() { return CreateBuilder(this); }
  661. public override Builder CreateBuilderForType() { return new Builder(); }
  662. public static Builder CreateBuilder(Broadcast prototype) {
  663. return (Builder) new Builder().MergeFrom(prototype);
  664. }
  665. public sealed partial class Builder : pb::GeneratedBuilder<Broadcast, Builder> {
  666. protected override Builder ThisBuilder {
  667. get { return this; }
  668. }
  669. public Builder() {}
  670. Broadcast result = new Broadcast();
  671. protected override Broadcast MessageBeingBuilt {
  672. get { return result; }
  673. }
  674. public override Builder Clear() {
  675. result = new Broadcast();
  676. return this;
  677. }
  678. public override Builder Clone() {
  679. return new Builder().MergeFrom(result);
  680. }
  681. public override pbd::MessageDescriptor DescriptorForType {
  682. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Descriptor; }
  683. }
  684. public override Broadcast DefaultInstanceForType {
  685. get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.DefaultInstance; }
  686. }
  687. public override Broadcast BuildPartial() {
  688. if (result == null) {
  689. throw new global::System.InvalidOperationException("build() has already been called on this Builder");
  690. }
  691. Broadcast returnMe = result;
  692. result = null;
  693. return returnMe;
  694. }
  695. public override Builder MergeFrom(pb::IMessage other) {
  696. if (other is Broadcast) {
  697. return MergeFrom((Broadcast) other);
  698. } else {
  699. base.MergeFrom(other);
  700. return this;
  701. }
  702. }
  703. public override Builder MergeFrom(Broadcast other) {
  704. if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.DefaultInstance) return this;
  705. if (other.HasBroadcastName) {
  706. BroadcastName = other.BroadcastName;
  707. }
  708. this.MergeUnknownFields(other.UnknownFields);
  709. return this;
  710. }
  711. public override Builder MergeFrom(pb::CodedInputStream input) {
  712. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  713. }
  714. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  715. pb::UnknownFieldSet.Builder unknownFields = null;
  716. while (true) {
  717. uint tag = input.ReadTag();
  718. switch (tag) {
  719. case 0: {
  720. if (unknownFields != null) {
  721. this.UnknownFields = unknownFields.Build();
  722. }
  723. return this;
  724. }
  725. default: {
  726. if (pb::WireFormat.IsEndGroupTag(tag)) {
  727. if (unknownFields != null) {
  728. this.UnknownFields = unknownFields.Build();
  729. }
  730. return this;
  731. }
  732. if (unknownFields == null) {
  733. unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  734. }
  735. ParseUnknownField(input, unknownFields, extensionRegistry, tag);
  736. break;
  737. }
  738. case 58: {
  739. BroadcastName = input.ReadBytes();
  740. break;
  741. }
  742. }
  743. }
  744. }
  745. public bool HasBroadcastName {
  746. get { return result.HasBroadcastName; }
  747. }
  748. public pb::ByteString BroadcastName {
  749. get { return result.BroadcastName; }
  750. set { SetBroadcastName(value); }
  751. }
  752. public Builder SetBroadcastName(pb::ByteString value) {
  753. pb::ThrowHelper.ThrowIfNull(value, "value");
  754. result.hasBroadcastName = true;
  755. result.broadcastName_ = value;
  756. return this;
  757. }
  758. public Builder ClearBroadcastName() {
  759. result.hasBroadcastName = false;
  760. result.broadcastName_ = pb::ByteString.Empty;
  761. return this;
  762. }
  763. }
  764. static Broadcast() {
  765. object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
  766. }
  767. }
  768. #endregion
  769. }