aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/TestBed/java/northwind/Nwind.java
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/TestBed/java/northwind/Nwind.java')
-rw-r--r--csharp/TestBed/java/northwind/Nwind.java1661
1 files changed, 1661 insertions, 0 deletions
diff --git a/csharp/TestBed/java/northwind/Nwind.java b/csharp/TestBed/java/northwind/Nwind.java
new file mode 100644
index 00000000..02929ef5
--- /dev/null
+++ b/csharp/TestBed/java/northwind/Nwind.java
@@ -0,0 +1,1661 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+
+package northwind;
+
+public final class Nwind {
+ private Nwind() {}
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static final com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = buildDescriptor();
+ private static
+ com.google.protobuf.Descriptors.FileDescriptor
+ buildDescriptor() {
+ java.lang.String descriptorData =
+ "\n\013nwind.proto\022\tnorthwind\032\tbcl.proto\",\n\010D" +
+ "atabase\022 \n\006Orders\030\001 \003(\0132\020.northwind.Orde" +
+ "r\"\372\002\n\005Order\022\017\n\007OrderID\030\001 \001(\005\022\022\n\nCustomer" +
+ "ID\030\002 \001(\t\022\022\n\nEmployeeID\030\003 \001(\005\022 \n\tOrderDat" +
+ "e\030\004 \001(\0132\r.bcl.DateTime\022#\n\014RequiredDate\030\005" +
+ " \001(\0132\r.bcl.DateTime\022\"\n\013ShippedDate\030\006 \001(\013" +
+ "2\r.bcl.DateTime\022\017\n\007ShipVia\030\007 \001(\005\022\035\n\007Frei" +
+ "ght\030\010 \001(\0132\014.bcl.Decimal\022\020\n\010ShipName\030\t \001(" +
+ "\t\022\023\n\013ShipAddress\030\n \001(\t\022\020\n\010ShipCity\030\013 \001(\t" +
+ "\022\022\n\nShipRegion\030\014 \001(\t\022\026\n\016ShipPostalCode\030\r" +
+ " \001(\t\022\023\n\013ShipCountry\030\016 \001(\t\022#\n\005Lines\030\017 \003(\013" +
+ "2\024.northwind.OrderLine\"t\n\tOrderLine\022\017\n\007O" +
+ "rderID\030\001 \001(\005\022\021\n\tProductID\030\002 \001(\005\022\037\n\tUnitP" +
+ "rice\030\003 \001(\0132\014.bcl.Decimal\022\020\n\010Quantity\030\004 \001" +
+ "(\021\022\020\n\010Discount\030\005 \001(\002B#H\001\302>\tNorthwind\312>\022N" +
+ "orthwindProtoFile";
+ try {
+ return com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ bcl.Bcl.getDescriptor(),
+ });
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Failed to parse protocol buffer descriptor for " +
+ "\"nwind.proto\".", e);
+ }
+ }
+
+ public static final class Database extends
+ com.google.protobuf.GeneratedMessage {
+ // Use Database.newBuilder() to construct.
+ private Database() {}
+
+ private static final Database defaultInstance = new Database();
+ public static Database getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Database getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return northwind.Nwind.internal_static_northwind_Database_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return northwind.Nwind.internal_static_northwind_Database_fieldAccessorTable;
+ }
+
+ // repeated .northwind.Order Orders = 1;
+ private java.util.List<northwind.Nwind.Order> orders_ =
+ java.util.Collections.emptyList();
+ public java.util.List<northwind.Nwind.Order> getOrdersList() {
+ return orders_;
+ }
+ public int getOrdersCount() { return orders_.size(); }
+ public northwind.Nwind.Order getOrders(int index) {
+ return orders_.get(index);
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (northwind.Nwind.Order element : getOrdersList()) {
+ output.writeMessage(1, element);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (northwind.Nwind.Order element : getOrdersList()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, element);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public static northwind.Nwind.Database parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.Database parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+
+ public static Builder newBuilder() { return new Builder(); }
+ public Builder newBuilderForType() { return new Builder(); }
+ public static Builder newBuilder(northwind.Nwind.Database prototype) {
+ return new Builder().mergeFrom(prototype);
+ }
+
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> {
+ // Construct using northwind.Nwind.Database.newBuilder()
+ private Builder() {}
+
+ northwind.Nwind.Database result = new northwind.Nwind.Database();
+
+ protected northwind.Nwind.Database internalGetResult() {
+ return result;
+ }
+
+ public Builder clear() {
+ result = new northwind.Nwind.Database();
+ return this;
+ }
+
+ public Builder clone() {
+ return new Builder().mergeFrom(result);
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return northwind.Nwind.Database.getDescriptor();
+ }
+
+ public northwind.Nwind.Database getDefaultInstanceForType() {
+ return northwind.Nwind.Database.getDefaultInstance();
+ }
+
+ public northwind.Nwind.Database build() {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result);
+ }
+ return buildPartial();
+ }
+
+ private northwind.Nwind.Database buildParsed()
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result).asInvalidProtocolBufferException();
+ }
+ return buildPartial();
+ }
+
+ public northwind.Nwind.Database buildPartial() {
+ if (result.orders_ != java.util.Collections.EMPTY_LIST) {
+ result.orders_ =
+ java.util.Collections.unmodifiableList(result.orders_);
+ }
+ northwind.Nwind.Database returnMe = result;
+ result = null;
+ return returnMe;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof northwind.Nwind.Database) {
+ return mergeFrom((northwind.Nwind.Database)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(northwind.Nwind.Database other) {
+ if (other == northwind.Nwind.Database.getDefaultInstance()) return this;
+ if (!other.orders_.isEmpty()) {
+ if (result.orders_.isEmpty()) {
+ result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
+ }
+ result.orders_.addAll(other.orders_);
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return mergeFrom(input,
+ com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder(
+ this.getUnknownFields());
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ }
+ break;
+ }
+ case 10: {
+ northwind.Nwind.Order.Builder subBuilder = northwind.Nwind.Order.newBuilder();
+ input.readMessage(subBuilder, extensionRegistry);
+ addOrders(subBuilder.buildPartial());
+ break;
+ }
+ }
+ }
+ }
+
+
+ // repeated .northwind.Order Orders = 1;
+ public java.util.List<northwind.Nwind.Order> getOrdersList() {
+ return java.util.Collections.unmodifiableList(result.orders_);
+ }
+ public int getOrdersCount() {
+ return result.getOrdersCount();
+ }
+ public northwind.Nwind.Order getOrders(int index) {
+ return result.getOrders(index);
+ }
+ public Builder setOrders(int index, northwind.Nwind.Order value) {
+ result.orders_.set(index, value);
+ return this;
+ }
+ public Builder setOrders(int index, northwind.Nwind.Order.Builder builderForValue) {
+ result.orders_.set(index, builderForValue.build());
+ return this;
+ }
+ public Builder addOrders(northwind.Nwind.Order value) {
+ if (result.orders_.isEmpty()) {
+ result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
+ }
+ result.orders_.add(value);
+ return this;
+ }
+ public Builder addOrders(northwind.Nwind.Order.Builder builderForValue) {
+ if (result.orders_.isEmpty()) {
+ result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
+ }
+ result.orders_.add(builderForValue.build());
+ return this;
+ }
+ public Builder addAllOrders(
+ java.lang.Iterable<? extends northwind.Nwind.Order> values) {
+ if (result.orders_.isEmpty()) {
+ result.orders_ = new java.util.ArrayList<northwind.Nwind.Order>();
+ }
+ super.addAll(values, result.orders_);
+ return this;
+ }
+ public Builder clearOrders() {
+ result.orders_ = java.util.Collections.emptyList();
+ return this;
+ }
+ }
+ }
+
+ public static final class Order extends
+ com.google.protobuf.GeneratedMessage {
+ // Use Order.newBuilder() to construct.
+ private Order() {}
+
+ private static final Order defaultInstance = new Order();
+ public static Order getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Order getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return northwind.Nwind.internal_static_northwind_Order_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return northwind.Nwind.internal_static_northwind_Order_fieldAccessorTable;
+ }
+
+ // optional int32 OrderID = 1;
+ private boolean hasOrderID;
+ private int orderID_ = 0;
+ public boolean hasOrderID() { return hasOrderID; }
+ public int getOrderID() { return orderID_; }
+
+ // optional string CustomerID = 2;
+ private boolean hasCustomerID;
+ private java.lang.String customerID_ = "";
+ public boolean hasCustomerID() { return hasCustomerID; }
+ public java.lang.String getCustomerID() { return customerID_; }
+
+ // optional int32 EmployeeID = 3;
+ private boolean hasEmployeeID;
+ private int employeeID_ = 0;
+ public boolean hasEmployeeID() { return hasEmployeeID; }
+ public int getEmployeeID() { return employeeID_; }
+
+ // optional .bcl.DateTime OrderDate = 4;
+ private boolean hasOrderDate;
+ private bcl.Bcl.DateTime orderDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ public boolean hasOrderDate() { return hasOrderDate; }
+ public bcl.Bcl.DateTime getOrderDate() { return orderDate_; }
+
+ // optional .bcl.DateTime RequiredDate = 5;
+ private boolean hasRequiredDate;
+ private bcl.Bcl.DateTime requiredDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ public boolean hasRequiredDate() { return hasRequiredDate; }
+ public bcl.Bcl.DateTime getRequiredDate() { return requiredDate_; }
+
+ // optional .bcl.DateTime ShippedDate = 6;
+ private boolean hasShippedDate;
+ private bcl.Bcl.DateTime shippedDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ public boolean hasShippedDate() { return hasShippedDate; }
+ public bcl.Bcl.DateTime getShippedDate() { return shippedDate_; }
+
+ // optional int32 ShipVia = 7;
+ private boolean hasShipVia;
+ private int shipVia_ = 0;
+ public boolean hasShipVia() { return hasShipVia; }
+ public int getShipVia() { return shipVia_; }
+
+ // optional .bcl.Decimal Freight = 8;
+ private boolean hasFreight;
+ private bcl.Bcl.Decimal freight_ = bcl.Bcl.Decimal.getDefaultInstance();
+ public boolean hasFreight() { return hasFreight; }
+ public bcl.Bcl.Decimal getFreight() { return freight_; }
+
+ // optional string ShipName = 9;
+ private boolean hasShipName;
+ private java.lang.String shipName_ = "";
+ public boolean hasShipName() { return hasShipName; }
+ public java.lang.String getShipName() { return shipName_; }
+
+ // optional string ShipAddress = 10;
+ private boolean hasShipAddress;
+ private java.lang.String shipAddress_ = "";
+ public boolean hasShipAddress() { return hasShipAddress; }
+ public java.lang.String getShipAddress() { return shipAddress_; }
+
+ // optional string ShipCity = 11;
+ private boolean hasShipCity;
+ private java.lang.String shipCity_ = "";
+ public boolean hasShipCity() { return hasShipCity; }
+ public java.lang.String getShipCity() { return shipCity_; }
+
+ // optional string ShipRegion = 12;
+ private boolean hasShipRegion;
+ private java.lang.String shipRegion_ = "";
+ public boolean hasShipRegion() { return hasShipRegion; }
+ public java.lang.String getShipRegion() { return shipRegion_; }
+
+ // optional string ShipPostalCode = 13;
+ private boolean hasShipPostalCode;
+ private java.lang.String shipPostalCode_ = "";
+ public boolean hasShipPostalCode() { return hasShipPostalCode; }
+ public java.lang.String getShipPostalCode() { return shipPostalCode_; }
+
+ // optional string ShipCountry = 14;
+ private boolean hasShipCountry;
+ private java.lang.String shipCountry_ = "";
+ public boolean hasShipCountry() { return hasShipCountry; }
+ public java.lang.String getShipCountry() { return shipCountry_; }
+
+ // repeated .northwind.OrderLine Lines = 15;
+ private java.util.List<northwind.Nwind.OrderLine> lines_ =
+ java.util.Collections.emptyList();
+ public java.util.List<northwind.Nwind.OrderLine> getLinesList() {
+ return lines_;
+ }
+ public int getLinesCount() { return lines_.size(); }
+ public northwind.Nwind.OrderLine getLines(int index) {
+ return lines_.get(index);
+ }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (hasOrderID()) {
+ output.writeInt32(1, getOrderID());
+ }
+ if (hasCustomerID()) {
+ output.writeString(2, getCustomerID());
+ }
+ if (hasEmployeeID()) {
+ output.writeInt32(3, getEmployeeID());
+ }
+ if (hasOrderDate()) {
+ output.writeMessage(4, getOrderDate());
+ }
+ if (hasRequiredDate()) {
+ output.writeMessage(5, getRequiredDate());
+ }
+ if (hasShippedDate()) {
+ output.writeMessage(6, getShippedDate());
+ }
+ if (hasShipVia()) {
+ output.writeInt32(7, getShipVia());
+ }
+ if (hasFreight()) {
+ output.writeMessage(8, getFreight());
+ }
+ if (hasShipName()) {
+ output.writeString(9, getShipName());
+ }
+ if (hasShipAddress()) {
+ output.writeString(10, getShipAddress());
+ }
+ if (hasShipCity()) {
+ output.writeString(11, getShipCity());
+ }
+ if (hasShipRegion()) {
+ output.writeString(12, getShipRegion());
+ }
+ if (hasShipPostalCode()) {
+ output.writeString(13, getShipPostalCode());
+ }
+ if (hasShipCountry()) {
+ output.writeString(14, getShipCountry());
+ }
+ for (northwind.Nwind.OrderLine element : getLinesList()) {
+ output.writeMessage(15, element);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOrderID()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, getOrderID());
+ }
+ if (hasCustomerID()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(2, getCustomerID());
+ }
+ if (hasEmployeeID()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, getEmployeeID());
+ }
+ if (hasOrderDate()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getOrderDate());
+ }
+ if (hasRequiredDate()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getRequiredDate());
+ }
+ if (hasShippedDate()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, getShippedDate());
+ }
+ if (hasShipVia()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(7, getShipVia());
+ }
+ if (hasFreight()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, getFreight());
+ }
+ if (hasShipName()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(9, getShipName());
+ }
+ if (hasShipAddress()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(10, getShipAddress());
+ }
+ if (hasShipCity()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(11, getShipCity());
+ }
+ if (hasShipRegion()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(12, getShipRegion());
+ }
+ if (hasShipPostalCode()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(13, getShipPostalCode());
+ }
+ if (hasShipCountry()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeStringSize(14, getShipCountry());
+ }
+ for (northwind.Nwind.OrderLine element : getLinesList()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(15, element);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public static northwind.Nwind.Order parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.Order parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+
+ public static Builder newBuilder() { return new Builder(); }
+ public Builder newBuilderForType() { return new Builder(); }
+ public static Builder newBuilder(northwind.Nwind.Order prototype) {
+ return new Builder().mergeFrom(prototype);
+ }
+
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> {
+ // Construct using northwind.Nwind.Order.newBuilder()
+ private Builder() {}
+
+ northwind.Nwind.Order result = new northwind.Nwind.Order();
+
+ protected northwind.Nwind.Order internalGetResult() {
+ return result;
+ }
+
+ public Builder clear() {
+ result = new northwind.Nwind.Order();
+ return this;
+ }
+
+ public Builder clone() {
+ return new Builder().mergeFrom(result);
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return northwind.Nwind.Order.getDescriptor();
+ }
+
+ public northwind.Nwind.Order getDefaultInstanceForType() {
+ return northwind.Nwind.Order.getDefaultInstance();
+ }
+
+ public northwind.Nwind.Order build() {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result);
+ }
+ return buildPartial();
+ }
+
+ private northwind.Nwind.Order buildParsed()
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result).asInvalidProtocolBufferException();
+ }
+ return buildPartial();
+ }
+
+ public northwind.Nwind.Order buildPartial() {
+ if (result.lines_ != java.util.Collections.EMPTY_LIST) {
+ result.lines_ =
+ java.util.Collections.unmodifiableList(result.lines_);
+ }
+ northwind.Nwind.Order returnMe = result;
+ result = null;
+ return returnMe;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof northwind.Nwind.Order) {
+ return mergeFrom((northwind.Nwind.Order)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(northwind.Nwind.Order other) {
+ if (other == northwind.Nwind.Order.getDefaultInstance()) return this;
+ if (other.hasOrderID()) {
+ setOrderID(other.getOrderID());
+ }
+ if (other.hasCustomerID()) {
+ setCustomerID(other.getCustomerID());
+ }
+ if (other.hasEmployeeID()) {
+ setEmployeeID(other.getEmployeeID());
+ }
+ if (other.hasOrderDate()) {
+ mergeOrderDate(other.getOrderDate());
+ }
+ if (other.hasRequiredDate()) {
+ mergeRequiredDate(other.getRequiredDate());
+ }
+ if (other.hasShippedDate()) {
+ mergeShippedDate(other.getShippedDate());
+ }
+ if (other.hasShipVia()) {
+ setShipVia(other.getShipVia());
+ }
+ if (other.hasFreight()) {
+ mergeFreight(other.getFreight());
+ }
+ if (other.hasShipName()) {
+ setShipName(other.getShipName());
+ }
+ if (other.hasShipAddress()) {
+ setShipAddress(other.getShipAddress());
+ }
+ if (other.hasShipCity()) {
+ setShipCity(other.getShipCity());
+ }
+ if (other.hasShipRegion()) {
+ setShipRegion(other.getShipRegion());
+ }
+ if (other.hasShipPostalCode()) {
+ setShipPostalCode(other.getShipPostalCode());
+ }
+ if (other.hasShipCountry()) {
+ setShipCountry(other.getShipCountry());
+ }
+ if (!other.lines_.isEmpty()) {
+ if (result.lines_.isEmpty()) {
+ result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
+ }
+ result.lines_.addAll(other.lines_);
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return mergeFrom(input,
+ com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder(
+ this.getUnknownFields());
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ }
+ break;
+ }
+ case 8: {
+ setOrderID(input.readInt32());
+ break;
+ }
+ case 18: {
+ setCustomerID(input.readString());
+ break;
+ }
+ case 24: {
+ setEmployeeID(input.readInt32());
+ break;
+ }
+ case 34: {
+ bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
+ if (hasOrderDate()) {
+ subBuilder.mergeFrom(getOrderDate());
+ }
+ input.readMessage(subBuilder, extensionRegistry);
+ setOrderDate(subBuilder.buildPartial());
+ break;
+ }
+ case 42: {
+ bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
+ if (hasRequiredDate()) {
+ subBuilder.mergeFrom(getRequiredDate());
+ }
+ input.readMessage(subBuilder, extensionRegistry);
+ setRequiredDate(subBuilder.buildPartial());
+ break;
+ }
+ case 50: {
+ bcl.Bcl.DateTime.Builder subBuilder = bcl.Bcl.DateTime.newBuilder();
+ if (hasShippedDate()) {
+ subBuilder.mergeFrom(getShippedDate());
+ }
+ input.readMessage(subBuilder, extensionRegistry);
+ setShippedDate(subBuilder.buildPartial());
+ break;
+ }
+ case 56: {
+ setShipVia(input.readInt32());
+ break;
+ }
+ case 66: {
+ bcl.Bcl.Decimal.Builder subBuilder = bcl.Bcl.Decimal.newBuilder();
+ if (hasFreight()) {
+ subBuilder.mergeFrom(getFreight());
+ }
+ input.readMessage(subBuilder, extensionRegistry);
+ setFreight(subBuilder.buildPartial());
+ break;
+ }
+ case 74: {
+ setShipName(input.readString());
+ break;
+ }
+ case 82: {
+ setShipAddress(input.readString());
+ break;
+ }
+ case 90: {
+ setShipCity(input.readString());
+ break;
+ }
+ case 98: {
+ setShipRegion(input.readString());
+ break;
+ }
+ case 106: {
+ setShipPostalCode(input.readString());
+ break;
+ }
+ case 114: {
+ setShipCountry(input.readString());
+ break;
+ }
+ case 122: {
+ northwind.Nwind.OrderLine.Builder subBuilder = northwind.Nwind.OrderLine.newBuilder();
+ input.readMessage(subBuilder, extensionRegistry);
+ addLines(subBuilder.buildPartial());
+ break;
+ }
+ }
+ }
+ }
+
+
+ // optional int32 OrderID = 1;
+ public boolean hasOrderID() {
+ return result.hasOrderID();
+ }
+ public int getOrderID() {
+ return result.getOrderID();
+ }
+ public Builder setOrderID(int value) {
+ result.hasOrderID = true;
+ result.orderID_ = value;
+ return this;
+ }
+ public Builder clearOrderID() {
+ result.hasOrderID = false;
+ result.orderID_ = 0;
+ return this;
+ }
+
+ // optional string CustomerID = 2;
+ public boolean hasCustomerID() {
+ return result.hasCustomerID();
+ }
+ public java.lang.String getCustomerID() {
+ return result.getCustomerID();
+ }
+ public Builder setCustomerID(java.lang.String value) {
+ result.hasCustomerID = true;
+ result.customerID_ = value;
+ return this;
+ }
+ public Builder clearCustomerID() {
+ result.hasCustomerID = false;
+ result.customerID_ = "";
+ return this;
+ }
+
+ // optional int32 EmployeeID = 3;
+ public boolean hasEmployeeID() {
+ return result.hasEmployeeID();
+ }
+ public int getEmployeeID() {
+ return result.getEmployeeID();
+ }
+ public Builder setEmployeeID(int value) {
+ result.hasEmployeeID = true;
+ result.employeeID_ = value;
+ return this;
+ }
+ public Builder clearEmployeeID() {
+ result.hasEmployeeID = false;
+ result.employeeID_ = 0;
+ return this;
+ }
+
+ // optional .bcl.DateTime OrderDate = 4;
+ public boolean hasOrderDate() {
+ return result.hasOrderDate();
+ }
+ public bcl.Bcl.DateTime getOrderDate() {
+ return result.getOrderDate();
+ }
+ public Builder setOrderDate(bcl.Bcl.DateTime value) {
+ result.hasOrderDate = true;
+ result.orderDate_ = value;
+ return this;
+ }
+ public Builder setOrderDate(bcl.Bcl.DateTime.Builder builderForValue) {
+ result.hasOrderDate = true;
+ result.orderDate_ = builderForValue.build();
+ return this;
+ }
+ public Builder mergeOrderDate(bcl.Bcl.DateTime value) {
+ if (result.hasOrderDate() &&
+ result.orderDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
+ result.orderDate_ =
+ bcl.Bcl.DateTime.newBuilder(result.orderDate_).mergeFrom(value).buildPartial();
+ } else {
+ result.orderDate_ = value;
+ }
+ result.hasOrderDate = true;
+ return this;
+ }
+ public Builder clearOrderDate() {
+ result.hasOrderDate = false;
+ result.orderDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ return this;
+ }
+
+ // optional .bcl.DateTime RequiredDate = 5;
+ public boolean hasRequiredDate() {
+ return result.hasRequiredDate();
+ }
+ public bcl.Bcl.DateTime getRequiredDate() {
+ return result.getRequiredDate();
+ }
+ public Builder setRequiredDate(bcl.Bcl.DateTime value) {
+ result.hasRequiredDate = true;
+ result.requiredDate_ = value;
+ return this;
+ }
+ public Builder setRequiredDate(bcl.Bcl.DateTime.Builder builderForValue) {
+ result.hasRequiredDate = true;
+ result.requiredDate_ = builderForValue.build();
+ return this;
+ }
+ public Builder mergeRequiredDate(bcl.Bcl.DateTime value) {
+ if (result.hasRequiredDate() &&
+ result.requiredDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
+ result.requiredDate_ =
+ bcl.Bcl.DateTime.newBuilder(result.requiredDate_).mergeFrom(value).buildPartial();
+ } else {
+ result.requiredDate_ = value;
+ }
+ result.hasRequiredDate = true;
+ return this;
+ }
+ public Builder clearRequiredDate() {
+ result.hasRequiredDate = false;
+ result.requiredDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ return this;
+ }
+
+ // optional .bcl.DateTime ShippedDate = 6;
+ public boolean hasShippedDate() {
+ return result.hasShippedDate();
+ }
+ public bcl.Bcl.DateTime getShippedDate() {
+ return result.getShippedDate();
+ }
+ public Builder setShippedDate(bcl.Bcl.DateTime value) {
+ result.hasShippedDate = true;
+ result.shippedDate_ = value;
+ return this;
+ }
+ public Builder setShippedDate(bcl.Bcl.DateTime.Builder builderForValue) {
+ result.hasShippedDate = true;
+ result.shippedDate_ = builderForValue.build();
+ return this;
+ }
+ public Builder mergeShippedDate(bcl.Bcl.DateTime value) {
+ if (result.hasShippedDate() &&
+ result.shippedDate_ != bcl.Bcl.DateTime.getDefaultInstance()) {
+ result.shippedDate_ =
+ bcl.Bcl.DateTime.newBuilder(result.shippedDate_).mergeFrom(value).buildPartial();
+ } else {
+ result.shippedDate_ = value;
+ }
+ result.hasShippedDate = true;
+ return this;
+ }
+ public Builder clearShippedDate() {
+ result.hasShippedDate = false;
+ result.shippedDate_ = bcl.Bcl.DateTime.getDefaultInstance();
+ return this;
+ }
+
+ // optional int32 ShipVia = 7;
+ public boolean hasShipVia() {
+ return result.hasShipVia();
+ }
+ public int getShipVia() {
+ return result.getShipVia();
+ }
+ public Builder setShipVia(int value) {
+ result.hasShipVia = true;
+ result.shipVia_ = value;
+ return this;
+ }
+ public Builder clearShipVia() {
+ result.hasShipVia = false;
+ result.shipVia_ = 0;
+ return this;
+ }
+
+ // optional .bcl.Decimal Freight = 8;
+ public boolean hasFreight() {
+ return result.hasFreight();
+ }
+ public bcl.Bcl.Decimal getFreight() {
+ return result.getFreight();
+ }
+ public Builder setFreight(bcl.Bcl.Decimal value) {
+ result.hasFreight = true;
+ result.freight_ = value;
+ return this;
+ }
+ public Builder setFreight(bcl.Bcl.Decimal.Builder builderForValue) {
+ result.hasFreight = true;
+ result.freight_ = builderForValue.build();
+ return this;
+ }
+ public Builder mergeFreight(bcl.Bcl.Decimal value) {
+ if (result.hasFreight() &&
+ result.freight_ != bcl.Bcl.Decimal.getDefaultInstance()) {
+ result.freight_ =
+ bcl.Bcl.Decimal.newBuilder(result.freight_).mergeFrom(value).buildPartial();
+ } else {
+ result.freight_ = value;
+ }
+ result.hasFreight = true;
+ return this;
+ }
+ public Builder clearFreight() {
+ result.hasFreight = false;
+ result.freight_ = bcl.Bcl.Decimal.getDefaultInstance();
+ return this;
+ }
+
+ // optional string ShipName = 9;
+ public boolean hasShipName() {
+ return result.hasShipName();
+ }
+ public java.lang.String getShipName() {
+ return result.getShipName();
+ }
+ public Builder setShipName(java.lang.String value) {
+ result.hasShipName = true;
+ result.shipName_ = value;
+ return this;
+ }
+ public Builder clearShipName() {
+ result.hasShipName = false;
+ result.shipName_ = "";
+ return this;
+ }
+
+ // optional string ShipAddress = 10;
+ public boolean hasShipAddress() {
+ return result.hasShipAddress();
+ }
+ public java.lang.String getShipAddress() {
+ return result.getShipAddress();
+ }
+ public Builder setShipAddress(java.lang.String value) {
+ result.hasShipAddress = true;
+ result.shipAddress_ = value;
+ return this;
+ }
+ public Builder clearShipAddress() {
+ result.hasShipAddress = false;
+ result.shipAddress_ = "";
+ return this;
+ }
+
+ // optional string ShipCity = 11;
+ public boolean hasShipCity() {
+ return result.hasShipCity();
+ }
+ public java.lang.String getShipCity() {
+ return result.getShipCity();
+ }
+ public Builder setShipCity(java.lang.String value) {
+ result.hasShipCity = true;
+ result.shipCity_ = value;
+ return this;
+ }
+ public Builder clearShipCity() {
+ result.hasShipCity = false;
+ result.shipCity_ = "";
+ return this;
+ }
+
+ // optional string ShipRegion = 12;
+ public boolean hasShipRegion() {
+ return result.hasShipRegion();
+ }
+ public java.lang.String getShipRegion() {
+ return result.getShipRegion();
+ }
+ public Builder setShipRegion(java.lang.String value) {
+ result.hasShipRegion = true;
+ result.shipRegion_ = value;
+ return this;
+ }
+ public Builder clearShipRegion() {
+ result.hasShipRegion = false;
+ result.shipRegion_ = "";
+ return this;
+ }
+
+ // optional string ShipPostalCode = 13;
+ public boolean hasShipPostalCode() {
+ return result.hasShipPostalCode();
+ }
+ public java.lang.String getShipPostalCode() {
+ return result.getShipPostalCode();
+ }
+ public Builder setShipPostalCode(java.lang.String value) {
+ result.hasShipPostalCode = true;
+ result.shipPostalCode_ = value;
+ return this;
+ }
+ public Builder clearShipPostalCode() {
+ result.hasShipPostalCode = false;
+ result.shipPostalCode_ = "";
+ return this;
+ }
+
+ // optional string ShipCountry = 14;
+ public boolean hasShipCountry() {
+ return result.hasShipCountry();
+ }
+ public java.lang.String getShipCountry() {
+ return result.getShipCountry();
+ }
+ public Builder setShipCountry(java.lang.String value) {
+ result.hasShipCountry = true;
+ result.shipCountry_ = value;
+ return this;
+ }
+ public Builder clearShipCountry() {
+ result.hasShipCountry = false;
+ result.shipCountry_ = "";
+ return this;
+ }
+
+ // repeated .northwind.OrderLine Lines = 15;
+ public java.util.List<northwind.Nwind.OrderLine> getLinesList() {
+ return java.util.Collections.unmodifiableList(result.lines_);
+ }
+ public int getLinesCount() {
+ return result.getLinesCount();
+ }
+ public northwind.Nwind.OrderLine getLines(int index) {
+ return result.getLines(index);
+ }
+ public Builder setLines(int index, northwind.Nwind.OrderLine value) {
+ result.lines_.set(index, value);
+ return this;
+ }
+ public Builder setLines(int index, northwind.Nwind.OrderLine.Builder builderForValue) {
+ result.lines_.set(index, builderForValue.build());
+ return this;
+ }
+ public Builder addLines(northwind.Nwind.OrderLine value) {
+ if (result.lines_.isEmpty()) {
+ result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
+ }
+ result.lines_.add(value);
+ return this;
+ }
+ public Builder addLines(northwind.Nwind.OrderLine.Builder builderForValue) {
+ if (result.lines_.isEmpty()) {
+ result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
+ }
+ result.lines_.add(builderForValue.build());
+ return this;
+ }
+ public Builder addAllLines(
+ java.lang.Iterable<? extends northwind.Nwind.OrderLine> values) {
+ if (result.lines_.isEmpty()) {
+ result.lines_ = new java.util.ArrayList<northwind.Nwind.OrderLine>();
+ }
+ super.addAll(values, result.lines_);
+ return this;
+ }
+ public Builder clearLines() {
+ result.lines_ = java.util.Collections.emptyList();
+ return this;
+ }
+ }
+ }
+
+ public static final class OrderLine extends
+ com.google.protobuf.GeneratedMessage {
+ // Use OrderLine.newBuilder() to construct.
+ private OrderLine() {}
+
+ private static final OrderLine defaultInstance = new OrderLine();
+ public static OrderLine getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public OrderLine getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return northwind.Nwind.internal_static_northwind_OrderLine_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return northwind.Nwind.internal_static_northwind_OrderLine_fieldAccessorTable;
+ }
+
+ // optional int32 OrderID = 1;
+ private boolean hasOrderID;
+ private int orderID_ = 0;
+ public boolean hasOrderID() { return hasOrderID; }
+ public int getOrderID() { return orderID_; }
+
+ // optional int32 ProductID = 2;
+ private boolean hasProductID;
+ private int productID_ = 0;
+ public boolean hasProductID() { return hasProductID; }
+ public int getProductID() { return productID_; }
+
+ // optional .bcl.Decimal UnitPrice = 3;
+ private boolean hasUnitPrice;
+ private bcl.Bcl.Decimal unitPrice_ = bcl.Bcl.Decimal.getDefaultInstance();
+ public boolean hasUnitPrice() { return hasUnitPrice; }
+ public bcl.Bcl.Decimal getUnitPrice() { return unitPrice_; }
+
+ // optional sint32 Quantity = 4;
+ private boolean hasQuantity;
+ private int quantity_ = 0;
+ public boolean hasQuantity() { return hasQuantity; }
+ public int getQuantity() { return quantity_; }
+
+ // optional float Discount = 5;
+ private boolean hasDiscount;
+ private float discount_ = 0F;
+ public boolean hasDiscount() { return hasDiscount; }
+ public float getDiscount() { return discount_; }
+
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (hasOrderID()) {
+ output.writeInt32(1, getOrderID());
+ }
+ if (hasProductID()) {
+ output.writeInt32(2, getProductID());
+ }
+ if (hasUnitPrice()) {
+ output.writeMessage(3, getUnitPrice());
+ }
+ if (hasQuantity()) {
+ output.writeSInt32(4, getQuantity());
+ }
+ if (hasDiscount()) {
+ output.writeFloat(5, getDiscount());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOrderID()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, getOrderID());
+ }
+ if (hasProductID()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, getProductID());
+ }
+ if (hasUnitPrice()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getUnitPrice());
+ }
+ if (hasQuantity()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeSInt32Size(4, getQuantity());
+ }
+ if (hasDiscount()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFloatSize(5, getDiscount());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ public static northwind.Nwind.OrderLine parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data).buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return newBuilder().mergeFrom(data, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input).buildParsed();
+ }
+ public static northwind.Nwind.OrderLine parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ return newBuilder().mergeFrom(input, extensionRegistry)
+ .buildParsed();
+ }
+
+ public static Builder newBuilder() { return new Builder(); }
+ public Builder newBuilderForType() { return new Builder(); }
+ public static Builder newBuilder(northwind.Nwind.OrderLine prototype) {
+ return new Builder().mergeFrom(prototype);
+ }
+
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> {
+ // Construct using northwind.Nwind.OrderLine.newBuilder()
+ private Builder() {}
+
+ northwind.Nwind.OrderLine result = new northwind.Nwind.OrderLine();
+
+ protected northwind.Nwind.OrderLine internalGetResult() {
+ return result;
+ }
+
+ public Builder clear() {
+ result = new northwind.Nwind.OrderLine();
+ return this;
+ }
+
+ public Builder clone() {
+ return new Builder().mergeFrom(result);
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return northwind.Nwind.OrderLine.getDescriptor();
+ }
+
+ public northwind.Nwind.OrderLine getDefaultInstanceForType() {
+ return northwind.Nwind.OrderLine.getDefaultInstance();
+ }
+
+ public northwind.Nwind.OrderLine build() {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result);
+ }
+ return buildPartial();
+ }
+
+ private northwind.Nwind.OrderLine buildParsed()
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ if (!isInitialized()) {
+ throw new com.google.protobuf.UninitializedMessageException(
+ result).asInvalidProtocolBufferException();
+ }
+ return buildPartial();
+ }
+
+ public northwind.Nwind.OrderLine buildPartial() {
+ northwind.Nwind.OrderLine returnMe = result;
+ result = null;
+ return returnMe;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof northwind.Nwind.OrderLine) {
+ return mergeFrom((northwind.Nwind.OrderLine)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(northwind.Nwind.OrderLine other) {
+ if (other == northwind.Nwind.OrderLine.getDefaultInstance()) return this;
+ if (other.hasOrderID()) {
+ setOrderID(other.getOrderID());
+ }
+ if (other.hasProductID()) {
+ setProductID(other.getProductID());
+ }
+ if (other.hasUnitPrice()) {
+ mergeUnitPrice(other.getUnitPrice());
+ }
+ if (other.hasQuantity()) {
+ setQuantity(other.getQuantity());
+ }
+ if (other.hasDiscount()) {
+ setDiscount(other.getDiscount());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return mergeFrom(input,
+ com.google.protobuf.ExtensionRegistry.getEmptyRegistry());
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistry extensionRegistry)
+ throws java.io.IOException {
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder(
+ this.getUnknownFields());
+ while (true) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ this.setUnknownFields(unknownFields.build());
+ return this;
+ }
+ break;
+ }
+ case 8: {
+ setOrderID(input.readInt32());
+ break;
+ }
+ case 16: {
+ setProductID(input.readInt32());
+ break;
+ }
+ case 26: {
+ bcl.Bcl.Decimal.Builder subBuilder = bcl.Bcl.Decimal.newBuilder();
+ if (hasUnitPrice()) {
+ subBuilder.mergeFrom(getUnitPrice());
+ }
+ input.readMessage(subBuilder, extensionRegistry);
+ setUnitPrice(subBuilder.buildPartial());
+ break;
+ }
+ case 32: {
+ setQuantity(input.readSInt32());
+ break;
+ }
+ case 45: {
+ setDiscount(input.readFloat());
+ break;
+ }
+ }
+ }
+ }
+
+
+ // optional int32 OrderID = 1;
+ public boolean hasOrderID() {
+ return result.hasOrderID();
+ }
+ public int getOrderID() {
+ return result.getOrderID();
+ }
+ public Builder setOrderID(int value) {
+ result.hasOrderID = true;
+ result.orderID_ = value;
+ return this;
+ }
+ public Builder clearOrderID() {
+ result.hasOrderID = false;
+ result.orderID_ = 0;
+ return this;
+ }
+
+ // optional int32 ProductID = 2;
+ public boolean hasProductID() {
+ return result.hasProductID();
+ }
+ public int getProductID() {
+ return result.getProductID();
+ }
+ public Builder setProductID(int value) {
+ result.hasProductID = true;
+ result.productID_ = value;
+ return this;
+ }
+ public Builder clearProductID() {
+ result.hasProductID = false;
+ result.productID_ = 0;
+ return this;
+ }
+
+ // optional .bcl.Decimal UnitPrice = 3;
+ public boolean hasUnitPrice() {
+ return result.hasUnitPrice();
+ }
+ public bcl.Bcl.Decimal getUnitPrice() {
+ return result.getUnitPrice();
+ }
+ public Builder setUnitPrice(bcl.Bcl.Decimal value) {
+ result.hasUnitPrice = true;
+ result.unitPrice_ = value;
+ return this;
+ }
+ public Builder setUnitPrice(bcl.Bcl.Decimal.Builder builderForValue) {
+ result.hasUnitPrice = true;
+ result.unitPrice_ = builderForValue.build();
+ return this;
+ }
+ public Builder mergeUnitPrice(bcl.Bcl.Decimal value) {
+ if (result.hasUnitPrice() &&
+ result.unitPrice_ != bcl.Bcl.Decimal.getDefaultInstance()) {
+ result.unitPrice_ =
+ bcl.Bcl.Decimal.newBuilder(result.unitPrice_).mergeFrom(value).buildPartial();
+ } else {
+ result.unitPrice_ = value;
+ }
+ result.hasUnitPrice = true;
+ return this;
+ }
+ public Builder clearUnitPrice() {
+ result.hasUnitPrice = false;
+ result.unitPrice_ = bcl.Bcl.Decimal.getDefaultInstance();
+ return this;
+ }
+
+ // optional sint32 Quantity = 4;
+ public boolean hasQuantity() {
+ return result.hasQuantity();
+ }
+ public int getQuantity() {
+ return result.getQuantity();
+ }
+ public Builder setQuantity(int value) {
+ result.hasQuantity = true;
+ result.quantity_ = value;
+ return this;
+ }
+ public Builder clearQuantity() {
+ result.hasQuantity = false;
+ result.quantity_ = 0;
+ return this;
+ }
+
+ // optional float Discount = 5;
+ public boolean hasDiscount() {
+ return result.hasDiscount();
+ }
+ public float getDiscount() {
+ return result.getDiscount();
+ }
+ public Builder setDiscount(float value) {
+ result.hasDiscount = true;
+ result.discount_ = value;
+ return this;
+ }
+ public Builder clearDiscount() {
+ result.hasDiscount = false;
+ result.discount_ = 0F;
+ return this;
+ }
+ }
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_northwind_Database_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_northwind_Database_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_northwind_Database_descriptor,
+ new java.lang.String[] { "Orders", },
+ northwind.Nwind.Database.class,
+ northwind.Nwind.Database.Builder.class);
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_northwind_Order_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_northwind_Order_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_northwind_Order_descriptor,
+ new java.lang.String[] { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode", "ShipCountry", "Lines", },
+ northwind.Nwind.Order.class,
+ northwind.Nwind.Order.Builder.class);
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_northwind_OrderLine_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_northwind_OrderLine_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_northwind_OrderLine_descriptor,
+ new java.lang.String[] { "OrderID", "ProductID", "UnitPrice", "Quantity", "Discount", },
+ northwind.Nwind.OrderLine.class,
+ northwind.Nwind.OrderLine.Builder.class);
+}