You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Geosite.cs 26 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: geosite.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. /// <summary>Holder for reflection information generated from geosite.proto</summary>
  12. public static partial class GeositeReflection {
  13. #region Descriptor
  14. /// <summary>File descriptor for geosite.proto</summary>
  15. public static pbr::FileDescriptor Descriptor {
  16. get { return descriptor; }
  17. }
  18. private static pbr::FileDescriptor descriptor;
  19. static GeositeReflection() {
  20. byte[] descriptorData = global::System.Convert.FromBase64String(
  21. string.Concat(
  22. "Cg1nZW9zaXRlLnByb3RvIvMBCgxEb21haW5PYmplY3QSIAoEdHlwZRgBIAEo",
  23. "DjISLkRvbWFpbk9iamVjdC5UeXBlEg0KBXZhbHVlGAIgASgJEioKCWF0dHJp",
  24. "YnV0ZRgDIAMoCzIXLkRvbWFpbk9iamVjdC5BdHRyaWJ1dGUaUgoJQXR0cmli",
  25. "dXRlEgsKA2tleRgBIAEoCRIUCgpib29sX3ZhbHVlGAIgASgISAASEwoJaW50",
  26. "X3ZhbHVlGAMgASgDSABCDQoLdHlwZWRfdmFsdWUiMgoEVHlwZRIJCgVQbGFp",
  27. "bhAAEgkKBVJlZ2V4EAESCgoGRG9tYWluEAISCAoERnVsbBADIj0KB0dlb3Np",
  28. "dGUSEgoKZ3JvdXBfbmFtZRgBIAEoCRIeCgdkb21haW5zGAIgAygLMg0uRG9t",
  29. "YWluT2JqZWN0IigKC0dlb3NpdGVMaXN0EhkKB2VudHJpZXMYASADKAsyCC5H",
  30. "ZW9zaXRlYgZwcm90bzM="));
  31. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  32. new pbr::FileDescriptor[] { },
  33. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  34. new pbr::GeneratedClrTypeInfo(typeof(global::DomainObject), global::DomainObject.Parser, new[]{ "Type", "Value", "Attribute" }, null, new[]{ typeof(global::DomainObject.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::DomainObject.Types.Attribute), global::DomainObject.Types.Attribute.Parser, new[]{ "Key", "BoolValue", "IntValue" }, new[]{ "TypedValue" }, null, null, null)}),
  35. new pbr::GeneratedClrTypeInfo(typeof(global::Geosite), global::Geosite.Parser, new[]{ "GroupName", "Domains" }, null, null, null, null),
  36. new pbr::GeneratedClrTypeInfo(typeof(global::GeositeList), global::GeositeList.Parser, new[]{ "Entries" }, null, null, null, null)
  37. }));
  38. }
  39. #endregion
  40. }
  41. #region Messages
  42. /// <summary>
  43. /// DomainObject for routing decision.
  44. /// </summary>
  45. public sealed partial class DomainObject : pb::IMessage<DomainObject> {
  46. private static readonly pb::MessageParser<DomainObject> _parser = new pb::MessageParser<DomainObject>(() => new DomainObject());
  47. private pb::UnknownFieldSet _unknownFields;
  48. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  49. public static pb::MessageParser<DomainObject> Parser { get { return _parser; } }
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. public static pbr::MessageDescriptor Descriptor {
  52. get { return global::GeositeReflection.Descriptor.MessageTypes[0]; }
  53. }
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. pbr::MessageDescriptor pb::IMessage.Descriptor {
  56. get { return Descriptor; }
  57. }
  58. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  59. public DomainObject() {
  60. OnConstruction();
  61. }
  62. partial void OnConstruction();
  63. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  64. public DomainObject(DomainObject other) : this() {
  65. type_ = other.type_;
  66. value_ = other.value_;
  67. attribute_ = other.attribute_.Clone();
  68. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  69. }
  70. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  71. public DomainObject Clone() {
  72. return new DomainObject(this);
  73. }
  74. /// <summary>Field number for the "type" field.</summary>
  75. public const int TypeFieldNumber = 1;
  76. private global::DomainObject.Types.Type type_ = global::DomainObject.Types.Type.Plain;
  77. /// <summary>
  78. /// DomainObject matching type.
  79. /// </summary>
  80. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  81. public global::DomainObject.Types.Type Type {
  82. get { return type_; }
  83. set {
  84. type_ = value;
  85. }
  86. }
  87. /// <summary>Field number for the "value" field.</summary>
  88. public const int ValueFieldNumber = 2;
  89. private string value_ = "";
  90. /// <summary>
  91. /// DomainObject value.
  92. /// </summary>
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  94. public string Value {
  95. get { return value_; }
  96. set {
  97. value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  98. }
  99. }
  100. /// <summary>Field number for the "attribute" field.</summary>
  101. public const int AttributeFieldNumber = 3;
  102. private static readonly pb::FieldCodec<global::DomainObject.Types.Attribute> _repeated_attribute_codec
  103. = pb::FieldCodec.ForMessage(26, global::DomainObject.Types.Attribute.Parser);
  104. private readonly pbc::RepeatedField<global::DomainObject.Types.Attribute> attribute_ = new pbc::RepeatedField<global::DomainObject.Types.Attribute>();
  105. /// <summary>
  106. /// Attributes of this domain. May be used for filtering.
  107. /// </summary>
  108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  109. public pbc::RepeatedField<global::DomainObject.Types.Attribute> Attribute {
  110. get { return attribute_; }
  111. }
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. public override bool Equals(object other) {
  114. return Equals(other as DomainObject);
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  117. public bool Equals(DomainObject other) {
  118. if (ReferenceEquals(other, null)) {
  119. return false;
  120. }
  121. if (ReferenceEquals(other, this)) {
  122. return true;
  123. }
  124. if (Type != other.Type) return false;
  125. if (Value != other.Value) return false;
  126. if(!attribute_.Equals(other.attribute_)) return false;
  127. return Equals(_unknownFields, other._unknownFields);
  128. }
  129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  130. public override int GetHashCode() {
  131. int hash = 1;
  132. if (Type != global::DomainObject.Types.Type.Plain) hash ^= Type.GetHashCode();
  133. if (Value.Length != 0) hash ^= Value.GetHashCode();
  134. hash ^= attribute_.GetHashCode();
  135. if (_unknownFields != null) {
  136. hash ^= _unknownFields.GetHashCode();
  137. }
  138. return hash;
  139. }
  140. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  141. public override string ToString() {
  142. return pb::JsonFormatter.ToDiagnosticString(this);
  143. }
  144. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  145. public void WriteTo(pb::CodedOutputStream output) {
  146. if (Type != global::DomainObject.Types.Type.Plain) {
  147. output.WriteRawTag(8);
  148. output.WriteEnum((int) Type);
  149. }
  150. if (Value.Length != 0) {
  151. output.WriteRawTag(18);
  152. output.WriteString(Value);
  153. }
  154. attribute_.WriteTo(output, _repeated_attribute_codec);
  155. if (_unknownFields != null) {
  156. _unknownFields.WriteTo(output);
  157. }
  158. }
  159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  160. public int CalculateSize() {
  161. int size = 0;
  162. if (Type != global::DomainObject.Types.Type.Plain) {
  163. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
  164. }
  165. if (Value.Length != 0) {
  166. size += 1 + pb::CodedOutputStream.ComputeStringSize(Value);
  167. }
  168. size += attribute_.CalculateSize(_repeated_attribute_codec);
  169. if (_unknownFields != null) {
  170. size += _unknownFields.CalculateSize();
  171. }
  172. return size;
  173. }
  174. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  175. public void MergeFrom(DomainObject other) {
  176. if (other == null) {
  177. return;
  178. }
  179. if (other.Type != global::DomainObject.Types.Type.Plain) {
  180. Type = other.Type;
  181. }
  182. if (other.Value.Length != 0) {
  183. Value = other.Value;
  184. }
  185. attribute_.Add(other.attribute_);
  186. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  187. }
  188. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  189. public void MergeFrom(pb::CodedInputStream input) {
  190. uint tag;
  191. while ((tag = input.ReadTag()) != 0) {
  192. switch(tag) {
  193. default:
  194. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  195. break;
  196. case 8: {
  197. Type = (global::DomainObject.Types.Type) input.ReadEnum();
  198. break;
  199. }
  200. case 18: {
  201. Value = input.ReadString();
  202. break;
  203. }
  204. case 26: {
  205. attribute_.AddEntriesFrom(input, _repeated_attribute_codec);
  206. break;
  207. }
  208. }
  209. }
  210. }
  211. #region Nested types
  212. /// <summary>Container for nested types declared in the DomainObject message type.</summary>
  213. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  214. public static partial class Types {
  215. /// <summary>
  216. /// Type of domain value.
  217. /// </summary>
  218. public enum Type {
  219. /// <summary>
  220. /// The value is used as is.
  221. /// </summary>
  222. [pbr::OriginalName("Plain")] Plain = 0,
  223. /// <summary>
  224. /// The value is used as a regular expression.
  225. /// </summary>
  226. [pbr::OriginalName("Regex")] Regex = 1,
  227. /// <summary>
  228. /// The value is a root domain.
  229. /// </summary>
  230. [pbr::OriginalName("Domain")] Domain = 2,
  231. /// <summary>
  232. /// The value is a domain.
  233. /// </summary>
  234. [pbr::OriginalName("Full")] Full = 3,
  235. }
  236. public sealed partial class Attribute : pb::IMessage<Attribute> {
  237. private static readonly pb::MessageParser<Attribute> _parser = new pb::MessageParser<Attribute>(() => new Attribute());
  238. private pb::UnknownFieldSet _unknownFields;
  239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  240. public static pb::MessageParser<Attribute> Parser { get { return _parser; } }
  241. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  242. public static pbr::MessageDescriptor Descriptor {
  243. get { return global::DomainObject.Descriptor.NestedTypes[0]; }
  244. }
  245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  246. pbr::MessageDescriptor pb::IMessage.Descriptor {
  247. get { return Descriptor; }
  248. }
  249. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  250. public Attribute() {
  251. OnConstruction();
  252. }
  253. partial void OnConstruction();
  254. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  255. public Attribute(Attribute other) : this() {
  256. key_ = other.key_;
  257. switch (other.TypedValueCase) {
  258. case TypedValueOneofCase.BoolValue:
  259. BoolValue = other.BoolValue;
  260. break;
  261. case TypedValueOneofCase.IntValue:
  262. IntValue = other.IntValue;
  263. break;
  264. }
  265. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  266. }
  267. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  268. public Attribute Clone() {
  269. return new Attribute(this);
  270. }
  271. /// <summary>Field number for the "key" field.</summary>
  272. public const int KeyFieldNumber = 1;
  273. private string key_ = "";
  274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  275. public string Key {
  276. get { return key_; }
  277. set {
  278. key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  279. }
  280. }
  281. /// <summary>Field number for the "bool_value" field.</summary>
  282. public const int BoolValueFieldNumber = 2;
  283. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  284. public bool BoolValue {
  285. get { return typedValueCase_ == TypedValueOneofCase.BoolValue ? (bool) typedValue_ : false; }
  286. set {
  287. typedValue_ = value;
  288. typedValueCase_ = TypedValueOneofCase.BoolValue;
  289. }
  290. }
  291. /// <summary>Field number for the "int_value" field.</summary>
  292. public const int IntValueFieldNumber = 3;
  293. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  294. public long IntValue {
  295. get { return typedValueCase_ == TypedValueOneofCase.IntValue ? (long) typedValue_ : 0L; }
  296. set {
  297. typedValue_ = value;
  298. typedValueCase_ = TypedValueOneofCase.IntValue;
  299. }
  300. }
  301. private object typedValue_;
  302. /// <summary>Enum of possible cases for the "typed_value" oneof.</summary>
  303. public enum TypedValueOneofCase {
  304. None = 0,
  305. BoolValue = 2,
  306. IntValue = 3,
  307. }
  308. private TypedValueOneofCase typedValueCase_ = TypedValueOneofCase.None;
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  310. public TypedValueOneofCase TypedValueCase {
  311. get { return typedValueCase_; }
  312. }
  313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  314. public void ClearTypedValue() {
  315. typedValueCase_ = TypedValueOneofCase.None;
  316. typedValue_ = null;
  317. }
  318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  319. public override bool Equals(object other) {
  320. return Equals(other as Attribute);
  321. }
  322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  323. public bool Equals(Attribute other) {
  324. if (ReferenceEquals(other, null)) {
  325. return false;
  326. }
  327. if (ReferenceEquals(other, this)) {
  328. return true;
  329. }
  330. if (Key != other.Key) return false;
  331. if (BoolValue != other.BoolValue) return false;
  332. if (IntValue != other.IntValue) return false;
  333. if (TypedValueCase != other.TypedValueCase) return false;
  334. return Equals(_unknownFields, other._unknownFields);
  335. }
  336. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  337. public override int GetHashCode() {
  338. int hash = 1;
  339. if (Key.Length != 0) hash ^= Key.GetHashCode();
  340. if (typedValueCase_ == TypedValueOneofCase.BoolValue) hash ^= BoolValue.GetHashCode();
  341. if (typedValueCase_ == TypedValueOneofCase.IntValue) hash ^= IntValue.GetHashCode();
  342. hash ^= (int) typedValueCase_;
  343. if (_unknownFields != null) {
  344. hash ^= _unknownFields.GetHashCode();
  345. }
  346. return hash;
  347. }
  348. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  349. public override string ToString() {
  350. return pb::JsonFormatter.ToDiagnosticString(this);
  351. }
  352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  353. public void WriteTo(pb::CodedOutputStream output) {
  354. if (Key.Length != 0) {
  355. output.WriteRawTag(10);
  356. output.WriteString(Key);
  357. }
  358. if (typedValueCase_ == TypedValueOneofCase.BoolValue) {
  359. output.WriteRawTag(16);
  360. output.WriteBool(BoolValue);
  361. }
  362. if (typedValueCase_ == TypedValueOneofCase.IntValue) {
  363. output.WriteRawTag(24);
  364. output.WriteInt64(IntValue);
  365. }
  366. if (_unknownFields != null) {
  367. _unknownFields.WriteTo(output);
  368. }
  369. }
  370. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  371. public int CalculateSize() {
  372. int size = 0;
  373. if (Key.Length != 0) {
  374. size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
  375. }
  376. if (typedValueCase_ == TypedValueOneofCase.BoolValue) {
  377. size += 1 + 1;
  378. }
  379. if (typedValueCase_ == TypedValueOneofCase.IntValue) {
  380. size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntValue);
  381. }
  382. if (_unknownFields != null) {
  383. size += _unknownFields.CalculateSize();
  384. }
  385. return size;
  386. }
  387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  388. public void MergeFrom(Attribute other) {
  389. if (other == null) {
  390. return;
  391. }
  392. if (other.Key.Length != 0) {
  393. Key = other.Key;
  394. }
  395. switch (other.TypedValueCase) {
  396. case TypedValueOneofCase.BoolValue:
  397. BoolValue = other.BoolValue;
  398. break;
  399. case TypedValueOneofCase.IntValue:
  400. IntValue = other.IntValue;
  401. break;
  402. }
  403. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  404. }
  405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  406. public void MergeFrom(pb::CodedInputStream input) {
  407. uint tag;
  408. while ((tag = input.ReadTag()) != 0) {
  409. switch(tag) {
  410. default:
  411. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  412. break;
  413. case 10: {
  414. Key = input.ReadString();
  415. break;
  416. }
  417. case 16: {
  418. BoolValue = input.ReadBool();
  419. break;
  420. }
  421. case 24: {
  422. IntValue = input.ReadInt64();
  423. break;
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }
  430. #endregion
  431. }
  432. public sealed partial class Geosite : pb::IMessage<Geosite> {
  433. private static readonly pb::MessageParser<Geosite> _parser = new pb::MessageParser<Geosite>(() => new Geosite());
  434. private pb::UnknownFieldSet _unknownFields;
  435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  436. public static pb::MessageParser<Geosite> Parser { get { return _parser; } }
  437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  438. public static pbr::MessageDescriptor Descriptor {
  439. get { return global::GeositeReflection.Descriptor.MessageTypes[1]; }
  440. }
  441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  442. pbr::MessageDescriptor pb::IMessage.Descriptor {
  443. get { return Descriptor; }
  444. }
  445. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  446. public Geosite() {
  447. OnConstruction();
  448. }
  449. partial void OnConstruction();
  450. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  451. public Geosite(Geosite other) : this() {
  452. groupName_ = other.groupName_;
  453. domains_ = other.domains_.Clone();
  454. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  455. }
  456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  457. public Geosite Clone() {
  458. return new Geosite(this);
  459. }
  460. /// <summary>Field number for the "group_name" field.</summary>
  461. public const int GroupNameFieldNumber = 1;
  462. private string groupName_ = "";
  463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  464. public string GroupName {
  465. get { return groupName_; }
  466. set {
  467. groupName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  468. }
  469. }
  470. /// <summary>Field number for the "domains" field.</summary>
  471. public const int DomainsFieldNumber = 2;
  472. private static readonly pb::FieldCodec<global::DomainObject> _repeated_domains_codec
  473. = pb::FieldCodec.ForMessage(18, global::DomainObject.Parser);
  474. private readonly pbc::RepeatedField<global::DomainObject> domains_ = new pbc::RepeatedField<global::DomainObject>();
  475. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  476. public pbc::RepeatedField<global::DomainObject> Domains {
  477. get { return domains_; }
  478. }
  479. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  480. public override bool Equals(object other) {
  481. return Equals(other as Geosite);
  482. }
  483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  484. public bool Equals(Geosite other) {
  485. if (ReferenceEquals(other, null)) {
  486. return false;
  487. }
  488. if (ReferenceEquals(other, this)) {
  489. return true;
  490. }
  491. if (GroupName != other.GroupName) return false;
  492. if(!domains_.Equals(other.domains_)) return false;
  493. return Equals(_unknownFields, other._unknownFields);
  494. }
  495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  496. public override int GetHashCode() {
  497. int hash = 1;
  498. if (GroupName.Length != 0) hash ^= GroupName.GetHashCode();
  499. hash ^= domains_.GetHashCode();
  500. if (_unknownFields != null) {
  501. hash ^= _unknownFields.GetHashCode();
  502. }
  503. return hash;
  504. }
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  506. public override string ToString() {
  507. return pb::JsonFormatter.ToDiagnosticString(this);
  508. }
  509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  510. public void WriteTo(pb::CodedOutputStream output) {
  511. if (GroupName.Length != 0) {
  512. output.WriteRawTag(10);
  513. output.WriteString(GroupName);
  514. }
  515. domains_.WriteTo(output, _repeated_domains_codec);
  516. if (_unknownFields != null) {
  517. _unknownFields.WriteTo(output);
  518. }
  519. }
  520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  521. public int CalculateSize() {
  522. int size = 0;
  523. if (GroupName.Length != 0) {
  524. size += 1 + pb::CodedOutputStream.ComputeStringSize(GroupName);
  525. }
  526. size += domains_.CalculateSize(_repeated_domains_codec);
  527. if (_unknownFields != null) {
  528. size += _unknownFields.CalculateSize();
  529. }
  530. return size;
  531. }
  532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  533. public void MergeFrom(Geosite other) {
  534. if (other == null) {
  535. return;
  536. }
  537. if (other.GroupName.Length != 0) {
  538. GroupName = other.GroupName;
  539. }
  540. domains_.Add(other.domains_);
  541. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  542. }
  543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  544. public void MergeFrom(pb::CodedInputStream input) {
  545. uint tag;
  546. while ((tag = input.ReadTag()) != 0) {
  547. switch(tag) {
  548. default:
  549. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  550. break;
  551. case 10: {
  552. GroupName = input.ReadString();
  553. break;
  554. }
  555. case 18: {
  556. domains_.AddEntriesFrom(input, _repeated_domains_codec);
  557. break;
  558. }
  559. }
  560. }
  561. }
  562. }
  563. public sealed partial class GeositeList : pb::IMessage<GeositeList> {
  564. private static readonly pb::MessageParser<GeositeList> _parser = new pb::MessageParser<GeositeList>(() => new GeositeList());
  565. private pb::UnknownFieldSet _unknownFields;
  566. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  567. public static pb::MessageParser<GeositeList> Parser { get { return _parser; } }
  568. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  569. public static pbr::MessageDescriptor Descriptor {
  570. get { return global::GeositeReflection.Descriptor.MessageTypes[2]; }
  571. }
  572. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  573. pbr::MessageDescriptor pb::IMessage.Descriptor {
  574. get { return Descriptor; }
  575. }
  576. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  577. public GeositeList() {
  578. OnConstruction();
  579. }
  580. partial void OnConstruction();
  581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  582. public GeositeList(GeositeList other) : this() {
  583. entries_ = other.entries_.Clone();
  584. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  585. }
  586. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  587. public GeositeList Clone() {
  588. return new GeositeList(this);
  589. }
  590. /// <summary>Field number for the "entries" field.</summary>
  591. public const int EntriesFieldNumber = 1;
  592. private static readonly pb::FieldCodec<global::Geosite> _repeated_entries_codec
  593. = pb::FieldCodec.ForMessage(10, global::Geosite.Parser);
  594. private readonly pbc::RepeatedField<global::Geosite> entries_ = new pbc::RepeatedField<global::Geosite>();
  595. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  596. public pbc::RepeatedField<global::Geosite> Entries {
  597. get { return entries_; }
  598. }
  599. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  600. public override bool Equals(object other) {
  601. return Equals(other as GeositeList);
  602. }
  603. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  604. public bool Equals(GeositeList other) {
  605. if (ReferenceEquals(other, null)) {
  606. return false;
  607. }
  608. if (ReferenceEquals(other, this)) {
  609. return true;
  610. }
  611. if(!entries_.Equals(other.entries_)) return false;
  612. return Equals(_unknownFields, other._unknownFields);
  613. }
  614. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  615. public override int GetHashCode() {
  616. int hash = 1;
  617. hash ^= entries_.GetHashCode();
  618. if (_unknownFields != null) {
  619. hash ^= _unknownFields.GetHashCode();
  620. }
  621. return hash;
  622. }
  623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  624. public override string ToString() {
  625. return pb::JsonFormatter.ToDiagnosticString(this);
  626. }
  627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  628. public void WriteTo(pb::CodedOutputStream output) {
  629. entries_.WriteTo(output, _repeated_entries_codec);
  630. if (_unknownFields != null) {
  631. _unknownFields.WriteTo(output);
  632. }
  633. }
  634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  635. public int CalculateSize() {
  636. int size = 0;
  637. size += entries_.CalculateSize(_repeated_entries_codec);
  638. if (_unknownFields != null) {
  639. size += _unknownFields.CalculateSize();
  640. }
  641. return size;
  642. }
  643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  644. public void MergeFrom(GeositeList other) {
  645. if (other == null) {
  646. return;
  647. }
  648. entries_.Add(other.entries_);
  649. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  650. }
  651. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  652. public void MergeFrom(pb::CodedInputStream input) {
  653. uint tag;
  654. while ((tag = input.ReadTag()) != 0) {
  655. switch(tag) {
  656. default:
  657. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  658. break;
  659. case 10: {
  660. entries_.AddEntriesFrom(input, _repeated_entries_codec);
  661. break;
  662. }
  663. }
  664. }
  665. }
  666. }
  667. #endregion
  668. #endregion Designer generated code