NorthwindProtoFile.cs 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636
  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 Northwind {
  7. public static partial class NorthwindProtoFile {
  8. #region Descriptor
  9. public static pbd::FileDescriptor Descriptor {
  10. get { return descriptor; }
  11. }
  12. private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (
  13. new byte[] {
  14. 0x0a, 0x0b, 0x6e, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6f, 0x72, 0x74, 0x68,
  15. 0x77, 0x69, 0x6e, 0x64, 0x1a, 0x09, 0x62, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x08, 0x44,
  16. 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
  17. 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x64, 0x65,
  18. 0x72, 0x22, 0xfa, 0x02, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72,
  19. 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x12, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
  20. 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65,
  21. 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x20, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74,
  22. 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69,
  23. 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x05,
  24. 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
  25. 0x22, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
  26. 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0f, 0x0a, 0x07, 0x53,
  27. 0x68, 0x69, 0x70, 0x56, 0x69, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x12, 0x1d, 0x0a, 0x07, 0x46, 0x72, 0x65, 0x69,
  28. 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x65, 0x63, 0x69,
  29. 0x6d, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x08, 0x53, 0x68, 0x69, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
  30. 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01,
  31. 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x53, 0x68, 0x69, 0x70, 0x43, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09,
  32. 0x12, 0x12, 0x0a, 0x0a, 0x53, 0x68, 0x69, 0x70, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
  33. 0x12, 0x16, 0x0a, 0x0e, 0x53, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x0d,
  34. 0x20, 0x01, 0x28, 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18,
  35. 0x0e, 0x20, 0x01, 0x28, 0x09, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b,
  36. 0x32, 0x14, 0x2e, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69,
  37. 0x6e, 0x65, 0x22, 0x74, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x0f, 0x0a, 0x07, 0x4f,
  38. 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x11, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64,
  39. 0x75, 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x12, 0x1f, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x74, 0x50,
  40. 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x65, 0x63,
  41. 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01,
  42. 0x28, 0x11, 0x12, 0x10, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02,
  43. 0x42, 0x23, 0x48, 0x01, 0xc2, 0x3e, 0x09, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0xca, 0x3e, 0x12, 0x4e,
  44. 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
  45. }, new pbd::FileDescriptor[] {
  46. global::Google.ProtocolBuffers.Bcl.BclProtoFile.Descriptor,
  47. });
  48. #endregion
  49. #region Extensions
  50. #endregion
  51. #region Static variables
  52. internal static readonly pbd::MessageDescriptor internal__static_northwind_Database__Descriptor
  53. = Descriptor.MessageTypes[0];
  54. internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.Database, global::Northwind.Database.Builder> internal__static_northwind_Database__FieldAccessorTable
  55. = new pb::FieldAccess.FieldAccessorTable<global::Northwind.Database, global::Northwind.Database.Builder>(internal__static_northwind_Database__Descriptor,
  56. new string[] { "Orders", });
  57. internal static readonly pbd::MessageDescriptor internal__static_northwind_Order__Descriptor
  58. = Descriptor.MessageTypes[1];
  59. internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.Order, global::Northwind.Order.Builder> internal__static_northwind_Order__FieldAccessorTable
  60. = new pb::FieldAccess.FieldAccessorTable<global::Northwind.Order, global::Northwind.Order.Builder>(internal__static_northwind_Order__Descriptor,
  61. new string[] { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode", "ShipCountry", "Lines", });
  62. internal static readonly pbd::MessageDescriptor internal__static_northwind_OrderLine__Descriptor
  63. = Descriptor.MessageTypes[2];
  64. internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.OrderLine, global::Northwind.OrderLine.Builder> internal__static_northwind_OrderLine__FieldAccessorTable
  65. = new pb::FieldAccess.FieldAccessorTable<global::Northwind.OrderLine, global::Northwind.OrderLine.Builder>(internal__static_northwind_OrderLine__Descriptor,
  66. new string[] { "OrderID", "ProductID", "UnitPrice", "Quantity", "Discount", });
  67. #endregion
  68. }
  69. #region Enums
  70. #endregion
  71. #region Messages
  72. public sealed partial class Database : pb::GeneratedMessage<Database, Database.Builder> {
  73. private static readonly Database defaultInstance = new Database();
  74. public static Database DefaultInstance {
  75. get { return defaultInstance; }
  76. }
  77. public override Database DefaultInstanceForType {
  78. get { return defaultInstance; }
  79. }
  80. protected override Database ThisMessage {
  81. get { return this; }
  82. }
  83. public static pbd::MessageDescriptor Descriptor {
  84. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Database__Descriptor; }
  85. }
  86. protected override pb::FieldAccess.FieldAccessorTable<Database, Database.Builder> InternalFieldAccessors {
  87. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Database__FieldAccessorTable; }
  88. }
  89. // repeated .northwind.Order Orders = 1;
  90. private scg::IList<global::Northwind.Order> orders_ = pbc::Lists<global::Northwind.Order>.Empty;
  91. public scg::IList<global::Northwind.Order> OrdersList {
  92. get { return orders_; }
  93. }
  94. public int OrdersCount
  95. { get { return orders_.Count; }
  96. }
  97. public global::Northwind.Order GetOrders(int index) {
  98. return orders_ [index];
  99. }
  100. public override bool IsInitialized {
  101. get {
  102. return true;
  103. }
  104. }
  105. public override void WriteTo(pb::CodedOutputStream output) {
  106. foreach (global::Northwind.Order element in OrdersList) {
  107. output.WriteMessage(1, element);
  108. }
  109. UnknownFields.WriteTo(output);
  110. }
  111. private int memoizedSerializedSize = -1;
  112. public override int SerializedSize {
  113. get {
  114. int size = memoizedSerializedSize;
  115. if (size != -1) return size;
  116. size = 0;
  117. foreach (global::Northwind.Order element in OrdersList) {
  118. size += pb::CodedOutputStream.ComputeMessageSize(1, element);
  119. }
  120. size += UnknownFields.SerializedSize;
  121. memoizedSerializedSize = size;
  122. return size;
  123. }
  124. }
  125. public static global::Northwind.Database ParseFrom(pb::ByteString data) {
  126. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  127. }
  128. public static global::Northwind.Database ParseFrom(pb::ByteString data,
  129. pb::ExtensionRegistry extensionRegistry) {
  130. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  131. .BuildParsed();
  132. }
  133. public static global::Northwind.Database ParseFrom(byte[] data) {
  134. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  135. }
  136. public static global::Northwind.Database ParseFrom(byte[] data,
  137. pb::ExtensionRegistry extensionRegistry) {
  138. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  139. .BuildParsed();
  140. }
  141. public static global::Northwind.Database ParseFrom(global::System.IO.Stream input) {
  142. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  143. }
  144. public static global::Northwind.Database ParseFrom(
  145. global::System.IO.Stream input,
  146. pb::ExtensionRegistry extensionRegistry) {
  147. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  148. .BuildParsed();
  149. }
  150. public static global::Northwind.Database ParseFrom(pb::CodedInputStream input) {
  151. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  152. }
  153. public static global::Northwind.Database ParseFrom(pb::CodedInputStream input,
  154. pb::ExtensionRegistry extensionRegistry) {
  155. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  156. .BuildParsed();
  157. }
  158. public static Builder CreateBuilder() { return new Builder(); }
  159. public override Builder CreateBuilderForType() { return new Builder(); }
  160. public static Builder CreateBuilder(global::Northwind.Database prototype) {
  161. return (Builder) new Builder().MergeFrom(prototype);
  162. }
  163. public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.Database, Builder> {
  164. protected override Builder ThisBuilder {
  165. get { return this; }
  166. }
  167. // Construct using global::Northwind.Database.CreateBuilder()
  168. internal Builder() {}
  169. global::Northwind.Database result = new global::Northwind.Database();
  170. protected override global::Northwind.Database MessageBeingBuilt {
  171. get { return result; }
  172. }
  173. public override Builder Clear() {
  174. result = new global::Northwind.Database();
  175. return this;
  176. }
  177. public override Builder Clone() {
  178. return new Builder().MergeFrom(result);
  179. }
  180. public override pbd::MessageDescriptor DescriptorForType {
  181. get { return global::Northwind.Database.Descriptor; }
  182. }
  183. public override global::Northwind.Database DefaultInstanceForType {
  184. get { return global::Northwind.Database.DefaultInstance; }
  185. }
  186. public override global::Northwind.Database BuildPartial() {
  187. if (result.orders_ != pbc::Lists<global::Northwind.Order>.Empty) {
  188. result.orders_ = pbc::Lists<global::Northwind.Order>.AsReadOnly(result.orders_);
  189. }
  190. global::Northwind.Database returnMe = result;
  191. result = null;
  192. return returnMe;
  193. }
  194. public override Builder MergeFrom(pb::IMessage other) {
  195. if (other is global::Northwind.Database) {
  196. return MergeFrom((global::Northwind.Database) other);
  197. } else {
  198. base.MergeFrom(other);
  199. return this;
  200. }
  201. }
  202. public override Builder MergeFrom(global::Northwind.Database other) {
  203. if (other == global::Northwind.Database.DefaultInstance) return this;
  204. if (other.orders_.Count != 0) {
  205. if (result.orders_.Count == 0) {
  206. result.orders_ = new scg::List<global::Northwind.Order>();
  207. }
  208. base.AddRange(other.orders_, result.orders_);
  209. }
  210. this.MergeUnknownFields(other.UnknownFields);
  211. return this;
  212. }
  213. public override Builder MergeFrom(pb::CodedInputStream input) {
  214. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  215. }
  216. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  217. pb::UnknownFieldSet.Builder unknownFields =
  218. pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  219. while (true) {
  220. uint tag = input.ReadTag();
  221. switch (tag) {
  222. case 0:
  223. this.UnknownFields = unknownFields.Build();
  224. return this;
  225. default: {
  226. if (!ParseUnknownField(input, unknownFields,
  227. extensionRegistry, tag)) {
  228. this.UnknownFields = unknownFields.Build();
  229. return this;
  230. }
  231. break;
  232. }
  233. case 10: {
  234. global::Northwind.Order.Builder subBuilder = global::Northwind.Order.CreateBuilder();
  235. input.ReadMessage(subBuilder, extensionRegistry);
  236. AddOrders(subBuilder.BuildPartial());
  237. break;
  238. }
  239. }
  240. }
  241. }
  242. // repeated .northwind.Order Orders = 1;
  243. public scg::IList<global::Northwind.Order> OrdersList {
  244. get { return pbc::Lists.AsReadOnly(result.orders_); }
  245. }
  246. public int OrdersCount {
  247. get { return result.OrdersCount; }
  248. }
  249. public global::Northwind.Order GetOrders(int index) {
  250. return result.GetOrders(index);
  251. }
  252. public Builder SetOrders(int index, global::Northwind.Order value) {
  253. result.orders_[index] = value;
  254. return this;
  255. }
  256. public Builder SetOrders(int index, global::Northwind.Order.Builder builderForValue) {
  257. result.orders_[index] = builderForValue.Build();
  258. return this;
  259. }
  260. public Builder AddOrders(global::Northwind.Order value) {
  261. if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) {
  262. result.orders_ = new scg::List<global::Northwind.Order>();
  263. }
  264. result.orders_.Add(value);
  265. return this;
  266. }
  267. public Builder AddOrders(global::Northwind.Order.Builder builderForValue) {
  268. if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) {
  269. result.orders_ = new scg::List<global::Northwind.Order>();
  270. }
  271. result.orders_.Add(builderForValue.Build());
  272. return this;
  273. }
  274. public Builder AddRangeOrders(scg::IEnumerable<global::Northwind.Order> values) {
  275. if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) {
  276. result.orders_ = new scg::List<global::Northwind.Order>();
  277. }
  278. base.AddRange(values, result.orders_);
  279. return this;
  280. }
  281. public Builder ClearOrders() {
  282. result.orders_ = pbc::Lists<global::Northwind.Order>.Empty;
  283. return this;
  284. }
  285. }
  286. }
  287. public sealed partial class Order : pb::GeneratedMessage<Order, Order.Builder> {
  288. private static readonly Order defaultInstance = new Order();
  289. public static Order DefaultInstance {
  290. get { return defaultInstance; }
  291. }
  292. public override Order DefaultInstanceForType {
  293. get { return defaultInstance; }
  294. }
  295. protected override Order ThisMessage {
  296. get { return this; }
  297. }
  298. public static pbd::MessageDescriptor Descriptor {
  299. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Order__Descriptor; }
  300. }
  301. protected override pb::FieldAccess.FieldAccessorTable<Order, Order.Builder> InternalFieldAccessors {
  302. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Order__FieldAccessorTable; }
  303. }
  304. // optional int32 OrderID = 1;
  305. private bool hasOrderID;
  306. private int orderID_ = 0;
  307. public bool HasOrderID {
  308. get { return hasOrderID; }
  309. }
  310. public int OrderID {
  311. get { return orderID_; }
  312. }
  313. // optional string CustomerID = 2;
  314. private bool hasCustomerID;
  315. private string customerID_ = "";
  316. public bool HasCustomerID {
  317. get { return hasCustomerID; }
  318. }
  319. public string CustomerID {
  320. get { return customerID_; }
  321. }
  322. // optional int32 EmployeeID = 3;
  323. private bool hasEmployeeID;
  324. private int employeeID_ = 0;
  325. public bool HasEmployeeID {
  326. get { return hasEmployeeID; }
  327. }
  328. public int EmployeeID {
  329. get { return employeeID_; }
  330. }
  331. // optional .bcl.DateTime OrderDate = 4;
  332. private bool hasOrderDate;
  333. private global::Google.ProtocolBuffers.Bcl.DateTime orderDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  334. public bool HasOrderDate {
  335. get { return hasOrderDate; }
  336. }
  337. public global::Google.ProtocolBuffers.Bcl.DateTime OrderDate {
  338. get { return orderDate_; }
  339. }
  340. // optional .bcl.DateTime RequiredDate = 5;
  341. private bool hasRequiredDate;
  342. private global::Google.ProtocolBuffers.Bcl.DateTime requiredDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  343. public bool HasRequiredDate {
  344. get { return hasRequiredDate; }
  345. }
  346. public global::Google.ProtocolBuffers.Bcl.DateTime RequiredDate {
  347. get { return requiredDate_; }
  348. }
  349. // optional .bcl.DateTime ShippedDate = 6;
  350. private bool hasShippedDate;
  351. private global::Google.ProtocolBuffers.Bcl.DateTime shippedDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  352. public bool HasShippedDate {
  353. get { return hasShippedDate; }
  354. }
  355. public global::Google.ProtocolBuffers.Bcl.DateTime ShippedDate {
  356. get { return shippedDate_; }
  357. }
  358. // optional int32 ShipVia = 7;
  359. private bool hasShipVia;
  360. private int shipVia_ = 0;
  361. public bool HasShipVia {
  362. get { return hasShipVia; }
  363. }
  364. public int ShipVia {
  365. get { return shipVia_; }
  366. }
  367. // optional .bcl.Decimal Freight = 8;
  368. private bool hasFreight;
  369. private global::Google.ProtocolBuffers.Bcl.Decimal freight_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance;
  370. public bool HasFreight {
  371. get { return hasFreight; }
  372. }
  373. public global::Google.ProtocolBuffers.Bcl.Decimal Freight {
  374. get { return freight_; }
  375. }
  376. // optional string ShipName = 9;
  377. private bool hasShipName;
  378. private string shipName_ = "";
  379. public bool HasShipName {
  380. get { return hasShipName; }
  381. }
  382. public string ShipName {
  383. get { return shipName_; }
  384. }
  385. // optional string ShipAddress = 10;
  386. private bool hasShipAddress;
  387. private string shipAddress_ = "";
  388. public bool HasShipAddress {
  389. get { return hasShipAddress; }
  390. }
  391. public string ShipAddress {
  392. get { return shipAddress_; }
  393. }
  394. // optional string ShipCity = 11;
  395. private bool hasShipCity;
  396. private string shipCity_ = "";
  397. public bool HasShipCity {
  398. get { return hasShipCity; }
  399. }
  400. public string ShipCity {
  401. get { return shipCity_; }
  402. }
  403. // optional string ShipRegion = 12;
  404. private bool hasShipRegion;
  405. private string shipRegion_ = "";
  406. public bool HasShipRegion {
  407. get { return hasShipRegion; }
  408. }
  409. public string ShipRegion {
  410. get { return shipRegion_; }
  411. }
  412. // optional string ShipPostalCode = 13;
  413. private bool hasShipPostalCode;
  414. private string shipPostalCode_ = "";
  415. public bool HasShipPostalCode {
  416. get { return hasShipPostalCode; }
  417. }
  418. public string ShipPostalCode {
  419. get { return shipPostalCode_; }
  420. }
  421. // optional string ShipCountry = 14;
  422. private bool hasShipCountry;
  423. private string shipCountry_ = "";
  424. public bool HasShipCountry {
  425. get { return hasShipCountry; }
  426. }
  427. public string ShipCountry {
  428. get { return shipCountry_; }
  429. }
  430. // repeated .northwind.OrderLine Lines = 15;
  431. private scg::IList<global::Northwind.OrderLine> lines_ = pbc::Lists<global::Northwind.OrderLine>.Empty;
  432. public scg::IList<global::Northwind.OrderLine> LinesList {
  433. get { return lines_; }
  434. }
  435. public int LinesCount
  436. { get { return lines_.Count; }
  437. }
  438. public global::Northwind.OrderLine GetLines(int index) {
  439. return lines_ [index];
  440. }
  441. public override bool IsInitialized {
  442. get {
  443. return true;
  444. }
  445. }
  446. public override void WriteTo(pb::CodedOutputStream output) {
  447. if (HasOrderID) {
  448. output.WriteInt32(1, OrderID);
  449. }
  450. if (HasCustomerID) {
  451. output.WriteString(2, CustomerID);
  452. }
  453. if (HasEmployeeID) {
  454. output.WriteInt32(3, EmployeeID);
  455. }
  456. if (HasOrderDate) {
  457. output.WriteMessage(4, OrderDate);
  458. }
  459. if (HasRequiredDate) {
  460. output.WriteMessage(5, RequiredDate);
  461. }
  462. if (HasShippedDate) {
  463. output.WriteMessage(6, ShippedDate);
  464. }
  465. if (HasShipVia) {
  466. output.WriteInt32(7, ShipVia);
  467. }
  468. if (HasFreight) {
  469. output.WriteMessage(8, Freight);
  470. }
  471. if (HasShipName) {
  472. output.WriteString(9, ShipName);
  473. }
  474. if (HasShipAddress) {
  475. output.WriteString(10, ShipAddress);
  476. }
  477. if (HasShipCity) {
  478. output.WriteString(11, ShipCity);
  479. }
  480. if (HasShipRegion) {
  481. output.WriteString(12, ShipRegion);
  482. }
  483. if (HasShipPostalCode) {
  484. output.WriteString(13, ShipPostalCode);
  485. }
  486. if (HasShipCountry) {
  487. output.WriteString(14, ShipCountry);
  488. }
  489. foreach (global::Northwind.OrderLine element in LinesList) {
  490. output.WriteMessage(15, element);
  491. }
  492. UnknownFields.WriteTo(output);
  493. }
  494. private int memoizedSerializedSize = -1;
  495. public override int SerializedSize {
  496. get {
  497. int size = memoizedSerializedSize;
  498. if (size != -1) return size;
  499. size = 0;
  500. if (HasOrderID) {
  501. size += pb::CodedOutputStream.ComputeInt32Size(1, OrderID);
  502. }
  503. if (HasCustomerID) {
  504. size += pb::CodedOutputStream.ComputeStringSize(2, CustomerID);
  505. }
  506. if (HasEmployeeID) {
  507. size += pb::CodedOutputStream.ComputeInt32Size(3, EmployeeID);
  508. }
  509. if (HasOrderDate) {
  510. size += pb::CodedOutputStream.ComputeMessageSize(4, OrderDate);
  511. }
  512. if (HasRequiredDate) {
  513. size += pb::CodedOutputStream.ComputeMessageSize(5, RequiredDate);
  514. }
  515. if (HasShippedDate) {
  516. size += pb::CodedOutputStream.ComputeMessageSize(6, ShippedDate);
  517. }
  518. if (HasShipVia) {
  519. size += pb::CodedOutputStream.ComputeInt32Size(7, ShipVia);
  520. }
  521. if (HasFreight) {
  522. size += pb::CodedOutputStream.ComputeMessageSize(8, Freight);
  523. }
  524. if (HasShipName) {
  525. size += pb::CodedOutputStream.ComputeStringSize(9, ShipName);
  526. }
  527. if (HasShipAddress) {
  528. size += pb::CodedOutputStream.ComputeStringSize(10, ShipAddress);
  529. }
  530. if (HasShipCity) {
  531. size += pb::CodedOutputStream.ComputeStringSize(11, ShipCity);
  532. }
  533. if (HasShipRegion) {
  534. size += pb::CodedOutputStream.ComputeStringSize(12, ShipRegion);
  535. }
  536. if (HasShipPostalCode) {
  537. size += pb::CodedOutputStream.ComputeStringSize(13, ShipPostalCode);
  538. }
  539. if (HasShipCountry) {
  540. size += pb::CodedOutputStream.ComputeStringSize(14, ShipCountry);
  541. }
  542. foreach (global::Northwind.OrderLine element in LinesList) {
  543. size += pb::CodedOutputStream.ComputeMessageSize(15, element);
  544. }
  545. size += UnknownFields.SerializedSize;
  546. memoizedSerializedSize = size;
  547. return size;
  548. }
  549. }
  550. public static global::Northwind.Order ParseFrom(pb::ByteString data) {
  551. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  552. }
  553. public static global::Northwind.Order ParseFrom(pb::ByteString data,
  554. pb::ExtensionRegistry extensionRegistry) {
  555. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  556. .BuildParsed();
  557. }
  558. public static global::Northwind.Order ParseFrom(byte[] data) {
  559. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  560. }
  561. public static global::Northwind.Order ParseFrom(byte[] data,
  562. pb::ExtensionRegistry extensionRegistry) {
  563. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  564. .BuildParsed();
  565. }
  566. public static global::Northwind.Order ParseFrom(global::System.IO.Stream input) {
  567. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  568. }
  569. public static global::Northwind.Order ParseFrom(
  570. global::System.IO.Stream input,
  571. pb::ExtensionRegistry extensionRegistry) {
  572. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  573. .BuildParsed();
  574. }
  575. public static global::Northwind.Order ParseFrom(pb::CodedInputStream input) {
  576. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  577. }
  578. public static global::Northwind.Order ParseFrom(pb::CodedInputStream input,
  579. pb::ExtensionRegistry extensionRegistry) {
  580. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  581. .BuildParsed();
  582. }
  583. public static Builder CreateBuilder() { return new Builder(); }
  584. public override Builder CreateBuilderForType() { return new Builder(); }
  585. public static Builder CreateBuilder(global::Northwind.Order prototype) {
  586. return (Builder) new Builder().MergeFrom(prototype);
  587. }
  588. public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.Order, Builder> {
  589. protected override Builder ThisBuilder {
  590. get { return this; }
  591. }
  592. // Construct using global::Northwind.Order.CreateBuilder()
  593. internal Builder() {}
  594. global::Northwind.Order result = new global::Northwind.Order();
  595. protected override global::Northwind.Order MessageBeingBuilt {
  596. get { return result; }
  597. }
  598. public override Builder Clear() {
  599. result = new global::Northwind.Order();
  600. return this;
  601. }
  602. public override Builder Clone() {
  603. return new Builder().MergeFrom(result);
  604. }
  605. public override pbd::MessageDescriptor DescriptorForType {
  606. get { return global::Northwind.Order.Descriptor; }
  607. }
  608. public override global::Northwind.Order DefaultInstanceForType {
  609. get { return global::Northwind.Order.DefaultInstance; }
  610. }
  611. public override global::Northwind.Order BuildPartial() {
  612. if (result.lines_ != pbc::Lists<global::Northwind.OrderLine>.Empty) {
  613. result.lines_ = pbc::Lists<global::Northwind.OrderLine>.AsReadOnly(result.lines_);
  614. }
  615. global::Northwind.Order returnMe = result;
  616. result = null;
  617. return returnMe;
  618. }
  619. public override Builder MergeFrom(pb::IMessage other) {
  620. if (other is global::Northwind.Order) {
  621. return MergeFrom((global::Northwind.Order) other);
  622. } else {
  623. base.MergeFrom(other);
  624. return this;
  625. }
  626. }
  627. public override Builder MergeFrom(global::Northwind.Order other) {
  628. if (other == global::Northwind.Order.DefaultInstance) return this;
  629. if (other.HasOrderID) {
  630. OrderID = other.OrderID;
  631. }
  632. if (other.HasCustomerID) {
  633. CustomerID = other.CustomerID;
  634. }
  635. if (other.HasEmployeeID) {
  636. EmployeeID = other.EmployeeID;
  637. }
  638. if (other.HasOrderDate) {
  639. MergeOrderDate(other.OrderDate);
  640. }
  641. if (other.HasRequiredDate) {
  642. MergeRequiredDate(other.RequiredDate);
  643. }
  644. if (other.HasShippedDate) {
  645. MergeShippedDate(other.ShippedDate);
  646. }
  647. if (other.HasShipVia) {
  648. ShipVia = other.ShipVia;
  649. }
  650. if (other.HasFreight) {
  651. MergeFreight(other.Freight);
  652. }
  653. if (other.HasShipName) {
  654. ShipName = other.ShipName;
  655. }
  656. if (other.HasShipAddress) {
  657. ShipAddress = other.ShipAddress;
  658. }
  659. if (other.HasShipCity) {
  660. ShipCity = other.ShipCity;
  661. }
  662. if (other.HasShipRegion) {
  663. ShipRegion = other.ShipRegion;
  664. }
  665. if (other.HasShipPostalCode) {
  666. ShipPostalCode = other.ShipPostalCode;
  667. }
  668. if (other.HasShipCountry) {
  669. ShipCountry = other.ShipCountry;
  670. }
  671. if (other.lines_.Count != 0) {
  672. if (result.lines_.Count == 0) {
  673. result.lines_ = new scg::List<global::Northwind.OrderLine>();
  674. }
  675. base.AddRange(other.lines_, result.lines_);
  676. }
  677. this.MergeUnknownFields(other.UnknownFields);
  678. return this;
  679. }
  680. public override Builder MergeFrom(pb::CodedInputStream input) {
  681. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  682. }
  683. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  684. pb::UnknownFieldSet.Builder unknownFields =
  685. pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  686. while (true) {
  687. uint tag = input.ReadTag();
  688. switch (tag) {
  689. case 0:
  690. this.UnknownFields = unknownFields.Build();
  691. return this;
  692. default: {
  693. if (!ParseUnknownField(input, unknownFields,
  694. extensionRegistry, tag)) {
  695. this.UnknownFields = unknownFields.Build();
  696. return this;
  697. }
  698. break;
  699. }
  700. case 8: {
  701. OrderID = input.ReadInt32();
  702. break;
  703. }
  704. case 18: {
  705. CustomerID = input.ReadString();
  706. break;
  707. }
  708. case 24: {
  709. EmployeeID = input.ReadInt32();
  710. break;
  711. }
  712. case 34: {
  713. global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder();
  714. if (HasOrderDate) {
  715. subBuilder.MergeFrom(OrderDate);
  716. }
  717. input.ReadMessage(subBuilder, extensionRegistry);
  718. OrderDate = subBuilder.BuildPartial();
  719. break;
  720. }
  721. case 42: {
  722. global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder();
  723. if (HasRequiredDate) {
  724. subBuilder.MergeFrom(RequiredDate);
  725. }
  726. input.ReadMessage(subBuilder, extensionRegistry);
  727. RequiredDate = subBuilder.BuildPartial();
  728. break;
  729. }
  730. case 50: {
  731. global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder();
  732. if (HasShippedDate) {
  733. subBuilder.MergeFrom(ShippedDate);
  734. }
  735. input.ReadMessage(subBuilder, extensionRegistry);
  736. ShippedDate = subBuilder.BuildPartial();
  737. break;
  738. }
  739. case 56: {
  740. ShipVia = input.ReadInt32();
  741. break;
  742. }
  743. case 66: {
  744. global::Google.ProtocolBuffers.Bcl.Decimal.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder();
  745. if (HasFreight) {
  746. subBuilder.MergeFrom(Freight);
  747. }
  748. input.ReadMessage(subBuilder, extensionRegistry);
  749. Freight = subBuilder.BuildPartial();
  750. break;
  751. }
  752. case 74: {
  753. ShipName = input.ReadString();
  754. break;
  755. }
  756. case 82: {
  757. ShipAddress = input.ReadString();
  758. break;
  759. }
  760. case 90: {
  761. ShipCity = input.ReadString();
  762. break;
  763. }
  764. case 98: {
  765. ShipRegion = input.ReadString();
  766. break;
  767. }
  768. case 106: {
  769. ShipPostalCode = input.ReadString();
  770. break;
  771. }
  772. case 114: {
  773. ShipCountry = input.ReadString();
  774. break;
  775. }
  776. case 122: {
  777. global::Northwind.OrderLine.Builder subBuilder = global::Northwind.OrderLine.CreateBuilder();
  778. input.ReadMessage(subBuilder, extensionRegistry);
  779. AddLines(subBuilder.BuildPartial());
  780. break;
  781. }
  782. }
  783. }
  784. }
  785. // optional int32 OrderID = 1;
  786. public bool HasOrderID {
  787. get { return result.HasOrderID; }
  788. }
  789. public int OrderID {
  790. get { return result.OrderID; }
  791. set { SetOrderID(value); }
  792. }
  793. public Builder SetOrderID(int value) {
  794. result.hasOrderID = true;
  795. result.orderID_ = value;
  796. return this;
  797. }
  798. public Builder ClearOrderID() {
  799. result.hasOrderID = false;
  800. result.orderID_ = 0;
  801. return this;
  802. }
  803. // optional string CustomerID = 2;
  804. public bool HasCustomerID {
  805. get { return result.HasCustomerID; }
  806. }
  807. public string CustomerID {
  808. get { return result.CustomerID; }
  809. set { SetCustomerID(value); }
  810. }
  811. public Builder SetCustomerID(string value) {
  812. result.hasCustomerID = true;
  813. result.customerID_ = value;
  814. return this;
  815. }
  816. public Builder ClearCustomerID() {
  817. result.hasCustomerID = false;
  818. result.customerID_ = "";
  819. return this;
  820. }
  821. // optional int32 EmployeeID = 3;
  822. public bool HasEmployeeID {
  823. get { return result.HasEmployeeID; }
  824. }
  825. public int EmployeeID {
  826. get { return result.EmployeeID; }
  827. set { SetEmployeeID(value); }
  828. }
  829. public Builder SetEmployeeID(int value) {
  830. result.hasEmployeeID = true;
  831. result.employeeID_ = value;
  832. return this;
  833. }
  834. public Builder ClearEmployeeID() {
  835. result.hasEmployeeID = false;
  836. result.employeeID_ = 0;
  837. return this;
  838. }
  839. // optional .bcl.DateTime OrderDate = 4;
  840. public bool HasOrderDate {
  841. get { return result.HasOrderDate; }
  842. }
  843. public global::Google.ProtocolBuffers.Bcl.DateTime OrderDate {
  844. get { return result.OrderDate; }
  845. set { SetOrderDate(value); }
  846. }
  847. public Builder SetOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  848. result.hasOrderDate = true;
  849. result.orderDate_ = value;
  850. return this;
  851. }
  852. public Builder SetOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) {
  853. result.hasOrderDate = true;
  854. result.orderDate_ = builderForValue.Build();
  855. return this;
  856. }
  857. public Builder MergeOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  858. if (result.HasOrderDate &&
  859. result.orderDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) {
  860. result.orderDate_ =
  861. global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.orderDate_).MergeFrom(value).BuildPartial();
  862. } else {
  863. result.orderDate_ = value;
  864. }
  865. result.hasOrderDate = true;
  866. return this;
  867. }
  868. public Builder ClearOrderDate() {
  869. result.hasOrderDate = false;
  870. result.orderDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  871. return this;
  872. }
  873. // optional .bcl.DateTime RequiredDate = 5;
  874. public bool HasRequiredDate {
  875. get { return result.HasRequiredDate; }
  876. }
  877. public global::Google.ProtocolBuffers.Bcl.DateTime RequiredDate {
  878. get { return result.RequiredDate; }
  879. set { SetRequiredDate(value); }
  880. }
  881. public Builder SetRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  882. result.hasRequiredDate = true;
  883. result.requiredDate_ = value;
  884. return this;
  885. }
  886. public Builder SetRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) {
  887. result.hasRequiredDate = true;
  888. result.requiredDate_ = builderForValue.Build();
  889. return this;
  890. }
  891. public Builder MergeRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  892. if (result.HasRequiredDate &&
  893. result.requiredDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) {
  894. result.requiredDate_ =
  895. global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.requiredDate_).MergeFrom(value).BuildPartial();
  896. } else {
  897. result.requiredDate_ = value;
  898. }
  899. result.hasRequiredDate = true;
  900. return this;
  901. }
  902. public Builder ClearRequiredDate() {
  903. result.hasRequiredDate = false;
  904. result.requiredDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  905. return this;
  906. }
  907. // optional .bcl.DateTime ShippedDate = 6;
  908. public bool HasShippedDate {
  909. get { return result.HasShippedDate; }
  910. }
  911. public global::Google.ProtocolBuffers.Bcl.DateTime ShippedDate {
  912. get { return result.ShippedDate; }
  913. set { SetShippedDate(value); }
  914. }
  915. public Builder SetShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  916. result.hasShippedDate = true;
  917. result.shippedDate_ = value;
  918. return this;
  919. }
  920. public Builder SetShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) {
  921. result.hasShippedDate = true;
  922. result.shippedDate_ = builderForValue.Build();
  923. return this;
  924. }
  925. public Builder MergeShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime value) {
  926. if (result.HasShippedDate &&
  927. result.shippedDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) {
  928. result.shippedDate_ =
  929. global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.shippedDate_).MergeFrom(value).BuildPartial();
  930. } else {
  931. result.shippedDate_ = value;
  932. }
  933. result.hasShippedDate = true;
  934. return this;
  935. }
  936. public Builder ClearShippedDate() {
  937. result.hasShippedDate = false;
  938. result.shippedDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance;
  939. return this;
  940. }
  941. // optional int32 ShipVia = 7;
  942. public bool HasShipVia {
  943. get { return result.HasShipVia; }
  944. }
  945. public int ShipVia {
  946. get { return result.ShipVia; }
  947. set { SetShipVia(value); }
  948. }
  949. public Builder SetShipVia(int value) {
  950. result.hasShipVia = true;
  951. result.shipVia_ = value;
  952. return this;
  953. }
  954. public Builder ClearShipVia() {
  955. result.hasShipVia = false;
  956. result.shipVia_ = 0;
  957. return this;
  958. }
  959. // optional .bcl.Decimal Freight = 8;
  960. public bool HasFreight {
  961. get { return result.HasFreight; }
  962. }
  963. public global::Google.ProtocolBuffers.Bcl.Decimal Freight {
  964. get { return result.Freight; }
  965. set { SetFreight(value); }
  966. }
  967. public Builder SetFreight(global::Google.ProtocolBuffers.Bcl.Decimal value) {
  968. result.hasFreight = true;
  969. result.freight_ = value;
  970. return this;
  971. }
  972. public Builder SetFreight(global::Google.ProtocolBuffers.Bcl.Decimal.Builder builderForValue) {
  973. result.hasFreight = true;
  974. result.freight_ = builderForValue.Build();
  975. return this;
  976. }
  977. public Builder MergeFreight(global::Google.ProtocolBuffers.Bcl.Decimal value) {
  978. if (result.HasFreight &&
  979. result.freight_ != global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance) {
  980. result.freight_ =
  981. global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(result.freight_).MergeFrom(value).BuildPartial();
  982. } else {
  983. result.freight_ = value;
  984. }
  985. result.hasFreight = true;
  986. return this;
  987. }
  988. public Builder ClearFreight() {
  989. result.hasFreight = false;
  990. result.freight_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance;
  991. return this;
  992. }
  993. // optional string ShipName = 9;
  994. public bool HasShipName {
  995. get { return result.HasShipName; }
  996. }
  997. public string ShipName {
  998. get { return result.ShipName; }
  999. set { SetShipName(value); }
  1000. }
  1001. public Builder SetShipName(string value) {
  1002. result.hasShipName = true;
  1003. result.shipName_ = value;
  1004. return this;
  1005. }
  1006. public Builder ClearShipName() {
  1007. result.hasShipName = false;
  1008. result.shipName_ = "";
  1009. return this;
  1010. }
  1011. // optional string ShipAddress = 10;
  1012. public bool HasShipAddress {
  1013. get { return result.HasShipAddress; }
  1014. }
  1015. public string ShipAddress {
  1016. get { return result.ShipAddress; }
  1017. set { SetShipAddress(value); }
  1018. }
  1019. public Builder SetShipAddress(string value) {
  1020. result.hasShipAddress = true;
  1021. result.shipAddress_ = value;
  1022. return this;
  1023. }
  1024. public Builder ClearShipAddress() {
  1025. result.hasShipAddress = false;
  1026. result.shipAddress_ = "";
  1027. return this;
  1028. }
  1029. // optional string ShipCity = 11;
  1030. public bool HasShipCity {
  1031. get { return result.HasShipCity; }
  1032. }
  1033. public string ShipCity {
  1034. get { return result.ShipCity; }
  1035. set { SetShipCity(value); }
  1036. }
  1037. public Builder SetShipCity(string value) {
  1038. result.hasShipCity = true;
  1039. result.shipCity_ = value;
  1040. return this;
  1041. }
  1042. public Builder ClearShipCity() {
  1043. result.hasShipCity = false;
  1044. result.shipCity_ = "";
  1045. return this;
  1046. }
  1047. // optional string ShipRegion = 12;
  1048. public bool HasShipRegion {
  1049. get { return result.HasShipRegion; }
  1050. }
  1051. public string ShipRegion {
  1052. get { return result.ShipRegion; }
  1053. set { SetShipRegion(value); }
  1054. }
  1055. public Builder SetShipRegion(string value) {
  1056. result.hasShipRegion = true;
  1057. result.shipRegion_ = value;
  1058. return this;
  1059. }
  1060. public Builder ClearShipRegion() {
  1061. result.hasShipRegion = false;
  1062. result.shipRegion_ = "";
  1063. return this;
  1064. }
  1065. // optional string ShipPostalCode = 13;
  1066. public bool HasShipPostalCode {
  1067. get { return result.HasShipPostalCode; }
  1068. }
  1069. public string ShipPostalCode {
  1070. get { return result.ShipPostalCode; }
  1071. set { SetShipPostalCode(value); }
  1072. }
  1073. public Builder SetShipPostalCode(string value) {
  1074. result.hasShipPostalCode = true;
  1075. result.shipPostalCode_ = value;
  1076. return this;
  1077. }
  1078. public Builder ClearShipPostalCode() {
  1079. result.hasShipPostalCode = false;
  1080. result.shipPostalCode_ = "";
  1081. return this;
  1082. }
  1083. // optional string ShipCountry = 14;
  1084. public bool HasShipCountry {
  1085. get { return result.HasShipCountry; }
  1086. }
  1087. public string ShipCountry {
  1088. get { return result.ShipCountry; }
  1089. set { SetShipCountry(value); }
  1090. }
  1091. public Builder SetShipCountry(string value) {
  1092. result.hasShipCountry = true;
  1093. result.shipCountry_ = value;
  1094. return this;
  1095. }
  1096. public Builder ClearShipCountry() {
  1097. result.hasShipCountry = false;
  1098. result.shipCountry_ = "";
  1099. return this;
  1100. }
  1101. // repeated .northwind.OrderLine Lines = 15;
  1102. public scg::IList<global::Northwind.OrderLine> LinesList {
  1103. get { return pbc::Lists.AsReadOnly(result.lines_); }
  1104. }
  1105. public int LinesCount {
  1106. get { return result.LinesCount; }
  1107. }
  1108. public global::Northwind.OrderLine GetLines(int index) {
  1109. return result.GetLines(index);
  1110. }
  1111. public Builder SetLines(int index, global::Northwind.OrderLine value) {
  1112. result.lines_[index] = value;
  1113. return this;
  1114. }
  1115. public Builder SetLines(int index, global::Northwind.OrderLine.Builder builderForValue) {
  1116. result.lines_[index] = builderForValue.Build();
  1117. return this;
  1118. }
  1119. public Builder AddLines(global::Northwind.OrderLine value) {
  1120. if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) {
  1121. result.lines_ = new scg::List<global::Northwind.OrderLine>();
  1122. }
  1123. result.lines_.Add(value);
  1124. return this;
  1125. }
  1126. public Builder AddLines(global::Northwind.OrderLine.Builder builderForValue) {
  1127. if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) {
  1128. result.lines_ = new scg::List<global::Northwind.OrderLine>();
  1129. }
  1130. result.lines_.Add(builderForValue.Build());
  1131. return this;
  1132. }
  1133. public Builder AddRangeLines(scg::IEnumerable<global::Northwind.OrderLine> values) {
  1134. if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) {
  1135. result.lines_ = new scg::List<global::Northwind.OrderLine>();
  1136. }
  1137. base.AddRange(values, result.lines_);
  1138. return this;
  1139. }
  1140. public Builder ClearLines() {
  1141. result.lines_ = pbc::Lists<global::Northwind.OrderLine>.Empty;
  1142. return this;
  1143. }
  1144. }
  1145. }
  1146. public sealed partial class OrderLine : pb::GeneratedMessage<OrderLine, OrderLine.Builder> {
  1147. private static readonly OrderLine defaultInstance = new OrderLine();
  1148. public static OrderLine DefaultInstance {
  1149. get { return defaultInstance; }
  1150. }
  1151. public override OrderLine DefaultInstanceForType {
  1152. get { return defaultInstance; }
  1153. }
  1154. protected override OrderLine ThisMessage {
  1155. get { return this; }
  1156. }
  1157. public static pbd::MessageDescriptor Descriptor {
  1158. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_OrderLine__Descriptor; }
  1159. }
  1160. protected override pb::FieldAccess.FieldAccessorTable<OrderLine, OrderLine.Builder> InternalFieldAccessors {
  1161. get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_OrderLine__FieldAccessorTable; }
  1162. }
  1163. // optional int32 OrderID = 1;
  1164. private bool hasOrderID;
  1165. private int orderID_ = 0;
  1166. public bool HasOrderID {
  1167. get { return hasOrderID; }
  1168. }
  1169. public int OrderID {
  1170. get { return orderID_; }
  1171. }
  1172. // optional int32 ProductID = 2;
  1173. private bool hasProductID;
  1174. private int productID_ = 0;
  1175. public bool HasProductID {
  1176. get { return hasProductID; }
  1177. }
  1178. public int ProductID {
  1179. get { return productID_; }
  1180. }
  1181. // optional .bcl.Decimal UnitPrice = 3;
  1182. private bool hasUnitPrice;
  1183. private global::Google.ProtocolBuffers.Bcl.Decimal unitPrice_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance;
  1184. public bool HasUnitPrice {
  1185. get { return hasUnitPrice; }
  1186. }
  1187. public global::Google.ProtocolBuffers.Bcl.Decimal UnitPrice {
  1188. get { return unitPrice_; }
  1189. }
  1190. // optional sint32 Quantity = 4;
  1191. private bool hasQuantity;
  1192. private int quantity_ = 0;
  1193. public bool HasQuantity {
  1194. get { return hasQuantity; }
  1195. }
  1196. public int Quantity {
  1197. get { return quantity_; }
  1198. }
  1199. // optional float Discount = 5;
  1200. private bool hasDiscount;
  1201. private float discount_ = 0F;
  1202. public bool HasDiscount {
  1203. get { return hasDiscount; }
  1204. }
  1205. public float Discount {
  1206. get { return discount_; }
  1207. }
  1208. public override bool IsInitialized {
  1209. get {
  1210. return true;
  1211. }
  1212. }
  1213. public override void WriteTo(pb::CodedOutputStream output) {
  1214. if (HasOrderID) {
  1215. output.WriteInt32(1, OrderID);
  1216. }
  1217. if (HasProductID) {
  1218. output.WriteInt32(2, ProductID);
  1219. }
  1220. if (HasUnitPrice) {
  1221. output.WriteMessage(3, UnitPrice);
  1222. }
  1223. if (HasQuantity) {
  1224. output.WriteSInt32(4, Quantity);
  1225. }
  1226. if (HasDiscount) {
  1227. output.WriteFloat(5, Discount);
  1228. }
  1229. UnknownFields.WriteTo(output);
  1230. }
  1231. private int memoizedSerializedSize = -1;
  1232. public override int SerializedSize {
  1233. get {
  1234. int size = memoizedSerializedSize;
  1235. if (size != -1) return size;
  1236. size = 0;
  1237. if (HasOrderID) {
  1238. size += pb::CodedOutputStream.ComputeInt32Size(1, OrderID);
  1239. }
  1240. if (HasProductID) {
  1241. size += pb::CodedOutputStream.ComputeInt32Size(2, ProductID);
  1242. }
  1243. if (HasUnitPrice) {
  1244. size += pb::CodedOutputStream.ComputeMessageSize(3, UnitPrice);
  1245. }
  1246. if (HasQuantity) {
  1247. size += pb::CodedOutputStream.ComputeSInt32Size(4, Quantity);
  1248. }
  1249. if (HasDiscount) {
  1250. size += pb::CodedOutputStream.ComputeFloatSize(5, Discount);
  1251. }
  1252. size += UnknownFields.SerializedSize;
  1253. memoizedSerializedSize = size;
  1254. return size;
  1255. }
  1256. }
  1257. public static global::Northwind.OrderLine ParseFrom(pb::ByteString data) {
  1258. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  1259. }
  1260. public static global::Northwind.OrderLine ParseFrom(pb::ByteString data,
  1261. pb::ExtensionRegistry extensionRegistry) {
  1262. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  1263. .BuildParsed();
  1264. }
  1265. public static global::Northwind.OrderLine ParseFrom(byte[] data) {
  1266. return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
  1267. }
  1268. public static global::Northwind.OrderLine ParseFrom(byte[] data,
  1269. pb::ExtensionRegistry extensionRegistry) {
  1270. return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
  1271. .BuildParsed();
  1272. }
  1273. public static global::Northwind.OrderLine ParseFrom(global::System.IO.Stream input) {
  1274. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  1275. }
  1276. public static global::Northwind.OrderLine ParseFrom(
  1277. global::System.IO.Stream input,
  1278. pb::ExtensionRegistry extensionRegistry) {
  1279. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  1280. .BuildParsed();
  1281. }
  1282. public static global::Northwind.OrderLine ParseFrom(pb::CodedInputStream input) {
  1283. return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
  1284. }
  1285. public static global::Northwind.OrderLine ParseFrom(pb::CodedInputStream input,
  1286. pb::ExtensionRegistry extensionRegistry) {
  1287. return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
  1288. .BuildParsed();
  1289. }
  1290. public static Builder CreateBuilder() { return new Builder(); }
  1291. public override Builder CreateBuilderForType() { return new Builder(); }
  1292. public static Builder CreateBuilder(global::Northwind.OrderLine prototype) {
  1293. return (Builder) new Builder().MergeFrom(prototype);
  1294. }
  1295. public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.OrderLine, Builder> {
  1296. protected override Builder ThisBuilder {
  1297. get { return this; }
  1298. }
  1299. // Construct using global::Northwind.OrderLine.CreateBuilder()
  1300. internal Builder() {}
  1301. global::Northwind.OrderLine result = new global::Northwind.OrderLine();
  1302. protected override global::Northwind.OrderLine MessageBeingBuilt {
  1303. get { return result; }
  1304. }
  1305. public override Builder Clear() {
  1306. result = new global::Northwind.OrderLine();
  1307. return this;
  1308. }
  1309. public override Builder Clone() {
  1310. return new Builder().MergeFrom(result);
  1311. }
  1312. public override pbd::MessageDescriptor DescriptorForType {
  1313. get { return global::Northwind.OrderLine.Descriptor; }
  1314. }
  1315. public override global::Northwind.OrderLine DefaultInstanceForType {
  1316. get { return global::Northwind.OrderLine.DefaultInstance; }
  1317. }
  1318. public override global::Northwind.OrderLine BuildPartial() {
  1319. global::Northwind.OrderLine returnMe = result;
  1320. result = null;
  1321. return returnMe;
  1322. }
  1323. public override Builder MergeFrom(pb::IMessage other) {
  1324. if (other is global::Northwind.OrderLine) {
  1325. return MergeFrom((global::Northwind.OrderLine) other);
  1326. } else {
  1327. base.MergeFrom(other);
  1328. return this;
  1329. }
  1330. }
  1331. public override Builder MergeFrom(global::Northwind.OrderLine other) {
  1332. if (other == global::Northwind.OrderLine.DefaultInstance) return this;
  1333. if (other.HasOrderID) {
  1334. OrderID = other.OrderID;
  1335. }
  1336. if (other.HasProductID) {
  1337. ProductID = other.ProductID;
  1338. }
  1339. if (other.HasUnitPrice) {
  1340. MergeUnitPrice(other.UnitPrice);
  1341. }
  1342. if (other.HasQuantity) {
  1343. Quantity = other.Quantity;
  1344. }
  1345. if (other.HasDiscount) {
  1346. Discount = other.Discount;
  1347. }
  1348. this.MergeUnknownFields(other.UnknownFields);
  1349. return this;
  1350. }
  1351. public override Builder MergeFrom(pb::CodedInputStream input) {
  1352. return MergeFrom(input, pb::ExtensionRegistry.Empty);
  1353. }
  1354. public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
  1355. pb::UnknownFieldSet.Builder unknownFields =
  1356. pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
  1357. while (true) {
  1358. uint tag = input.ReadTag();
  1359. switch (tag) {
  1360. case 0:
  1361. this.UnknownFields = unknownFields.Build();
  1362. return this;
  1363. default: {
  1364. if (!ParseUnknownField(input, unknownFields,
  1365. extensionRegistry, tag)) {
  1366. this.UnknownFields = unknownFields.Build();
  1367. return this;
  1368. }
  1369. break;
  1370. }
  1371. case 8: {
  1372. OrderID = input.ReadInt32();
  1373. break;
  1374. }
  1375. case 16: {
  1376. ProductID = input.ReadInt32();
  1377. break;
  1378. }
  1379. case 26: {
  1380. global::Google.ProtocolBuffers.Bcl.Decimal.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder();
  1381. if (HasUnitPrice) {
  1382. subBuilder.MergeFrom(UnitPrice);
  1383. }
  1384. input.ReadMessage(subBuilder, extensionRegistry);
  1385. UnitPrice = subBuilder.BuildPartial();
  1386. break;
  1387. }
  1388. case 32: {
  1389. Quantity = input.ReadSInt32();
  1390. break;
  1391. }
  1392. case 45: {
  1393. Discount = input.ReadFloat();
  1394. break;
  1395. }
  1396. }
  1397. }
  1398. }
  1399. // optional int32 OrderID = 1;
  1400. public bool HasOrderID {
  1401. get { return result.HasOrderID; }
  1402. }
  1403. public int OrderID {
  1404. get { return result.OrderID; }
  1405. set { SetOrderID(value); }
  1406. }
  1407. public Builder SetOrderID(int value) {
  1408. result.hasOrderID = true;
  1409. result.orderID_ = value;
  1410. return this;
  1411. }
  1412. public Builder ClearOrderID() {
  1413. result.hasOrderID = false;
  1414. result.orderID_ = 0;
  1415. return this;
  1416. }
  1417. // optional int32 ProductID = 2;
  1418. public bool HasProductID {
  1419. get { return result.HasProductID; }
  1420. }
  1421. public int ProductID {
  1422. get { return result.ProductID; }
  1423. set { SetProductID(value); }
  1424. }
  1425. public Builder SetProductID(int value) {
  1426. result.hasProductID = true;
  1427. result.productID_ = value;
  1428. return this;
  1429. }
  1430. public Builder ClearProductID() {
  1431. result.hasProductID = false;
  1432. result.productID_ = 0;
  1433. return this;
  1434. }
  1435. // optional .bcl.Decimal UnitPrice = 3;
  1436. public bool HasUnitPrice {
  1437. get { return result.HasUnitPrice; }
  1438. }
  1439. public global::Google.ProtocolBuffers.Bcl.Decimal UnitPrice {
  1440. get { return result.UnitPrice; }
  1441. set { SetUnitPrice(value); }
  1442. }
  1443. public Builder SetUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal value) {
  1444. result.hasUnitPrice = true;
  1445. result.unitPrice_ = value;
  1446. return this;
  1447. }
  1448. public Builder SetUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal.Builder builderForValue) {
  1449. result.hasUnitPrice = true;
  1450. result.unitPrice_ = builderForValue.Build();
  1451. return this;
  1452. }
  1453. public Builder MergeUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal value) {
  1454. if (result.HasUnitPrice &&
  1455. result.unitPrice_ != global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance) {
  1456. result.unitPrice_ =
  1457. global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(result.unitPrice_).MergeFrom(value).BuildPartial();
  1458. } else {
  1459. result.unitPrice_ = value;
  1460. }
  1461. result.hasUnitPrice = true;
  1462. return this;
  1463. }
  1464. public Builder ClearUnitPrice() {
  1465. result.hasUnitPrice = false;
  1466. result.unitPrice_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance;
  1467. return this;
  1468. }
  1469. // optional sint32 Quantity = 4;
  1470. public bool HasQuantity {
  1471. get { return result.HasQuantity; }
  1472. }
  1473. public int Quantity {
  1474. get { return result.Quantity; }
  1475. set { SetQuantity(value); }
  1476. }
  1477. public Builder SetQuantity(int value) {
  1478. result.hasQuantity = true;
  1479. result.quantity_ = value;
  1480. return this;
  1481. }
  1482. public Builder ClearQuantity() {
  1483. result.hasQuantity = false;
  1484. result.quantity_ = 0;
  1485. return this;
  1486. }
  1487. // optional float Discount = 5;
  1488. public bool HasDiscount {
  1489. get { return result.HasDiscount; }
  1490. }
  1491. public float Discount {
  1492. get { return result.Discount; }
  1493. set { SetDiscount(value); }
  1494. }
  1495. public Builder SetDiscount(float value) {
  1496. result.hasDiscount = true;
  1497. result.discount_ = value;
  1498. return this;
  1499. }
  1500. public Builder ClearDiscount() {
  1501. result.hasDiscount = false;
  1502. result.discount_ = 0F;
  1503. return this;
  1504. }
  1505. }
  1506. }
  1507. #endregion
  1508. #region Services
  1509. #endregion
  1510. }