diff options
Diffstat (limited to 'csharp/TestBed/NorthwindProtoFile.cs')
-rw-r--r-- | csharp/TestBed/NorthwindProtoFile.cs | 1636 |
1 files changed, 1636 insertions, 0 deletions
diff --git a/csharp/TestBed/NorthwindProtoFile.cs b/csharp/TestBed/NorthwindProtoFile.cs new file mode 100644 index 00000000..22f223f9 --- /dev/null +++ b/csharp/TestBed/NorthwindProtoFile.cs @@ -0,0 +1,1636 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +using pb = global::Google.ProtocolBuffers; +using pbc = global::Google.ProtocolBuffers.Collections; +using pbd = global::Google.ProtocolBuffers.Descriptors; +using scg = global::System.Collections.Generic; +namespace Northwind { + + public static partial class NorthwindProtoFile { + + #region Descriptor + public static pbd::FileDescriptor Descriptor { + get { return descriptor; } + } + private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom ( + new byte[] { + 0x0a, 0x0b, 0x6e, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6e, 0x6f, 0x72, 0x74, 0x68, + 0x77, 0x69, 0x6e, 0x64, 0x1a, 0x09, 0x62, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x08, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x06, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x22, 0xfa, 0x02, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0f, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x12, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x45, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, + 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x20, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x22, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x70, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0f, 0x0a, 0x07, 0x53, + 0x68, 0x69, 0x70, 0x56, 0x69, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x12, 0x1d, 0x0a, 0x07, 0x46, 0x72, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x65, 0x63, 0x69, + 0x6d, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x08, 0x53, 0x68, 0x69, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x53, 0x68, 0x69, 0x70, 0x43, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x12, 0x12, 0x0a, 0x0a, 0x53, 0x68, 0x69, 0x70, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x12, 0x16, 0x0a, 0x0e, 0x53, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x65, 0x22, 0x74, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x0f, 0x0a, 0x07, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x11, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x12, 0x1f, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x63, 0x6c, 0x2e, 0x44, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x11, 0x12, 0x10, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, + 0x42, 0x23, 0x48, 0x01, 0xc2, 0x3e, 0x09, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0xca, 0x3e, 0x12, 0x4e, + 0x6f, 0x72, 0x74, 0x68, 0x77, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, + }, new pbd::FileDescriptor[] { + global::Google.ProtocolBuffers.Bcl.BclProtoFile.Descriptor, + }); + #endregion + + #region Extensions + #endregion + + #region Static variables + internal static readonly pbd::MessageDescriptor internal__static_northwind_Database__Descriptor + = Descriptor.MessageTypes[0]; + internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.Database, global::Northwind.Database.Builder> internal__static_northwind_Database__FieldAccessorTable + = new pb::FieldAccess.FieldAccessorTable<global::Northwind.Database, global::Northwind.Database.Builder>(internal__static_northwind_Database__Descriptor, + new string[] { "Orders", }); + internal static readonly pbd::MessageDescriptor internal__static_northwind_Order__Descriptor + = Descriptor.MessageTypes[1]; + internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.Order, global::Northwind.Order.Builder> internal__static_northwind_Order__FieldAccessorTable + = new pb::FieldAccess.FieldAccessorTable<global::Northwind.Order, global::Northwind.Order.Builder>(internal__static_northwind_Order__Descriptor, + new string[] { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode", "ShipCountry", "Lines", }); + internal static readonly pbd::MessageDescriptor internal__static_northwind_OrderLine__Descriptor + = Descriptor.MessageTypes[2]; + internal static pb::FieldAccess.FieldAccessorTable<global::Northwind.OrderLine, global::Northwind.OrderLine.Builder> internal__static_northwind_OrderLine__FieldAccessorTable + = new pb::FieldAccess.FieldAccessorTable<global::Northwind.OrderLine, global::Northwind.OrderLine.Builder>(internal__static_northwind_OrderLine__Descriptor, + new string[] { "OrderID", "ProductID", "UnitPrice", "Quantity", "Discount", }); + #endregion + + } + + #region Enums + #endregion + + #region Messages + public sealed partial class Database : pb::GeneratedMessage<Database, Database.Builder> { + private static readonly Database defaultInstance = new Database(); + public static Database DefaultInstance { + get { return defaultInstance; } + } + + public override Database DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override Database ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Database__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable<Database, Database.Builder> InternalFieldAccessors { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Database__FieldAccessorTable; } + } + + // repeated .northwind.Order Orders = 1; + private scg::IList<global::Northwind.Order> orders_ = pbc::Lists<global::Northwind.Order>.Empty; + public scg::IList<global::Northwind.Order> OrdersList { + get { return orders_; } + } + public int OrdersCount + { get { return orders_.Count; } + } + public global::Northwind.Order GetOrders(int index) { + return orders_ [index]; + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + foreach (global::Northwind.Order element in OrdersList) { + output.WriteMessage(1, element); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + foreach (global::Northwind.Order element in OrdersList) { + size += pb::CodedOutputStream.ComputeMessageSize(1, element); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static global::Northwind.Database ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.Database ParseFrom(pb::ByteString data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Database ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.Database ParseFrom(byte[] data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Database ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.Database ParseFrom( + global::System.IO.Stream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Database ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.Database ParseFrom(pb::CodedInputStream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + + public static Builder CreateBuilder() { return new Builder(); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(global::Northwind.Database prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.Database, Builder> { + protected override Builder ThisBuilder { + get { return this; } + } + + // Construct using global::Northwind.Database.CreateBuilder() + internal Builder() {} + + global::Northwind.Database result = new global::Northwind.Database(); + + protected override global::Northwind.Database MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new global::Northwind.Database(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Northwind.Database.Descriptor; } + } + + public override global::Northwind.Database DefaultInstanceForType { + get { return global::Northwind.Database.DefaultInstance; } + } + + public override global::Northwind.Database BuildPartial() { + if (result.orders_ != pbc::Lists<global::Northwind.Order>.Empty) { + result.orders_ = pbc::Lists<global::Northwind.Order>.AsReadOnly(result.orders_); + } + global::Northwind.Database returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is global::Northwind.Database) { + return MergeFrom((global::Northwind.Database) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(global::Northwind.Database other) { + if (other == global::Northwind.Database.DefaultInstance) return this; + if (other.orders_.Count != 0) { + if (result.orders_.Count == 0) { + result.orders_ = new scg::List<global::Northwind.Order>(); + } + base.AddRange(other.orders_, result.orders_); + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = + pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: + this.UnknownFields = unknownFields.Build(); + return this; + default: { + if (!ParseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.UnknownFields = unknownFields.Build(); + return this; + } + break; + } + case 10: { + global::Northwind.Order.Builder subBuilder = global::Northwind.Order.CreateBuilder(); + input.ReadMessage(subBuilder, extensionRegistry); + AddOrders(subBuilder.BuildPartial()); + break; + } + } + } + } + + + // repeated .northwind.Order Orders = 1; + public scg::IList<global::Northwind.Order> OrdersList { + get { return pbc::Lists.AsReadOnly(result.orders_); } + } + public int OrdersCount { + get { return result.OrdersCount; } + } + public global::Northwind.Order GetOrders(int index) { + return result.GetOrders(index); + } + public Builder SetOrders(int index, global::Northwind.Order value) { + result.orders_[index] = value; + return this; + } + public Builder SetOrders(int index, global::Northwind.Order.Builder builderForValue) { + result.orders_[index] = builderForValue.Build(); + return this; + } + public Builder AddOrders(global::Northwind.Order value) { + if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) { + result.orders_ = new scg::List<global::Northwind.Order>(); + } + result.orders_.Add(value); + return this; + } + public Builder AddOrders(global::Northwind.Order.Builder builderForValue) { + if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) { + result.orders_ = new scg::List<global::Northwind.Order>(); + } + result.orders_.Add(builderForValue.Build()); + return this; + } + public Builder AddRangeOrders(scg::IEnumerable<global::Northwind.Order> values) { + if (result.orders_ == pbc::Lists<global::Northwind.Order>.Empty) { + result.orders_ = new scg::List<global::Northwind.Order>(); + } + base.AddRange(values, result.orders_); + return this; + } + public Builder ClearOrders() { + result.orders_ = pbc::Lists<global::Northwind.Order>.Empty; + return this; + } + } + } + + public sealed partial class Order : pb::GeneratedMessage<Order, Order.Builder> { + private static readonly Order defaultInstance = new Order(); + public static Order DefaultInstance { + get { return defaultInstance; } + } + + public override Order DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override Order ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Order__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable<Order, Order.Builder> InternalFieldAccessors { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_Order__FieldAccessorTable; } + } + + // optional int32 OrderID = 1; + private bool hasOrderID; + private int orderID_ = 0; + public bool HasOrderID { + get { return hasOrderID; } + } + public int OrderID { + get { return orderID_; } + } + + // optional string CustomerID = 2; + private bool hasCustomerID; + private string customerID_ = ""; + public bool HasCustomerID { + get { return hasCustomerID; } + } + public string CustomerID { + get { return customerID_; } + } + + // optional int32 EmployeeID = 3; + private bool hasEmployeeID; + private int employeeID_ = 0; + public bool HasEmployeeID { + get { return hasEmployeeID; } + } + public int EmployeeID { + get { return employeeID_; } + } + + // optional .bcl.DateTime OrderDate = 4; + private bool hasOrderDate; + private global::Google.ProtocolBuffers.Bcl.DateTime orderDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + public bool HasOrderDate { + get { return hasOrderDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime OrderDate { + get { return orderDate_; } + } + + // optional .bcl.DateTime RequiredDate = 5; + private bool hasRequiredDate; + private global::Google.ProtocolBuffers.Bcl.DateTime requiredDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + public bool HasRequiredDate { + get { return hasRequiredDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime RequiredDate { + get { return requiredDate_; } + } + + // optional .bcl.DateTime ShippedDate = 6; + private bool hasShippedDate; + private global::Google.ProtocolBuffers.Bcl.DateTime shippedDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + public bool HasShippedDate { + get { return hasShippedDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime ShippedDate { + get { return shippedDate_; } + } + + // optional int32 ShipVia = 7; + private bool hasShipVia; + private int shipVia_ = 0; + public bool HasShipVia { + get { return hasShipVia; } + } + public int ShipVia { + get { return shipVia_; } + } + + // optional .bcl.Decimal Freight = 8; + private bool hasFreight; + private global::Google.ProtocolBuffers.Bcl.Decimal freight_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance; + public bool HasFreight { + get { return hasFreight; } + } + public global::Google.ProtocolBuffers.Bcl.Decimal Freight { + get { return freight_; } + } + + // optional string ShipName = 9; + private bool hasShipName; + private string shipName_ = ""; + public bool HasShipName { + get { return hasShipName; } + } + public string ShipName { + get { return shipName_; } + } + + // optional string ShipAddress = 10; + private bool hasShipAddress; + private string shipAddress_ = ""; + public bool HasShipAddress { + get { return hasShipAddress; } + } + public string ShipAddress { + get { return shipAddress_; } + } + + // optional string ShipCity = 11; + private bool hasShipCity; + private string shipCity_ = ""; + public bool HasShipCity { + get { return hasShipCity; } + } + public string ShipCity { + get { return shipCity_; } + } + + // optional string ShipRegion = 12; + private bool hasShipRegion; + private string shipRegion_ = ""; + public bool HasShipRegion { + get { return hasShipRegion; } + } + public string ShipRegion { + get { return shipRegion_; } + } + + // optional string ShipPostalCode = 13; + private bool hasShipPostalCode; + private string shipPostalCode_ = ""; + public bool HasShipPostalCode { + get { return hasShipPostalCode; } + } + public string ShipPostalCode { + get { return shipPostalCode_; } + } + + // optional string ShipCountry = 14; + private bool hasShipCountry; + private string shipCountry_ = ""; + public bool HasShipCountry { + get { return hasShipCountry; } + } + public string ShipCountry { + get { return shipCountry_; } + } + + // repeated .northwind.OrderLine Lines = 15; + private scg::IList<global::Northwind.OrderLine> lines_ = pbc::Lists<global::Northwind.OrderLine>.Empty; + public scg::IList<global::Northwind.OrderLine> LinesList { + get { return lines_; } + } + public int LinesCount + { get { return lines_.Count; } + } + public global::Northwind.OrderLine GetLines(int index) { + return lines_ [index]; + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + if (HasOrderID) { + output.WriteInt32(1, OrderID); + } + if (HasCustomerID) { + output.WriteString(2, CustomerID); + } + if (HasEmployeeID) { + output.WriteInt32(3, EmployeeID); + } + if (HasOrderDate) { + output.WriteMessage(4, OrderDate); + } + if (HasRequiredDate) { + output.WriteMessage(5, RequiredDate); + } + if (HasShippedDate) { + output.WriteMessage(6, ShippedDate); + } + if (HasShipVia) { + output.WriteInt32(7, ShipVia); + } + if (HasFreight) { + output.WriteMessage(8, Freight); + } + if (HasShipName) { + output.WriteString(9, ShipName); + } + if (HasShipAddress) { + output.WriteString(10, ShipAddress); + } + if (HasShipCity) { + output.WriteString(11, ShipCity); + } + if (HasShipRegion) { + output.WriteString(12, ShipRegion); + } + if (HasShipPostalCode) { + output.WriteString(13, ShipPostalCode); + } + if (HasShipCountry) { + output.WriteString(14, ShipCountry); + } + foreach (global::Northwind.OrderLine element in LinesList) { + output.WriteMessage(15, element); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (HasOrderID) { + size += pb::CodedOutputStream.ComputeInt32Size(1, OrderID); + } + if (HasCustomerID) { + size += pb::CodedOutputStream.ComputeStringSize(2, CustomerID); + } + if (HasEmployeeID) { + size += pb::CodedOutputStream.ComputeInt32Size(3, EmployeeID); + } + if (HasOrderDate) { + size += pb::CodedOutputStream.ComputeMessageSize(4, OrderDate); + } + if (HasRequiredDate) { + size += pb::CodedOutputStream.ComputeMessageSize(5, RequiredDate); + } + if (HasShippedDate) { + size += pb::CodedOutputStream.ComputeMessageSize(6, ShippedDate); + } + if (HasShipVia) { + size += pb::CodedOutputStream.ComputeInt32Size(7, ShipVia); + } + if (HasFreight) { + size += pb::CodedOutputStream.ComputeMessageSize(8, Freight); + } + if (HasShipName) { + size += pb::CodedOutputStream.ComputeStringSize(9, ShipName); + } + if (HasShipAddress) { + size += pb::CodedOutputStream.ComputeStringSize(10, ShipAddress); + } + if (HasShipCity) { + size += pb::CodedOutputStream.ComputeStringSize(11, ShipCity); + } + if (HasShipRegion) { + size += pb::CodedOutputStream.ComputeStringSize(12, ShipRegion); + } + if (HasShipPostalCode) { + size += pb::CodedOutputStream.ComputeStringSize(13, ShipPostalCode); + } + if (HasShipCountry) { + size += pb::CodedOutputStream.ComputeStringSize(14, ShipCountry); + } + foreach (global::Northwind.OrderLine element in LinesList) { + size += pb::CodedOutputStream.ComputeMessageSize(15, element); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static global::Northwind.Order ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.Order ParseFrom(pb::ByteString data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Order ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.Order ParseFrom(byte[] data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Order ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.Order ParseFrom( + global::System.IO.Stream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.Order ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.Order ParseFrom(pb::CodedInputStream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + + public static Builder CreateBuilder() { return new Builder(); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(global::Northwind.Order prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.Order, Builder> { + protected override Builder ThisBuilder { + get { return this; } + } + + // Construct using global::Northwind.Order.CreateBuilder() + internal Builder() {} + + global::Northwind.Order result = new global::Northwind.Order(); + + protected override global::Northwind.Order MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new global::Northwind.Order(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Northwind.Order.Descriptor; } + } + + public override global::Northwind.Order DefaultInstanceForType { + get { return global::Northwind.Order.DefaultInstance; } + } + + public override global::Northwind.Order BuildPartial() { + if (result.lines_ != pbc::Lists<global::Northwind.OrderLine>.Empty) { + result.lines_ = pbc::Lists<global::Northwind.OrderLine>.AsReadOnly(result.lines_); + } + global::Northwind.Order returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is global::Northwind.Order) { + return MergeFrom((global::Northwind.Order) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(global::Northwind.Order other) { + if (other == global::Northwind.Order.DefaultInstance) return this; + if (other.HasOrderID) { + OrderID = other.OrderID; + } + if (other.HasCustomerID) { + CustomerID = other.CustomerID; + } + if (other.HasEmployeeID) { + EmployeeID = other.EmployeeID; + } + if (other.HasOrderDate) { + MergeOrderDate(other.OrderDate); + } + if (other.HasRequiredDate) { + MergeRequiredDate(other.RequiredDate); + } + if (other.HasShippedDate) { + MergeShippedDate(other.ShippedDate); + } + if (other.HasShipVia) { + ShipVia = other.ShipVia; + } + if (other.HasFreight) { + MergeFreight(other.Freight); + } + if (other.HasShipName) { + ShipName = other.ShipName; + } + if (other.HasShipAddress) { + ShipAddress = other.ShipAddress; + } + if (other.HasShipCity) { + ShipCity = other.ShipCity; + } + if (other.HasShipRegion) { + ShipRegion = other.ShipRegion; + } + if (other.HasShipPostalCode) { + ShipPostalCode = other.ShipPostalCode; + } + if (other.HasShipCountry) { + ShipCountry = other.ShipCountry; + } + if (other.lines_.Count != 0) { + if (result.lines_.Count == 0) { + result.lines_ = new scg::List<global::Northwind.OrderLine>(); + } + base.AddRange(other.lines_, result.lines_); + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = + pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: + this.UnknownFields = unknownFields.Build(); + return this; + default: { + if (!ParseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.UnknownFields = unknownFields.Build(); + return this; + } + break; + } + case 8: { + OrderID = input.ReadInt32(); + break; + } + case 18: { + CustomerID = input.ReadString(); + break; + } + case 24: { + EmployeeID = input.ReadInt32(); + break; + } + case 34: { + global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(); + if (HasOrderDate) { + subBuilder.MergeFrom(OrderDate); + } + input.ReadMessage(subBuilder, extensionRegistry); + OrderDate = subBuilder.BuildPartial(); + break; + } + case 42: { + global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(); + if (HasRequiredDate) { + subBuilder.MergeFrom(RequiredDate); + } + input.ReadMessage(subBuilder, extensionRegistry); + RequiredDate = subBuilder.BuildPartial(); + break; + } + case 50: { + global::Google.ProtocolBuffers.Bcl.DateTime.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(); + if (HasShippedDate) { + subBuilder.MergeFrom(ShippedDate); + } + input.ReadMessage(subBuilder, extensionRegistry); + ShippedDate = subBuilder.BuildPartial(); + break; + } + case 56: { + ShipVia = input.ReadInt32(); + break; + } + case 66: { + global::Google.ProtocolBuffers.Bcl.Decimal.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(); + if (HasFreight) { + subBuilder.MergeFrom(Freight); + } + input.ReadMessage(subBuilder, extensionRegistry); + Freight = subBuilder.BuildPartial(); + break; + } + case 74: { + ShipName = input.ReadString(); + break; + } + case 82: { + ShipAddress = input.ReadString(); + break; + } + case 90: { + ShipCity = input.ReadString(); + break; + } + case 98: { + ShipRegion = input.ReadString(); + break; + } + case 106: { + ShipPostalCode = input.ReadString(); + break; + } + case 114: { + ShipCountry = input.ReadString(); + break; + } + case 122: { + global::Northwind.OrderLine.Builder subBuilder = global::Northwind.OrderLine.CreateBuilder(); + input.ReadMessage(subBuilder, extensionRegistry); + AddLines(subBuilder.BuildPartial()); + break; + } + } + } + } + + + // optional int32 OrderID = 1; + public bool HasOrderID { + get { return result.HasOrderID; } + } + public int OrderID { + get { return result.OrderID; } + set { SetOrderID(value); } + } + 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 bool HasCustomerID { + get { return result.HasCustomerID; } + } + public string CustomerID { + get { return result.CustomerID; } + set { SetCustomerID(value); } + } + public Builder SetCustomerID(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 bool HasEmployeeID { + get { return result.HasEmployeeID; } + } + public int EmployeeID { + get { return result.EmployeeID; } + set { SetEmployeeID(value); } + } + 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 bool HasOrderDate { + get { return result.HasOrderDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime OrderDate { + get { return result.OrderDate; } + set { SetOrderDate(value); } + } + public Builder SetOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + result.hasOrderDate = true; + result.orderDate_ = value; + return this; + } + public Builder SetOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) { + result.hasOrderDate = true; + result.orderDate_ = builderForValue.Build(); + return this; + } + public Builder MergeOrderDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + if (result.HasOrderDate && + result.orderDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) { + result.orderDate_ = + global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.orderDate_).MergeFrom(value).BuildPartial(); + } else { + result.orderDate_ = value; + } + result.hasOrderDate = true; + return this; + } + public Builder ClearOrderDate() { + result.hasOrderDate = false; + result.orderDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + return this; + } + + // optional .bcl.DateTime RequiredDate = 5; + public bool HasRequiredDate { + get { return result.HasRequiredDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime RequiredDate { + get { return result.RequiredDate; } + set { SetRequiredDate(value); } + } + public Builder SetRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + result.hasRequiredDate = true; + result.requiredDate_ = value; + return this; + } + public Builder SetRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) { + result.hasRequiredDate = true; + result.requiredDate_ = builderForValue.Build(); + return this; + } + public Builder MergeRequiredDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + if (result.HasRequiredDate && + result.requiredDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) { + result.requiredDate_ = + global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.requiredDate_).MergeFrom(value).BuildPartial(); + } else { + result.requiredDate_ = value; + } + result.hasRequiredDate = true; + return this; + } + public Builder ClearRequiredDate() { + result.hasRequiredDate = false; + result.requiredDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + return this; + } + + // optional .bcl.DateTime ShippedDate = 6; + public bool HasShippedDate { + get { return result.HasShippedDate; } + } + public global::Google.ProtocolBuffers.Bcl.DateTime ShippedDate { + get { return result.ShippedDate; } + set { SetShippedDate(value); } + } + public Builder SetShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + result.hasShippedDate = true; + result.shippedDate_ = value; + return this; + } + public Builder SetShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime.Builder builderForValue) { + result.hasShippedDate = true; + result.shippedDate_ = builderForValue.Build(); + return this; + } + public Builder MergeShippedDate(global::Google.ProtocolBuffers.Bcl.DateTime value) { + if (result.HasShippedDate && + result.shippedDate_ != global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance) { + result.shippedDate_ = + global::Google.ProtocolBuffers.Bcl.DateTime.CreateBuilder(result.shippedDate_).MergeFrom(value).BuildPartial(); + } else { + result.shippedDate_ = value; + } + result.hasShippedDate = true; + return this; + } + public Builder ClearShippedDate() { + result.hasShippedDate = false; + result.shippedDate_ = global::Google.ProtocolBuffers.Bcl.DateTime.DefaultInstance; + return this; + } + + // optional int32 ShipVia = 7; + public bool HasShipVia { + get { return result.HasShipVia; } + } + public int ShipVia { + get { return result.ShipVia; } + set { SetShipVia(value); } + } + 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 bool HasFreight { + get { return result.HasFreight; } + } + public global::Google.ProtocolBuffers.Bcl.Decimal Freight { + get { return result.Freight; } + set { SetFreight(value); } + } + public Builder SetFreight(global::Google.ProtocolBuffers.Bcl.Decimal value) { + result.hasFreight = true; + result.freight_ = value; + return this; + } + public Builder SetFreight(global::Google.ProtocolBuffers.Bcl.Decimal.Builder builderForValue) { + result.hasFreight = true; + result.freight_ = builderForValue.Build(); + return this; + } + public Builder MergeFreight(global::Google.ProtocolBuffers.Bcl.Decimal value) { + if (result.HasFreight && + result.freight_ != global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance) { + result.freight_ = + global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(result.freight_).MergeFrom(value).BuildPartial(); + } else { + result.freight_ = value; + } + result.hasFreight = true; + return this; + } + public Builder ClearFreight() { + result.hasFreight = false; + result.freight_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance; + return this; + } + + // optional string ShipName = 9; + public bool HasShipName { + get { return result.HasShipName; } + } + public string ShipName { + get { return result.ShipName; } + set { SetShipName(value); } + } + public Builder SetShipName(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 bool HasShipAddress { + get { return result.HasShipAddress; } + } + public string ShipAddress { + get { return result.ShipAddress; } + set { SetShipAddress(value); } + } + public Builder SetShipAddress(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 bool HasShipCity { + get { return result.HasShipCity; } + } + public string ShipCity { + get { return result.ShipCity; } + set { SetShipCity(value); } + } + public Builder SetShipCity(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 bool HasShipRegion { + get { return result.HasShipRegion; } + } + public string ShipRegion { + get { return result.ShipRegion; } + set { SetShipRegion(value); } + } + public Builder SetShipRegion(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 bool HasShipPostalCode { + get { return result.HasShipPostalCode; } + } + public string ShipPostalCode { + get { return result.ShipPostalCode; } + set { SetShipPostalCode(value); } + } + public Builder SetShipPostalCode(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 bool HasShipCountry { + get { return result.HasShipCountry; } + } + public string ShipCountry { + get { return result.ShipCountry; } + set { SetShipCountry(value); } + } + public Builder SetShipCountry(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 scg::IList<global::Northwind.OrderLine> LinesList { + get { return pbc::Lists.AsReadOnly(result.lines_); } + } + public int LinesCount { + get { return result.LinesCount; } + } + public global::Northwind.OrderLine GetLines(int index) { + return result.GetLines(index); + } + public Builder SetLines(int index, global::Northwind.OrderLine value) { + result.lines_[index] = value; + return this; + } + public Builder SetLines(int index, global::Northwind.OrderLine.Builder builderForValue) { + result.lines_[index] = builderForValue.Build(); + return this; + } + public Builder AddLines(global::Northwind.OrderLine value) { + if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) { + result.lines_ = new scg::List<global::Northwind.OrderLine>(); + } + result.lines_.Add(value); + return this; + } + public Builder AddLines(global::Northwind.OrderLine.Builder builderForValue) { + if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) { + result.lines_ = new scg::List<global::Northwind.OrderLine>(); + } + result.lines_.Add(builderForValue.Build()); + return this; + } + public Builder AddRangeLines(scg::IEnumerable<global::Northwind.OrderLine> values) { + if (result.lines_ == pbc::Lists<global::Northwind.OrderLine>.Empty) { + result.lines_ = new scg::List<global::Northwind.OrderLine>(); + } + base.AddRange(values, result.lines_); + return this; + } + public Builder ClearLines() { + result.lines_ = pbc::Lists<global::Northwind.OrderLine>.Empty; + return this; + } + } + } + + public sealed partial class OrderLine : pb::GeneratedMessage<OrderLine, OrderLine.Builder> { + private static readonly OrderLine defaultInstance = new OrderLine(); + public static OrderLine DefaultInstance { + get { return defaultInstance; } + } + + public override OrderLine DefaultInstanceForType { + get { return defaultInstance; } + } + + protected override OrderLine ThisMessage { + get { return this; } + } + + public static pbd::MessageDescriptor Descriptor { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_OrderLine__Descriptor; } + } + + protected override pb::FieldAccess.FieldAccessorTable<OrderLine, OrderLine.Builder> InternalFieldAccessors { + get { return global::Northwind.NorthwindProtoFile.internal__static_northwind_OrderLine__FieldAccessorTable; } + } + + // optional int32 OrderID = 1; + private bool hasOrderID; + private int orderID_ = 0; + public bool HasOrderID { + get { return hasOrderID; } + } + public int OrderID { + get { return orderID_; } + } + + // optional int32 ProductID = 2; + private bool hasProductID; + private int productID_ = 0; + public bool HasProductID { + get { return hasProductID; } + } + public int ProductID { + get { return productID_; } + } + + // optional .bcl.Decimal UnitPrice = 3; + private bool hasUnitPrice; + private global::Google.ProtocolBuffers.Bcl.Decimal unitPrice_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance; + public bool HasUnitPrice { + get { return hasUnitPrice; } + } + public global::Google.ProtocolBuffers.Bcl.Decimal UnitPrice { + get { return unitPrice_; } + } + + // optional sint32 Quantity = 4; + private bool hasQuantity; + private int quantity_ = 0; + public bool HasQuantity { + get { return hasQuantity; } + } + public int Quantity { + get { return quantity_; } + } + + // optional float Discount = 5; + private bool hasDiscount; + private float discount_ = 0F; + public bool HasDiscount { + get { return hasDiscount; } + } + public float Discount { + get { return discount_; } + } + + public override bool IsInitialized { + get { + return true; + } + } + + public override void WriteTo(pb::CodedOutputStream output) { + if (HasOrderID) { + output.WriteInt32(1, OrderID); + } + if (HasProductID) { + output.WriteInt32(2, ProductID); + } + if (HasUnitPrice) { + output.WriteMessage(3, UnitPrice); + } + if (HasQuantity) { + output.WriteSInt32(4, Quantity); + } + if (HasDiscount) { + output.WriteFloat(5, Discount); + } + UnknownFields.WriteTo(output); + } + + private int memoizedSerializedSize = -1; + public override int SerializedSize { + get { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (HasOrderID) { + size += pb::CodedOutputStream.ComputeInt32Size(1, OrderID); + } + if (HasProductID) { + size += pb::CodedOutputStream.ComputeInt32Size(2, ProductID); + } + if (HasUnitPrice) { + size += pb::CodedOutputStream.ComputeMessageSize(3, UnitPrice); + } + if (HasQuantity) { + size += pb::CodedOutputStream.ComputeSInt32Size(4, Quantity); + } + if (HasDiscount) { + size += pb::CodedOutputStream.ComputeFloatSize(5, Discount); + } + size += UnknownFields.SerializedSize; + memoizedSerializedSize = size; + return size; + } + } + + public static global::Northwind.OrderLine ParseFrom(pb::ByteString data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(pb::ByteString data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(byte[] data) { + return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(byte[] data, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(global::System.IO.Stream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom( + global::System.IO.Stream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(pb::CodedInputStream input) { + return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); + } + public static global::Northwind.OrderLine ParseFrom(pb::CodedInputStream input, + pb::ExtensionRegistry extensionRegistry) { + return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) + .BuildParsed(); + } + + public static Builder CreateBuilder() { return new Builder(); } + public override Builder CreateBuilderForType() { return new Builder(); } + public static Builder CreateBuilder(global::Northwind.OrderLine prototype) { + return (Builder) new Builder().MergeFrom(prototype); + } + + public sealed partial class Builder : pb::GeneratedBuilder<global::Northwind.OrderLine, Builder> { + protected override Builder ThisBuilder { + get { return this; } + } + + // Construct using global::Northwind.OrderLine.CreateBuilder() + internal Builder() {} + + global::Northwind.OrderLine result = new global::Northwind.OrderLine(); + + protected override global::Northwind.OrderLine MessageBeingBuilt { + get { return result; } + } + + public override Builder Clear() { + result = new global::Northwind.OrderLine(); + return this; + } + + public override Builder Clone() { + return new Builder().MergeFrom(result); + } + + public override pbd::MessageDescriptor DescriptorForType { + get { return global::Northwind.OrderLine.Descriptor; } + } + + public override global::Northwind.OrderLine DefaultInstanceForType { + get { return global::Northwind.OrderLine.DefaultInstance; } + } + + public override global::Northwind.OrderLine BuildPartial() { + global::Northwind.OrderLine returnMe = result; + result = null; + return returnMe; + } + + public override Builder MergeFrom(pb::IMessage other) { + if (other is global::Northwind.OrderLine) { + return MergeFrom((global::Northwind.OrderLine) other); + } else { + base.MergeFrom(other); + return this; + } + } + + public override Builder MergeFrom(global::Northwind.OrderLine other) { + if (other == global::Northwind.OrderLine.DefaultInstance) return this; + if (other.HasOrderID) { + OrderID = other.OrderID; + } + if (other.HasProductID) { + ProductID = other.ProductID; + } + if (other.HasUnitPrice) { + MergeUnitPrice(other.UnitPrice); + } + if (other.HasQuantity) { + Quantity = other.Quantity; + } + if (other.HasDiscount) { + Discount = other.Discount; + } + this.MergeUnknownFields(other.UnknownFields); + return this; + } + + public override Builder MergeFrom(pb::CodedInputStream input) { + return MergeFrom(input, pb::ExtensionRegistry.Empty); + } + + public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { + pb::UnknownFieldSet.Builder unknownFields = + pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); + while (true) { + uint tag = input.ReadTag(); + switch (tag) { + case 0: + this.UnknownFields = unknownFields.Build(); + return this; + default: { + if (!ParseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.UnknownFields = unknownFields.Build(); + return this; + } + break; + } + case 8: { + OrderID = input.ReadInt32(); + break; + } + case 16: { + ProductID = input.ReadInt32(); + break; + } + case 26: { + global::Google.ProtocolBuffers.Bcl.Decimal.Builder subBuilder = global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(); + if (HasUnitPrice) { + subBuilder.MergeFrom(UnitPrice); + } + input.ReadMessage(subBuilder, extensionRegistry); + UnitPrice = subBuilder.BuildPartial(); + break; + } + case 32: { + Quantity = input.ReadSInt32(); + break; + } + case 45: { + Discount = input.ReadFloat(); + break; + } + } + } + } + + + // optional int32 OrderID = 1; + public bool HasOrderID { + get { return result.HasOrderID; } + } + public int OrderID { + get { return result.OrderID; } + set { SetOrderID(value); } + } + 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 bool HasProductID { + get { return result.HasProductID; } + } + public int ProductID { + get { return result.ProductID; } + set { SetProductID(value); } + } + 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 bool HasUnitPrice { + get { return result.HasUnitPrice; } + } + public global::Google.ProtocolBuffers.Bcl.Decimal UnitPrice { + get { return result.UnitPrice; } + set { SetUnitPrice(value); } + } + public Builder SetUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal value) { + result.hasUnitPrice = true; + result.unitPrice_ = value; + return this; + } + public Builder SetUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal.Builder builderForValue) { + result.hasUnitPrice = true; + result.unitPrice_ = builderForValue.Build(); + return this; + } + public Builder MergeUnitPrice(global::Google.ProtocolBuffers.Bcl.Decimal value) { + if (result.HasUnitPrice && + result.unitPrice_ != global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance) { + result.unitPrice_ = + global::Google.ProtocolBuffers.Bcl.Decimal.CreateBuilder(result.unitPrice_).MergeFrom(value).BuildPartial(); + } else { + result.unitPrice_ = value; + } + result.hasUnitPrice = true; + return this; + } + public Builder ClearUnitPrice() { + result.hasUnitPrice = false; + result.unitPrice_ = global::Google.ProtocolBuffers.Bcl.Decimal.DefaultInstance; + return this; + } + + // optional sint32 Quantity = 4; + public bool HasQuantity { + get { return result.HasQuantity; } + } + public int Quantity { + get { return result.Quantity; } + set { SetQuantity(value); } + } + 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 bool HasDiscount { + get { return result.HasDiscount; } + } + public float Discount { + get { return result.Discount; } + set { SetDiscount(value); } + } + public Builder SetDiscount(float value) { + result.hasDiscount = true; + result.discount_ = value; + return this; + } + public Builder ClearDiscount() { + result.hasDiscount = false; + result.discount_ = 0F; + return this; + } + } + } + + #endregion + + #region Services + #endregion +} |