Nwind.java 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. package northwind;
  3. public final class Nwind {
  4. private Nwind() {}
  5. public static com.google.protobuf.Descriptors.FileDescriptor
  6. getDescriptor() {
  7. return descriptor;
  8. }
  9. private static final com.google.protobuf.Descriptors.FileDescriptor
  10. descriptor = buildDescriptor();
  11. private static
  12. com.google.protobuf.Descriptors.FileDescriptor
  13. buildDescriptor() {
  14. java.lang.String descriptorData =
  15. "\n\013nwind.proto\022\tnorthwind\032\tbcl.proto\",\n\010D" +
  16. "atabase\022 \n\006Orders\030\001 \003(\0132\020.northwind.Orde" +
  17. "r\"\372\002\n\005Order\022\017\n\007OrderID\030\001 \001(\005\022\022\n\nCustomer" +
  18. "ID\030\002 \001(\t\022\022\n\nEmployeeID\030\003 \001(\005\022 \n\tOrderDat" +
  19. "e\030\004 \001(\0132\r.bcl.DateTime\022#\n\014RequiredDate\030\005" +
  20. " \001(\0132\r.bcl.DateTime\022\"\n\013ShippedDate\030\006 \001(\013" +
  21. "2\r.bcl.DateTime\022\017\n\007ShipVia\030\007 \001(\005\022\035\n\007Frei" +
  22. "ght\030\010 \001(\0132\014.bcl.Decimal\022\020\n\010ShipName\030\t \001(" +
  23. "\t\022\023\n\013ShipAddress\030\n \001(\t\022\020\n\010ShipCity\030\013 \001(\t" +
  24. "\022\022\n\nShipRegion\030\014 \001(\t\022\026\n\016ShipPostalCode\030\r" +
  25. " \001(\t\022\023\n\013ShipCountry\030\016 \001(\t\022#\n\005Lines\030\017 \003(\013" +
  26. "2\024.northwind.OrderLine\"t\n\tOrderLine\022\017\n\007O" +
  27. "rderID\030\001 \001(\005\022\021\n\tProductID\030\002 \001(\005\022\037\n\tUnitP" +
  28. "rice\030\003 \001(\0132\014.bcl.Decimal\022\020\n\010Quantity\030\004 \001" +
  29. "(\021\022\020\n\010Discount\030\005 \001(\002B#H\001\302>\tNorthwind\312>\022N" +
  30. "orthwindProtoFile";
  31. try {
  32. return com.google.protobuf.Descriptors.FileDescriptor
  33. .internalBuildGeneratedFileFrom(descriptorData,
  34. new com.google.protobuf.Descriptors.FileDescriptor[] {
  35. bcl.Bcl.getDescriptor(),
  36. });
  37. } catch (Exception e) {
  38. throw new RuntimeException(
  39. "Failed to parse protocol buffer descriptor for " +
  40. "\"nwind.proto\".", e);
  41. }
  42. }
  43. public static final class Database extends
  44. com.google.protobuf.GeneratedMessage {
  45. // Use Database.newBuilder() to construct.
  46. private Database() {}
  47. private static final Database defaultInstance = new Database();
  48. public static Database getDefaultInstance() {
  49. return defaultInstance;
  50. }
  51. public Database getDefaultInstanceForType() {
  52. return defaultInstance;
  53. }
  54. public static final com.google.protobuf.Descriptors.Descriptor
  55. getDescriptor() {
  56. return northwind.Nwind.internal_static_northwind_Database_descriptor;
  57. }
  58. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  59. internalGetFieldAccessorTable() {
  60. return northwind.Nwind.internal_static_northwind_Database_fieldAccessorTable;
  61. }
  62. // repeated .northwind.Order Orders = 1;
  63. private java.util.List<northwind.Nwind.Order> orders_ =
  64. java.util.Collections.emptyList();
  65. public java.util.List<northwind.Nwind.Order> getOrdersList() {
  66. return orders_;
  67. }
  68. public int getOrdersCount() { return orders_.size(); }
  69. public northwind.Nwind.Order getOrders(int index) {
  70. return orders_.get(index);
  71. }
  72. public final boolean isInitialized() {
  73. return true;
  74. }
  75. public void writeTo(com.google.protobuf.CodedOutputStream output)
  76. throws java.io.IOException {
  77. for (northwind.Nwind.Order element : getOrdersList()) {
  78. output.writeMessage(1, element);
  79. }
  80. getUnknownFields().writeTo(output);
  81. }
  82. private int memoizedSerializedSize = -1;
  83. public int getSerializedSize() {
  84. int size = memoizedSerializedSize;
  85. if (size != -1) return size;
  86. size = 0;
  87. for (northwind.Nwind.Order element : getOrdersList()) {
  88. size += com.google.protobuf.CodedOutputStream
  89. .computeMessageSize(1, element);
  90. }
  91. size += getUnknownFields().getSerializedSize();
  92. memoizedSerializedSize = size;
  93. return size;
  94. }
  95. public static northwind.Nwind.Database parseFrom(
  96. com.google.protobuf.ByteString data)
  97. throws com.google.protobuf.InvalidProtocolBufferException {
  98. return newBuilder().mergeFrom(data).buildParsed();
  99. }
  100. public static northwind.Nwind.Database parseFrom(
  101. com.google.protobuf.ByteString data,
  102. com.google.protobuf.ExtensionRegistry extensionRegistry)
  103. throws com.google.protobuf.InvalidProtocolBufferException {
  104. return newBuilder().mergeFrom(data, extensionRegistry)
  105. .buildParsed();
  106. }
  107. public static northwind.Nwind.Database parseFrom(byte[] data)
  108. throws com.google.protobuf.InvalidProtocolBufferException {
  109. return newBuilder().mergeFrom(data).buildParsed();
  110. }
  111. public static northwind.Nwind.Database parseFrom(
  112. byte[] data,
  113. com.google.protobuf.ExtensionRegistry extensionRegistry)
  114. throws com.google.protobuf.InvalidProtocolBufferException {
  115. return newBuilder().mergeFrom(data, extensionRegistry)
  116. .buildParsed();
  117. }
  118. public static northwind.Nwind.Database parseFrom(java.io.InputStream input)
  119. throws java.io.IOException {
  120. return newBuilder().mergeFrom(input).buildParsed();
  121. }
  122. public static northwind.Nwind.Database parseFrom(
  123. java.io.InputStream input,
  124. com.google.protobuf.ExtensionRegistry extensionRegistry)
  125. throws java.io.IOException {
  126. return newBuilder().mergeFrom(input, extensionRegistry)
  127. .buildParsed();
  128. }
  129. public static northwind.Nwind.Database parseFrom(
  130. com.google.protobuf.CodedInputStream input)
  131. throws java.io.IOException {
  132. return newBuilder().mergeFrom(input).buildParsed();
  133. }
  134. public static northwind.Nwind.Database parseFrom(
  135. com.google.protobuf.CodedInputStream input,
  136. com.google.protobuf.ExtensionRegistry extensionRegistry)
  137. throws java.io.IOException {
  138. return newBuilder().mergeFrom(input, extensionRegistry)
  139. .buildParsed();
  140. }
  141. public static Builder newBuilder() { return new Builder(); }
  142. public Builder newBuilderForType() { return new Builder(); }
  143. public static Builder newBuilder(northwind.Nwind.Database prototype) {
  144. return new Builder().mergeFrom(prototype);
  145. }
  146. public static final class Builder extends
  147. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  148. // Construct using northwind.Nwind.Database.newBuilder()
  149. private Builder() {}
  150. northwind.Nwind.Database result = new northwind.Nwind.Database();
  151. protected northwind.Nwind.Database internalGetResult() {
  152. return result;
  153. }
  154. public Builder clear() {
  155. result = new northwind.Nwind.Database();
  156. return this;
  157. }
  158. public Builder clone() {
  159. return new Builder().mergeFrom(result);
  160. }
  161. public com.google.protobuf.Descriptors.Descriptor
  162. getDescriptorForType() {
  163. return northwind.Nwind.Database.getDescriptor();
  164. }
  165. public northwind.Nwind.Database getDefaultInstanceForType() {
  166. return northwind.Nwind.Database.getDefaultInstance();
  167. }
  168. public northwind.Nwind.Database build() {
  169. if (!isInitialized()) {
  170. throw new com.google.protobuf.UninitializedMessageException(
  171. result);
  172. }
  173. return buildPartial();
  174. }
  175. private northwind.Nwind.Database buildParsed()
  176. throws com.google.protobuf.InvalidProtocolBufferException {
  177. if (!isInitialized()) {
  178. throw new com.google.protobuf.UninitializedMessageException(
  179. result).asInvalidProtocolBufferException();
  180. }
  181. return buildPartial();
  182. }
  183. public northwind.Nwind.Database buildPartial() {
  184. if (result.orders_ != java.util.Collections.EMPTY_LIST) {
  185. result.orders_ =
  186. java.util.Collections.unmodifiableList(result.orders_);
  187. }
  188. northwind.Nwind.Database returnMe = result;
  189. result = null;
  190. return returnMe;
  191. }
  192. public Builder mergeFrom(com.google.protobuf.Message other) {
  193. if (other instanceof northwind.Nwind.Database) {
  194. return mergeFrom((northwind.Nwind.Database)other);
  195. } else {
  196. super.mergeFrom(other);
  197. return this;
  198. }
  199. }
  200. public Builder mergeFrom(northwind.Nwind.Database other) {
  201. if (other == northwind.Nwind.Database.getDefaultInstance()) return this;
  202. if (!other.orders_.isEmpty()) {
  203. if (result.orders_.isEmpty()) {
  204. result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
  205. }
  206. result.orders_.addAll(other.orders_);
  207. }
  208. this.mergeUnknownFields(other.getUnknownFields());
  209. return this;
  210. }
  211. public Builder mergeFrom(
  212. com.google.protobuf.CodedInputStream input)
  213. throws java.io.IOException {
  214. return mergeFrom(input,
  215. com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
  216. }
  217. public Builder mergeFrom(
  218. com.google.protobuf.CodedInputStream input,
  219. com.google.protobuf.ExtensionRegistry extensionRegistry)
  220. throws java.io.IOException {
  221. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  222. com.google.protobuf.UnknownFieldSet.newBuilder(
  223. this.getUnknownFields());
  224. while (true) {
  225. int tag = input.readTag();
  226. switch (tag) {
  227. case 0:
  228. this.setUnknownFields(unknownFields.build());
  229. return this;
  230. default: {
  231. if (!parseUnknownField(input, unknownFields,
  232. extensionRegistry, tag)) {
  233. this.setUnknownFields(unknownFields.build());
  234. return this;
  235. }
  236. break;
  237. }
  238. case 10: {
  239. northwind.Nwind.Order.Builder subBuilder = northwind.Nwind.Order.newBuilder();
  240. input.readMessage(subBuilder, extensionRegistry);
  241. addOrders(subBuilder.buildPartial());
  242. break;
  243. }
  244. }
  245. }
  246. }
  247. // repeated .northwind.Order Orders = 1;
  248. public java.util.List<northwind.Nwind.Order> getOrdersList() {
  249. return java.util.Collections.unmodifiableList(result.orders_);
  250. }
  251. public int getOrdersCount() {
  252. return result.getOrdersCount();
  253. }
  254. public northwind.Nwind.Order getOrders(int index) {
  255. return result.getOrders(index);
  256. }
  257. public Builder setOrders(int index, northwind.Nwind.Order value) {
  258. result.orders_.set(index, value);
  259. return this;
  260. }
  261. public Builder setOrders(int index, northwind.Nwind.Order.Builder builderForValue) {
  262. result.orders_.set(index, builderForValue.build());
  263. return this;
  264. }
  265. public Builder addOrders(northwind.Nwind.Order value) {
  266. if (result.orders_.isEmpty()) {
  267. result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
  268. }
  269. result.orders_.add(value);
  270. return this;
  271. }
  272. public Builder addOrders(northwind.Nwind.Order.Builder builderForValue) {
  273. if (result.orders_.isEmpty()) {
  274. result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
  275. }
  276. result.orders_.add(builderForValue.build());
  277. return this;
  278. }
  279. public Builder addAllOrders(
  280. java.lang.Iterable<? extends northwind.Nwind.Order> values) {
  281. if (result.orders_.isEmpty()) {
  282. result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
  283. }
  284. super.addAll(values, result.orders_);
  285. return this;
  286. }
  287. public Builder clearOrders() {
  288. result.orders_ = java.util.Collections.emptyList();
  289. return this;
  290. }
  291. }
  292. }
  293. public static final class Order extends
  294. com.google.protobuf.GeneratedMessage {
  295. // Use Order.newBuilder() to construct.
  296. private Order() {}
  297. private static final Order defaultInstance = new Order();
  298. public static Order getDefaultInstance() {
  299. return defaultInstance;
  300. }
  301. public Order getDefaultInstanceForType() {
  302. return defaultInstance;
  303. }
  304. public static final com.google.protobuf.Descriptors.Descriptor
  305. getDescriptor() {
  306. return northwind.Nwind.internal_static_northwind_Order_descriptor;
  307. }
  308. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  309. internalGetFieldAccessorTable() {
  310. return northwind.Nwind.internal_static_northwind_Order_fieldAccessorTable;
  311. }
  312. // optional int32 OrderID = 1;
  313. private boolean hasOrderID;
  314. private int orderID_ = 0;
  315. public boolean hasOrderID() { return hasOrderID; }
  316. public int getOrderID() { return orderID_; }
  317. // optional string CustomerID = 2;
  318. private boolean hasCustomerID;
  319. private java.lang.String customerID_ = "";
  320. public boolean hasCustomerID() { return hasCustomerID; }
  321. public java.lang.String getCustomerID() { return customerID_; }
  322. // optional int32 EmployeeID = 3;
  323. private boolean hasEmployeeID;
  324. private int employeeID_ = 0;
  325. public boolean hasEmployeeID() { return hasEmployeeID; }
  326. public int getEmployeeID() { return employeeID_; }
  327. // optional .bcl.DateTime OrderDate = 4;
  328. private boolean hasOrderDate;
  329. private bcl.Bcl.DateTime orderDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  330. public boolean hasOrderDate() { return hasOrderDate; }
  331. public bcl.Bcl.DateTime getOrderDate() { return orderDate_; }
  332. // optional .bcl.DateTime RequiredDate = 5;
  333. private boolean hasRequiredDate;
  334. private bcl.Bcl.DateTime requiredDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  335. public boolean hasRequiredDate() { return hasRequiredDate; }
  336. public bcl.Bcl.DateTime getRequiredDate() { return requiredDate_; }
  337. // optional .bcl.DateTime ShippedDate = 6;
  338. private boolean hasShippedDate;
  339. private bcl.Bcl.DateTime shippedDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  340. public boolean hasShippedDate() { return hasShippedDate; }
  341. public bcl.Bcl.DateTime getShippedDate() { return shippedDate_; }
  342. // optional int32 ShipVia = 7;
  343. private boolean hasShipVia;
  344. private int shipVia_ = 0;
  345. public boolean hasShipVia() { return hasShipVia; }
  346. public int getShipVia() { return shipVia_; }
  347. // optional .bcl.Decimal Freight = 8;
  348. private boolean hasFreight;
  349. private bcl.Bcl.Decimal freight_ = bcl.Bcl.Decimal.getDefaultInstance();
  350. public boolean hasFreight() { return hasFreight; }
  351. public bcl.Bcl.Decimal getFreight() { return freight_; }
  352. // optional string ShipName = 9;
  353. private boolean hasShipName;
  354. private java.lang.String shipName_ = "";
  355. public boolean hasShipName() { return hasShipName; }
  356. public java.lang.String getShipName() { return shipName_; }
  357. // optional string ShipAddress = 10;
  358. private boolean hasShipAddress;
  359. private java.lang.String shipAddress_ = "";
  360. public boolean hasShipAddress() { return hasShipAddress; }
  361. public java.lang.String getShipAddress() { return shipAddress_; }
  362. // optional string ShipCity = 11;
  363. private boolean hasShipCity;
  364. private java.lang.String shipCity_ = "";
  365. public boolean hasShipCity() { return hasShipCity; }
  366. public java.lang.String getShipCity() { return shipCity_; }
  367. // optional string ShipRegion = 12;
  368. private boolean hasShipRegion;
  369. private java.lang.String shipRegion_ = "";
  370. public boolean hasShipRegion() { return hasShipRegion; }
  371. public java.lang.String getShipRegion() { return shipRegion_; }
  372. // optional string ShipPostalCode = 13;
  373. private boolean hasShipPostalCode;
  374. private java.lang.String shipPostalCode_ = "";
  375. public boolean hasShipPostalCode() { return hasShipPostalCode; }
  376. public java.lang.String getShipPostalCode() { return shipPostalCode_; }
  377. // optional string ShipCountry = 14;
  378. private boolean hasShipCountry;
  379. private java.lang.String shipCountry_ = "";
  380. public boolean hasShipCountry() { return hasShipCountry; }
  381. public java.lang.String getShipCountry() { return shipCountry_; }
  382. // repeated .northwind.OrderLine Lines = 15;
  383. private java.util.List<northwind.Nwind.OrderLine> lines_ =
  384. java.util.Collections.emptyList();
  385. public java.util.List<northwind.Nwind.OrderLine> getLinesList() {
  386. return lines_;
  387. }
  388. public int getLinesCount() { return lines_.size(); }
  389. public northwind.Nwind.OrderLine getLines(int index) {
  390. return lines_.get(index);
  391. }
  392. public final boolean isInitialized() {
  393. return true;
  394. }
  395. public void writeTo(com.google.protobuf.CodedOutputStream output)
  396. throws java.io.IOException {
  397. if (hasOrderID()) {
  398. output.writeInt32(1, getOrderID());
  399. }
  400. if (hasCustomerID()) {
  401. output.writeString(2, getCustomerID());
  402. }
  403. if (hasEmployeeID()) {
  404. output.writeInt32(3, getEmployeeID());
  405. }
  406. if (hasOrderDate()) {
  407. output.writeMessage(4, getOrderDate());
  408. }
  409. if (hasRequiredDate()) {
  410. output.writeMessage(5, getRequiredDate());
  411. }
  412. if (hasShippedDate()) {
  413. output.writeMessage(6, getShippedDate());
  414. }
  415. if (hasShipVia()) {
  416. output.writeInt32(7, getShipVia());
  417. }
  418. if (hasFreight()) {
  419. output.writeMessage(8, getFreight());
  420. }
  421. if (hasShipName()) {
  422. output.writeString(9, getShipName());
  423. }
  424. if (hasShipAddress()) {
  425. output.writeString(10, getShipAddress());
  426. }
  427. if (hasShipCity()) {
  428. output.writeString(11, getShipCity());
  429. }
  430. if (hasShipRegion()) {
  431. output.writeString(12, getShipRegion());
  432. }
  433. if (hasShipPostalCode()) {
  434. output.writeString(13, getShipPostalCode());
  435. }
  436. if (hasShipCountry()) {
  437. output.writeString(14, getShipCountry());
  438. }
  439. for (northwind.Nwind.OrderLine element : getLinesList()) {
  440. output.writeMessage(15, element);
  441. }
  442. getUnknownFields().writeTo(output);
  443. }
  444. private int memoizedSerializedSize = -1;
  445. public int getSerializedSize() {
  446. int size = memoizedSerializedSize;
  447. if (size != -1) return size;
  448. size = 0;
  449. if (hasOrderID()) {
  450. size += com.google.protobuf.CodedOutputStream
  451. .computeInt32Size(1, getOrderID());
  452. }
  453. if (hasCustomerID()) {
  454. size += com.google.protobuf.CodedOutputStream
  455. .computeStringSize(2, getCustomerID());
  456. }
  457. if (hasEmployeeID()) {
  458. size += com.google.protobuf.CodedOutputStream
  459. .computeInt32Size(3, getEmployeeID());
  460. }
  461. if (hasOrderDate()) {
  462. size += com.google.protobuf.CodedOutputStream
  463. .computeMessageSize(4, getOrderDate());
  464. }
  465. if (hasRequiredDate()) {
  466. size += com.google.protobuf.CodedOutputStream
  467. .computeMessageSize(5, getRequiredDate());
  468. }
  469. if (hasShippedDate()) {
  470. size += com.google.protobuf.CodedOutputStream
  471. .computeMessageSize(6, getShippedDate());
  472. }
  473. if (hasShipVia()) {
  474. size += com.google.protobuf.CodedOutputStream
  475. .computeInt32Size(7, getShipVia());
  476. }
  477. if (hasFreight()) {
  478. size += com.google.protobuf.CodedOutputStream
  479. .computeMessageSize(8, getFreight());
  480. }
  481. if (hasShipName()) {
  482. size += com.google.protobuf.CodedOutputStream
  483. .computeStringSize(9, getShipName());
  484. }
  485. if (hasShipAddress()) {
  486. size += com.google.protobuf.CodedOutputStream
  487. .computeStringSize(10, getShipAddress());
  488. }
  489. if (hasShipCity()) {
  490. size += com.google.protobuf.CodedOutputStream
  491. .computeStringSize(11, getShipCity());
  492. }
  493. if (hasShipRegion()) {
  494. size += com.google.protobuf.CodedOutputStream
  495. .computeStringSize(12, getShipRegion());
  496. }
  497. if (hasShipPostalCode()) {
  498. size += com.google.protobuf.CodedOutputStream
  499. .computeStringSize(13, getShipPostalCode());
  500. }
  501. if (hasShipCountry()) {
  502. size += com.google.protobuf.CodedOutputStream
  503. .computeStringSize(14, getShipCountry());
  504. }
  505. for (northwind.Nwind.OrderLine element : getLinesList()) {
  506. size += com.google.protobuf.CodedOutputStream
  507. .computeMessageSize(15, element);
  508. }
  509. size += getUnknownFields().getSerializedSize();
  510. memoizedSerializedSize = size;
  511. return size;
  512. }
  513. public static northwind.Nwind.Order parseFrom(
  514. com.google.protobuf.ByteString data)
  515. throws com.google.protobuf.InvalidProtocolBufferException {
  516. return newBuilder().mergeFrom(data).buildParsed();
  517. }
  518. public static northwind.Nwind.Order parseFrom(
  519. com.google.protobuf.ByteString data,
  520. com.google.protobuf.ExtensionRegistry extensionRegistry)
  521. throws com.google.protobuf.InvalidProtocolBufferException {
  522. return newBuilder().mergeFrom(data, extensionRegistry)
  523. .buildParsed();
  524. }
  525. public static northwind.Nwind.Order parseFrom(byte[] data)
  526. throws com.google.protobuf.InvalidProtocolBufferException {
  527. return newBuilder().mergeFrom(data).buildParsed();
  528. }
  529. public static northwind.Nwind.Order parseFrom(
  530. byte[] data,
  531. com.google.protobuf.ExtensionRegistry extensionRegistry)
  532. throws com.google.protobuf.InvalidProtocolBufferException {
  533. return newBuilder().mergeFrom(data, extensionRegistry)
  534. .buildParsed();
  535. }
  536. public static northwind.Nwind.Order parseFrom(java.io.InputStream input)
  537. throws java.io.IOException {
  538. return newBuilder().mergeFrom(input).buildParsed();
  539. }
  540. public static northwind.Nwind.Order parseFrom(
  541. java.io.InputStream input,
  542. com.google.protobuf.ExtensionRegistry extensionRegistry)
  543. throws java.io.IOException {
  544. return newBuilder().mergeFrom(input, extensionRegistry)
  545. .buildParsed();
  546. }
  547. public static northwind.Nwind.Order parseFrom(
  548. com.google.protobuf.CodedInputStream input)
  549. throws java.io.IOException {
  550. return newBuilder().mergeFrom(input).buildParsed();
  551. }
  552. public static northwind.Nwind.Order parseFrom(
  553. com.google.protobuf.CodedInputStream input,
  554. com.google.protobuf.ExtensionRegistry extensionRegistry)
  555. throws java.io.IOException {
  556. return newBuilder().mergeFrom(input, extensionRegistry)
  557. .buildParsed();
  558. }
  559. public static Builder newBuilder() { return new Builder(); }
  560. public Builder newBuilderForType() { return new Builder(); }
  561. public static Builder newBuilder(northwind.Nwind.Order prototype) {
  562. return new Builder().mergeFrom(prototype);
  563. }
  564. public static final class Builder extends
  565. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  566. // Construct using northwind.Nwind.Order.newBuilder()
  567. private Builder() {}
  568. northwind.Nwind.Order result = new northwind.Nwind.Order();
  569. protected northwind.Nwind.Order internalGetResult() {
  570. return result;
  571. }
  572. public Builder clear() {
  573. result = new northwind.Nwind.Order();
  574. return this;
  575. }
  576. public Builder clone() {
  577. return new Builder().mergeFrom(result);
  578. }
  579. public com.google.protobuf.Descriptors.Descriptor
  580. getDescriptorForType() {
  581. return northwind.Nwind.Order.getDescriptor();
  582. }
  583. public northwind.Nwind.Order getDefaultInstanceForType() {
  584. return northwind.Nwind.Order.getDefaultInstance();
  585. }
  586. public northwind.Nwind.Order build() {
  587. if (!isInitialized()) {
  588. throw new com.google.protobuf.UninitializedMessageException(
  589. result);
  590. }
  591. return buildPartial();
  592. }
  593. private northwind.Nwind.Order buildParsed()
  594. throws com.google.protobuf.InvalidProtocolBufferException {
  595. if (!isInitialized()) {
  596. throw new com.google.protobuf.UninitializedMessageException(
  597. result).asInvalidProtocolBufferException();
  598. }
  599. return buildPartial();
  600. }
  601. public northwind.Nwind.Order buildPartial() {
  602. if (result.lines_ != java.util.Collections.EMPTY_LIST) {
  603. result.lines_ =
  604. java.util.Collections.unmodifiableList(result.lines_);
  605. }
  606. northwind.Nwind.Order returnMe = result;
  607. result = null;
  608. return returnMe;
  609. }
  610. public Builder mergeFrom(com.google.protobuf.Message other) {
  611. if (other instanceof northwind.Nwind.Order) {
  612. return mergeFrom((northwind.Nwind.Order)other);
  613. } else {
  614. super.mergeFrom(other);
  615. return this;
  616. }
  617. }
  618. public Builder mergeFrom(northwind.Nwind.Order other) {
  619. if (other == northwind.Nwind.Order.getDefaultInstance()) return this;
  620. if (other.hasOrderID()) {
  621. setOrderID(other.getOrderID());
  622. }
  623. if (other.hasCustomerID()) {
  624. setCustomerID(other.getCustomerID());
  625. }
  626. if (other.hasEmployeeID()) {
  627. setEmployeeID(other.getEmployeeID());
  628. }
  629. if (other.hasOrderDate()) {
  630. mergeOrderDate(other.getOrderDate());
  631. }
  632. if (other.hasRequiredDate()) {
  633. mergeRequiredDate(other.getRequiredDate());
  634. }
  635. if (other.hasShippedDate()) {
  636. mergeShippedDate(other.getShippedDate());
  637. }
  638. if (other.hasShipVia()) {
  639. setShipVia(other.getShipVia());
  640. }
  641. if (other.hasFreight()) {
  642. mergeFreight(other.getFreight());
  643. }
  644. if (other.hasShipName()) {
  645. setShipName(other.getShipName());
  646. }
  647. if (other.hasShipAddress()) {
  648. setShipAddress(other.getShipAddress());
  649. }
  650. if (other.hasShipCity()) {
  651. setShipCity(other.getShipCity());
  652. }
  653. if (other.hasShipRegion()) {
  654. setShipRegion(other.getShipRegion());
  655. }
  656. if (other.hasShipPostalCode()) {
  657. setShipPostalCode(other.getShipPostalCode());
  658. }
  659. if (other.hasShipCountry()) {
  660. setShipCountry(other.getShipCountry());
  661. }
  662. if (!other.lines_.isEmpty()) {
  663. if (result.lines_.isEmpty()) {
  664. result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
  665. }
  666. result.lines_.addAll(other.lines_);
  667. }
  668. this.mergeUnknownFields(other.getUnknownFields());
  669. return this;
  670. }
  671. public Builder mergeFrom(
  672. com.google.protobuf.CodedInputStream input)
  673. throws java.io.IOException {
  674. return mergeFrom(input,
  675. com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
  676. }
  677. public Builder mergeFrom(
  678. com.google.protobuf.CodedInputStream input,
  679. com.google.protobuf.ExtensionRegistry extensionRegistry)
  680. throws java.io.IOException {
  681. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  682. com.google.protobuf.UnknownFieldSet.newBuilder(
  683. this.getUnknownFields());
  684. while (true) {
  685. int tag = input.readTag();
  686. switch (tag) {
  687. case 0:
  688. this.setUnknownFields(unknownFields.build());
  689. return this;
  690. default: {
  691. if (!parseUnknownField(input, unknownFields,
  692. extensionRegistry, tag)) {
  693. this.setUnknownFields(unknownFields.build());
  694. return this;
  695. }
  696. break;
  697. }
  698. case 8: {
  699. setOrderID(input.readInt32());
  700. break;
  701. }
  702. case 18: {
  703. setCustomerID(input.readString());
  704. break;
  705. }
  706. case 24: {
  707. setEmployeeID(input.readInt32());
  708. break;
  709. }
  710. case 34: {
  711. bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
  712. if (hasOrderDate()) {
  713. subBuilder.mergeFrom(getOrderDate());
  714. }
  715. input.readMessage(subBuilder, extensionRegistry);
  716. setOrderDate(subBuilder.buildPartial());
  717. break;
  718. }
  719. case 42: {
  720. bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
  721. if (hasRequiredDate()) {
  722. subBuilder.mergeFrom(getRequiredDate());
  723. }
  724. input.readMessage(subBuilder, extensionRegistry);
  725. setRequiredDate(subBuilder.buildPartial());
  726. break;
  727. }
  728. case 50: {
  729. bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
  730. if (hasShippedDate()) {
  731. subBuilder.mergeFrom(getShippedDate());
  732. }
  733. input.readMessage(subBuilder, extensionRegistry);
  734. setShippedDate(subBuilder.buildPartial());
  735. break;
  736. }
  737. case 56: {
  738. setShipVia(input.readInt32());
  739. break;
  740. }
  741. case 66: {
  742. bcl.Bcl.Decimal.Builder subBuilder = bcl.Bcl.Decimal.newBuilder();
  743. if (hasFreight()) {
  744. subBuilder.mergeFrom(getFreight());
  745. }
  746. input.readMessage(subBuilder, extensionRegistry);
  747. setFreight(subBuilder.buildPartial());
  748. break;
  749. }
  750. case 74: {
  751. setShipName(input.readString());
  752. break;
  753. }
  754. case 82: {
  755. setShipAddress(input.readString());
  756. break;
  757. }
  758. case 90: {
  759. setShipCity(input.readString());
  760. break;
  761. }
  762. case 98: {
  763. setShipRegion(input.readString());
  764. break;
  765. }
  766. case 106: {
  767. setShipPostalCode(input.readString());
  768. break;
  769. }
  770. case 114: {
  771. setShipCountry(input.readString());
  772. break;
  773. }
  774. case 122: {
  775. northwind.Nwind.OrderLine.Builder subBuilder = northwind.Nwind.OrderLine.newBuilder();
  776. input.readMessage(subBuilder, extensionRegistry);
  777. addLines(subBuilder.buildPartial());
  778. break;
  779. }
  780. }
  781. }
  782. }
  783. // optional int32 OrderID = 1;
  784. public boolean hasOrderID() {
  785. return result.hasOrderID();
  786. }
  787. public int getOrderID() {
  788. return result.getOrderID();
  789. }
  790. public Builder setOrderID(int value) {
  791. result.hasOrderID = true;
  792. result.orderID_ = value;
  793. return this;
  794. }
  795. public Builder clearOrderID() {
  796. result.hasOrderID = false;
  797. result.orderID_ = 0;
  798. return this;
  799. }
  800. // optional string CustomerID = 2;
  801. public boolean hasCustomerID() {
  802. return result.hasCustomerID();
  803. }
  804. public java.lang.String getCustomerID() {
  805. return result.getCustomerID();
  806. }
  807. public Builder setCustomerID(java.lang.String value) {
  808. result.hasCustomerID = true;
  809. result.customerID_ = value;
  810. return this;
  811. }
  812. public Builder clearCustomerID() {
  813. result.hasCustomerID = false;
  814. result.customerID_ = "";
  815. return this;
  816. }
  817. // optional int32 EmployeeID = 3;
  818. public boolean hasEmployeeID() {
  819. return result.hasEmployeeID();
  820. }
  821. public int getEmployeeID() {
  822. return result.getEmployeeID();
  823. }
  824. public Builder setEmployeeID(int value) {
  825. result.hasEmployeeID = true;
  826. result.employeeID_ = value;
  827. return this;
  828. }
  829. public Builder clearEmployeeID() {
  830. result.hasEmployeeID = false;
  831. result.employeeID_ = 0;
  832. return this;
  833. }
  834. // optional .bcl.DateTime OrderDate = 4;
  835. public boolean hasOrderDate() {
  836. return result.hasOrderDate();
  837. }
  838. public bcl.Bcl.DateTime getOrderDate() {
  839. return result.getOrderDate();
  840. }
  841. public Builder setOrderDate(bcl.Bcl.DateTime value) {
  842. result.hasOrderDate = true;
  843. result.orderDate_ = value;
  844. return this;
  845. }
  846. public Builder setOrderDate(bcl.Bcl.DateTime.Builder builderForValue) {
  847. result.hasOrderDate = true;
  848. result.orderDate_ = builderForValue.build();
  849. return this;
  850. }
  851. public Builder mergeOrderDate(bcl.Bcl.DateTime value) {
  852. if (result.hasOrderDate() &&
  853. result.orderDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
  854. result.orderDate_ =
  855. bcl.Bcl.DateTime.newBuilder(result.orderDate_).mergeFrom(value).buildPartial();
  856. } else {
  857. result.orderDate_ = value;
  858. }
  859. result.hasOrderDate = true;
  860. return this;
  861. }
  862. public Builder clearOrderDate() {
  863. result.hasOrderDate = false;
  864. result.orderDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  865. return this;
  866. }
  867. // optional .bcl.DateTime RequiredDate = 5;
  868. public boolean hasRequiredDate() {
  869. return result.hasRequiredDate();
  870. }
  871. public bcl.Bcl.DateTime getRequiredDate() {
  872. return result.getRequiredDate();
  873. }
  874. public Builder setRequiredDate(bcl.Bcl.DateTime value) {
  875. result.hasRequiredDate = true;
  876. result.requiredDate_ = value;
  877. return this;
  878. }
  879. public Builder setRequiredDate(bcl.Bcl.DateTime.Builder builderForValue) {
  880. result.hasRequiredDate = true;
  881. result.requiredDate_ = builderForValue.build();
  882. return this;
  883. }
  884. public Builder mergeRequiredDate(bcl.Bcl.DateTime value) {
  885. if (result.hasRequiredDate() &&
  886. result.requiredDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
  887. result.requiredDate_ =
  888. bcl.Bcl.DateTime.newBuilder(result.requiredDate_).mergeFrom(value).buildPartial();
  889. } else {
  890. result.requiredDate_ = value;
  891. }
  892. result.hasRequiredDate = true;
  893. return this;
  894. }
  895. public Builder clearRequiredDate() {
  896. result.hasRequiredDate = false;
  897. result.requiredDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  898. return this;
  899. }
  900. // optional .bcl.DateTime ShippedDate = 6;
  901. public boolean hasShippedDate() {
  902. return result.hasShippedDate();
  903. }
  904. public bcl.Bcl.DateTime getShippedDate() {
  905. return result.getShippedDate();
  906. }
  907. public Builder setShippedDate(bcl.Bcl.DateTime value) {
  908. result.hasShippedDate = true;
  909. result.shippedDate_ = value;
  910. return this;
  911. }
  912. public Builder setShippedDate(bcl.Bcl.DateTime.Builder builderForValue) {
  913. result.hasShippedDate = true;
  914. result.shippedDate_ = builderForValue.build();
  915. return this;
  916. }
  917. public Builder mergeShippedDate(bcl.Bcl.DateTime value) {
  918. if (result.hasShippedDate() &&
  919. result.shippedDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
  920. result.shippedDate_ =
  921. bcl.Bcl.DateTime.newBuilder(result.shippedDate_).mergeFrom(value).buildPartial();
  922. } else {
  923. result.shippedDate_ = value;
  924. }
  925. result.hasShippedDate = true;
  926. return this;
  927. }
  928. public Builder clearShippedDate() {
  929. result.hasShippedDate = false;
  930. result.shippedDate_ = bcl.Bcl.DateTime.getDefaultInstance();
  931. return this;
  932. }
  933. // optional int32 ShipVia = 7;
  934. public boolean hasShipVia() {
  935. return result.hasShipVia();
  936. }
  937. public int getShipVia() {
  938. return result.getShipVia();
  939. }
  940. public Builder setShipVia(int value) {
  941. result.hasShipVia = true;
  942. result.shipVia_ = value;
  943. return this;
  944. }
  945. public Builder clearShipVia() {
  946. result.hasShipVia = false;
  947. result.shipVia_ = 0;
  948. return this;
  949. }
  950. // optional .bcl.Decimal Freight = 8;
  951. public boolean hasFreight() {
  952. return result.hasFreight();
  953. }
  954. public bcl.Bcl.Decimal getFreight() {
  955. return result.getFreight();
  956. }
  957. public Builder setFreight(bcl.Bcl.Decimal value) {
  958. result.hasFreight = true;
  959. result.freight_ = value;
  960. return this;
  961. }
  962. public Builder setFreight(bcl.Bcl.Decimal.Builder builderForValue) {
  963. result.hasFreight = true;
  964. result.freight_ = builderForValue.build();
  965. return this;
  966. }
  967. public Builder mergeFreight(bcl.Bcl.Decimal value) {
  968. if (result.hasFreight() &&
  969. result.freight_ != bcl.Bcl.Decimal.getDefaultInstance()) {
  970. result.freight_ =
  971. bcl.Bcl.Decimal.newBuilder(result.freight_).mergeFrom(value).buildPartial();
  972. } else {
  973. result.freight_ = value;
  974. }
  975. result.hasFreight = true;
  976. return this;
  977. }
  978. public Builder clearFreight() {
  979. result.hasFreight = false;
  980. result.freight_ = bcl.Bcl.Decimal.getDefaultInstance();
  981. return this;
  982. }
  983. // optional string ShipName = 9;
  984. public boolean hasShipName() {
  985. return result.hasShipName();
  986. }
  987. public java.lang.String getShipName() {
  988. return result.getShipName();
  989. }
  990. public Builder setShipName(java.lang.String value) {
  991. result.hasShipName = true;
  992. result.shipName_ = value;
  993. return this;
  994. }
  995. public Builder clearShipName() {
  996. result.hasShipName = false;
  997. result.shipName_ = "";
  998. return this;
  999. }
  1000. // optional string ShipAddress = 10;
  1001. public boolean hasShipAddress() {
  1002. return result.hasShipAddress();
  1003. }
  1004. public java.lang.String getShipAddress() {
  1005. return result.getShipAddress();
  1006. }
  1007. public Builder setShipAddress(java.lang.String value) {
  1008. result.hasShipAddress = true;
  1009. result.shipAddress_ = value;
  1010. return this;
  1011. }
  1012. public Builder clearShipAddress() {
  1013. result.hasShipAddress = false;
  1014. result.shipAddress_ = "";
  1015. return this;
  1016. }
  1017. // optional string ShipCity = 11;
  1018. public boolean hasShipCity() {
  1019. return result.hasShipCity();
  1020. }
  1021. public java.lang.String getShipCity() {
  1022. return result.getShipCity();
  1023. }
  1024. public Builder setShipCity(java.lang.String value) {
  1025. result.hasShipCity = true;
  1026. result.shipCity_ = value;
  1027. return this;
  1028. }
  1029. public Builder clearShipCity() {
  1030. result.hasShipCity = false;
  1031. result.shipCity_ = "";
  1032. return this;
  1033. }
  1034. // optional string ShipRegion = 12;
  1035. public boolean hasShipRegion() {
  1036. return result.hasShipRegion();
  1037. }
  1038. public java.lang.String getShipRegion() {
  1039. return result.getShipRegion();
  1040. }
  1041. public Builder setShipRegion(java.lang.String value) {
  1042. result.hasShipRegion = true;
  1043. result.shipRegion_ = value;
  1044. return this;
  1045. }
  1046. public Builder clearShipRegion() {
  1047. result.hasShipRegion = false;
  1048. result.shipRegion_ = "";
  1049. return this;
  1050. }
  1051. // optional string ShipPostalCode = 13;
  1052. public boolean hasShipPostalCode() {
  1053. return result.hasShipPostalCode();
  1054. }
  1055. public java.lang.String getShipPostalCode() {
  1056. return result.getShipPostalCode();
  1057. }
  1058. public Builder setShipPostalCode(java.lang.String value) {
  1059. result.hasShipPostalCode = true;
  1060. result.shipPostalCode_ = value;
  1061. return this;
  1062. }
  1063. public Builder clearShipPostalCode() {
  1064. result.hasShipPostalCode = false;
  1065. result.shipPostalCode_ = "";
  1066. return this;
  1067. }
  1068. // optional string ShipCountry = 14;
  1069. public boolean hasShipCountry() {
  1070. return result.hasShipCountry();
  1071. }
  1072. public java.lang.String getShipCountry() {
  1073. return result.getShipCountry();
  1074. }
  1075. public Builder setShipCountry(java.lang.String value) {
  1076. result.hasShipCountry = true;
  1077. result.shipCountry_ = value;
  1078. return this;
  1079. }
  1080. public Builder clearShipCountry() {
  1081. result.hasShipCountry = false;
  1082. result.shipCountry_ = "";
  1083. return this;
  1084. }
  1085. // repeated .northwind.OrderLine Lines = 15;
  1086. public java.util.List<northwind.Nwind.OrderLine> getLinesList() {
  1087. return java.util.Collections.unmodifiableList(result.lines_);
  1088. }
  1089. public int getLinesCount() {
  1090. return result.getLinesCount();
  1091. }
  1092. public northwind.Nwind.OrderLine getLines(int index) {
  1093. return result.getLines(index);
  1094. }
  1095. public Builder setLines(int index, northwind.Nwind.OrderLine value) {
  1096. result.lines_.set(index, value);
  1097. return this;
  1098. }
  1099. public Builder setLines(int index, northwind.Nwind.OrderLine.Builder builderForValue) {
  1100. result.lines_.set(index, builderForValue.build());
  1101. return this;
  1102. }
  1103. public Builder addLines(northwind.Nwind.OrderLine value) {
  1104. if (result.lines_.isEmpty()) {
  1105. result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
  1106. }
  1107. result.lines_.add(value);
  1108. return this;
  1109. }
  1110. public Builder addLines(northwind.Nwind.OrderLine.Builder builderForValue) {
  1111. if (result.lines_.isEmpty()) {
  1112. result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
  1113. }
  1114. result.lines_.add(builderForValue.build());
  1115. return this;
  1116. }
  1117. public Builder addAllLines(
  1118. java.lang.Iterable<? extends northwind.Nwind.OrderLine> values) {
  1119. if (result.lines_.isEmpty()) {
  1120. result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
  1121. }
  1122. super.addAll(values, result.lines_);
  1123. return this;
  1124. }
  1125. public Builder clearLines() {
  1126. result.lines_ = java.util.Collections.emptyList();
  1127. return this;
  1128. }
  1129. }
  1130. }
  1131. public static final class OrderLine extends
  1132. com.google.protobuf.GeneratedMessage {
  1133. // Use OrderLine.newBuilder() to construct.
  1134. private OrderLine() {}
  1135. private static final OrderLine defaultInstance = new OrderLine();
  1136. public static OrderLine getDefaultInstance() {
  1137. return defaultInstance;
  1138. }
  1139. public OrderLine getDefaultInstanceForType() {
  1140. return defaultInstance;
  1141. }
  1142. public static final com.google.protobuf.Descriptors.Descriptor
  1143. getDescriptor() {
  1144. return northwind.Nwind.internal_static_northwind_OrderLine_descriptor;
  1145. }
  1146. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1147. internalGetFieldAccessorTable() {
  1148. return northwind.Nwind.internal_static_northwind_OrderLine_fieldAccessorTable;
  1149. }
  1150. // optional int32 OrderID = 1;
  1151. private boolean hasOrderID;
  1152. private int orderID_ = 0;
  1153. public boolean hasOrderID() { return hasOrderID; }
  1154. public int getOrderID() { return orderID_; }
  1155. // optional int32 ProductID = 2;
  1156. private boolean hasProductID;
  1157. private int productID_ = 0;
  1158. public boolean hasProductID() { return hasProductID; }
  1159. public int getProductID() { return productID_; }
  1160. // optional .bcl.Decimal UnitPrice = 3;
  1161. private boolean hasUnitPrice;
  1162. private bcl.Bcl.Decimal unitPrice_ = bcl.Bcl.Decimal.getDefaultInstance();
  1163. public boolean hasUnitPrice() { return hasUnitPrice; }
  1164. public bcl.Bcl.Decimal getUnitPrice() { return unitPrice_; }
  1165. // optional sint32 Quantity = 4;
  1166. private boolean hasQuantity;
  1167. private int quantity_ = 0;
  1168. public boolean hasQuantity() { return hasQuantity; }
  1169. public int getQuantity() { return quantity_; }
  1170. // optional float Discount = 5;
  1171. private boolean hasDiscount;
  1172. private float discount_ = 0F;
  1173. public boolean hasDiscount() { return hasDiscount; }
  1174. public float getDiscount() { return discount_; }
  1175. public final boolean isInitialized() {
  1176. return true;
  1177. }
  1178. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1179. throws java.io.IOException {
  1180. if (hasOrderID()) {
  1181. output.writeInt32(1, getOrderID());
  1182. }
  1183. if (hasProductID()) {
  1184. output.writeInt32(2, getProductID());
  1185. }
  1186. if (hasUnitPrice()) {
  1187. output.writeMessage(3, getUnitPrice());
  1188. }
  1189. if (hasQuantity()) {
  1190. output.writeSInt32(4, getQuantity());
  1191. }
  1192. if (hasDiscount()) {
  1193. output.writeFloat(5, getDiscount());
  1194. }
  1195. getUnknownFields().writeTo(output);
  1196. }
  1197. private int memoizedSerializedSize = -1;
  1198. public int getSerializedSize() {
  1199. int size = memoizedSerializedSize;
  1200. if (size != -1) return size;
  1201. size = 0;
  1202. if (hasOrderID()) {
  1203. size += com.google.protobuf.CodedOutputStream
  1204. .computeInt32Size(1, getOrderID());
  1205. }
  1206. if (hasProductID()) {
  1207. size += com.google.protobuf.CodedOutputStream
  1208. .computeInt32Size(2, getProductID());
  1209. }
  1210. if (hasUnitPrice()) {
  1211. size += com.google.protobuf.CodedOutputStream
  1212. .computeMessageSize(3, getUnitPrice());
  1213. }
  1214. if (hasQuantity()) {
  1215. size += com.google.protobuf.CodedOutputStream
  1216. .computeSInt32Size(4, getQuantity());
  1217. }
  1218. if (hasDiscount()) {
  1219. size += com.google.protobuf.CodedOutputStream
  1220. .computeFloatSize(5, getDiscount());
  1221. }
  1222. size += getUnknownFields().getSerializedSize();
  1223. memoizedSerializedSize = size;
  1224. return size;
  1225. }
  1226. public static northwind.Nwind.OrderLine parseFrom(
  1227. com.google.protobuf.ByteString data)
  1228. throws com.google.protobuf.InvalidProtocolBufferException {
  1229. return newBuilder().mergeFrom(data).buildParsed();
  1230. }
  1231. public static northwind.Nwind.OrderLine parseFrom(
  1232. com.google.protobuf.ByteString data,
  1233. com.google.protobuf.ExtensionRegistry extensionRegistry)
  1234. throws com.google.protobuf.InvalidProtocolBufferException {
  1235. return newBuilder().mergeFrom(data, extensionRegistry)
  1236. .buildParsed();
  1237. }
  1238. public static northwind.Nwind.OrderLine parseFrom(byte[] data)
  1239. throws com.google.protobuf.InvalidProtocolBufferException {
  1240. return newBuilder().mergeFrom(data).buildParsed();
  1241. }
  1242. public static northwind.Nwind.OrderLine parseFrom(
  1243. byte[] data,
  1244. com.google.protobuf.ExtensionRegistry extensionRegistry)
  1245. throws com.google.protobuf.InvalidProtocolBufferException {
  1246. return newBuilder().mergeFrom(data, extensionRegistry)
  1247. .buildParsed();
  1248. }
  1249. public static northwind.Nwind.OrderLine parseFrom(java.io.InputStream input)
  1250. throws java.io.IOException {
  1251. return newBuilder().mergeFrom(input).buildParsed();
  1252. }
  1253. public static northwind.Nwind.OrderLine parseFrom(
  1254. java.io.InputStream input,
  1255. com.google.protobuf.ExtensionRegistry extensionRegistry)
  1256. throws java.io.IOException {
  1257. return newBuilder().mergeFrom(input, extensionRegistry)
  1258. .buildParsed();
  1259. }
  1260. public static northwind.Nwind.OrderLine parseFrom(
  1261. com.google.protobuf.CodedInputStream input)
  1262. throws java.io.IOException {
  1263. return newBuilder().mergeFrom(input).buildParsed();
  1264. }
  1265. public static northwind.Nwind.OrderLine parseFrom(
  1266. com.google.protobuf.CodedInputStream input,
  1267. com.google.protobuf.ExtensionRegistry extensionRegistry)
  1268. throws java.io.IOException {
  1269. return newBuilder().mergeFrom(input, extensionRegistry)
  1270. .buildParsed();
  1271. }
  1272. public static Builder newBuilder() { return new Builder(); }
  1273. public Builder newBuilderForType() { return new Builder(); }
  1274. public static Builder newBuilder(northwind.Nwind.OrderLine prototype) {
  1275. return new Builder().mergeFrom(prototype);
  1276. }
  1277. public static final class Builder extends
  1278. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1279. // Construct using northwind.Nwind.OrderLine.newBuilder()
  1280. private Builder() {}
  1281. northwind.Nwind.OrderLine result = new northwind.Nwind.OrderLine();
  1282. protected northwind.Nwind.OrderLine internalGetResult() {
  1283. return result;
  1284. }
  1285. public Builder clear() {
  1286. result = new northwind.Nwind.OrderLine();
  1287. return this;
  1288. }
  1289. public Builder clone() {
  1290. return new Builder().mergeFrom(result);
  1291. }
  1292. public com.google.protobuf.Descriptors.Descriptor
  1293. getDescriptorForType() {
  1294. return northwind.Nwind.OrderLine.getDescriptor();
  1295. }
  1296. public northwind.Nwind.OrderLine getDefaultInstanceForType() {
  1297. return northwind.Nwind.OrderLine.getDefaultInstance();
  1298. }
  1299. public northwind.Nwind.OrderLine build() {
  1300. if (!isInitialized()) {
  1301. throw new com.google.protobuf.UninitializedMessageException(
  1302. result);
  1303. }
  1304. return buildPartial();
  1305. }
  1306. private northwind.Nwind.OrderLine buildParsed()
  1307. throws com.google.protobuf.InvalidProtocolBufferException {
  1308. if (!isInitialized()) {
  1309. throw new com.google.protobuf.UninitializedMessageException(
  1310. result).asInvalidProtocolBufferException();
  1311. }
  1312. return buildPartial();
  1313. }
  1314. public northwind.Nwind.OrderLine buildPartial() {
  1315. northwind.Nwind.OrderLine returnMe = result;
  1316. result = null;
  1317. return returnMe;
  1318. }
  1319. public Builder mergeFrom(com.google.protobuf.Message other) {
  1320. if (other instanceof northwind.Nwind.OrderLine) {
  1321. return mergeFrom((northwind.Nwind.OrderLine)other);
  1322. } else {
  1323. super.mergeFrom(other);
  1324. return this;
  1325. }
  1326. }
  1327. public Builder mergeFrom(northwind.Nwind.OrderLine other) {
  1328. if (other == northwind.Nwind.OrderLine.getDefaultInstance()) return this;
  1329. if (other.hasOrderID()) {
  1330. setOrderID(other.getOrderID());
  1331. }
  1332. if (other.hasProductID()) {
  1333. setProductID(other.getProductID());
  1334. }
  1335. if (other.hasUnitPrice()) {
  1336. mergeUnitPrice(other.getUnitPrice());
  1337. }
  1338. if (other.hasQuantity()) {
  1339. setQuantity(other.getQuantity());
  1340. }
  1341. if (other.hasDiscount()) {
  1342. setDiscount(other.getDiscount());
  1343. }
  1344. this.mergeUnknownFields(other.getUnknownFields());
  1345. return this;
  1346. }
  1347. public Builder mergeFrom(
  1348. com.google.protobuf.CodedInputStream input)
  1349. throws java.io.IOException {
  1350. return mergeFrom(input,
  1351. com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
  1352. }
  1353. public Builder mergeFrom(
  1354. com.google.protobuf.CodedInputStream input,
  1355. com.google.protobuf.ExtensionRegistry extensionRegistry)
  1356. throws java.io.IOException {
  1357. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1358. com.google.protobuf.UnknownFieldSet.newBuilder(
  1359. this.getUnknownFields());
  1360. while (true) {
  1361. int tag = input.readTag();
  1362. switch (tag) {
  1363. case 0:
  1364. this.setUnknownFields(unknownFields.build());
  1365. return this;
  1366. default: {
  1367. if (!parseUnknownField(input, unknownFields,
  1368. extensionRegistry, tag)) {
  1369. this.setUnknownFields(unknownFields.build());
  1370. return this;
  1371. }
  1372. break;
  1373. }
  1374. case 8: {
  1375. setOrderID(input.readInt32());
  1376. break;
  1377. }
  1378. case 16: {
  1379. setProductID(input.readInt32());
  1380. break;
  1381. }
  1382. case 26: {
  1383. bcl.Bcl.Decimal.Builder subBuilder = bcl.Bcl.Decimal.newBuilder();
  1384. if (hasUnitPrice()) {
  1385. subBuilder.mergeFrom(getUnitPrice());
  1386. }
  1387. input.readMessage(subBuilder, extensionRegistry);
  1388. setUnitPrice(subBuilder.buildPartial());
  1389. break;
  1390. }
  1391. case 32: {
  1392. setQuantity(input.readSInt32());
  1393. break;
  1394. }
  1395. case 45: {
  1396. setDiscount(input.readFloat());
  1397. break;
  1398. }
  1399. }
  1400. }
  1401. }
  1402. // optional int32 OrderID = 1;
  1403. public boolean hasOrderID() {
  1404. return result.hasOrderID();
  1405. }
  1406. public int getOrderID() {
  1407. return result.getOrderID();
  1408. }
  1409. public Builder setOrderID(int value) {
  1410. result.hasOrderID = true;
  1411. result.orderID_ = value;
  1412. return this;
  1413. }
  1414. public Builder clearOrderID() {
  1415. result.hasOrderID = false;
  1416. result.orderID_ = 0;
  1417. return this;
  1418. }
  1419. // optional int32 ProductID = 2;
  1420. public boolean hasProductID() {
  1421. return result.hasProductID();
  1422. }
  1423. public int getProductID() {
  1424. return result.getProductID();
  1425. }
  1426. public Builder setProductID(int value) {
  1427. result.hasProductID = true;
  1428. result.productID_ = value;
  1429. return this;
  1430. }
  1431. public Builder clearProductID() {
  1432. result.hasProductID = false;
  1433. result.productID_ = 0;
  1434. return this;
  1435. }
  1436. // optional .bcl.Decimal UnitPrice = 3;
  1437. public boolean hasUnitPrice() {
  1438. return result.hasUnitPrice();
  1439. }
  1440. public bcl.Bcl.Decimal getUnitPrice() {
  1441. return result.getUnitPrice();
  1442. }
  1443. public Builder setUnitPrice(bcl.Bcl.Decimal value) {
  1444. result.hasUnitPrice = true;
  1445. result.unitPrice_ = value;
  1446. return this;
  1447. }
  1448. public Builder setUnitPrice(bcl.Bcl.Decimal.Builder builderForValue) {
  1449. result.hasUnitPrice = true;
  1450. result.unitPrice_ = builderForValue.build();
  1451. return this;
  1452. }
  1453. public Builder mergeUnitPrice(bcl.Bcl.Decimal value) {
  1454. if (result.hasUnitPrice() &&
  1455. result.unitPrice_ != bcl.Bcl.Decimal.getDefaultInstance()) {
  1456. result.unitPrice_ =
  1457. bcl.Bcl.Decimal.newBuilder(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_ = bcl.Bcl.Decimal.getDefaultInstance();
  1467. return this;
  1468. }
  1469. // optional sint32 Quantity = 4;
  1470. public boolean hasQuantity() {
  1471. return result.hasQuantity();
  1472. }
  1473. public int getQuantity() {
  1474. return result.getQuantity();
  1475. }
  1476. public Builder setQuantity(int value) {
  1477. result.hasQuantity = true;
  1478. result.quantity_ = value;
  1479. return this;
  1480. }
  1481. public Builder clearQuantity() {
  1482. result.hasQuantity = false;
  1483. result.quantity_ = 0;
  1484. return this;
  1485. }
  1486. // optional float Discount = 5;
  1487. public boolean hasDiscount() {
  1488. return result.hasDiscount();
  1489. }
  1490. public float getDiscount() {
  1491. return result.getDiscount();
  1492. }
  1493. public Builder setDiscount(float value) {
  1494. result.hasDiscount = true;
  1495. result.discount_ = value;
  1496. return this;
  1497. }
  1498. public Builder clearDiscount() {
  1499. result.hasDiscount = false;
  1500. result.discount_ = 0F;
  1501. return this;
  1502. }
  1503. }
  1504. }
  1505. private static final com.google.protobuf.Descriptors.Descriptor
  1506. internal_static_northwind_Database_descriptor =
  1507. getDescriptor().getMessageTypes().get(0);
  1508. private static
  1509. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1510. internal_static_northwind_Database_fieldAccessorTable = new
  1511. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1512. internal_static_northwind_Database_descriptor,
  1513. new java.lang.String[] { "Orders", },
  1514. northwind.Nwind.Database.class,
  1515. northwind.Nwind.Database.Builder.class);
  1516. private static final com.google.protobuf.Descriptors.Descriptor
  1517. internal_static_northwind_Order_descriptor =
  1518. getDescriptor().getMessageTypes().get(1);
  1519. private static
  1520. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1521. internal_static_northwind_Order_fieldAccessorTable = new
  1522. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1523. internal_static_northwind_Order_descriptor,
  1524. new java.lang.String[] { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode", "ShipCountry", "Lines", },
  1525. northwind.Nwind.Order.class,
  1526. northwind.Nwind.Order.Builder.class);
  1527. private static final com.google.protobuf.Descriptors.Descriptor
  1528. internal_static_northwind_OrderLine_descriptor =
  1529. getDescriptor().getMessageTypes().get(2);
  1530. private static
  1531. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1532. internal_static_northwind_OrderLine_fieldAccessorTable = new
  1533. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1534. internal_static_northwind_OrderLine_descriptor,
  1535. new java.lang.String[] { "OrderID", "ProductID", "UnitPrice", "Quantity", "Discount", },
  1536. northwind.Nwind.OrderLine.class,
  1537. northwind.Nwind.OrderLine.Builder.class);
  1538. }