public Builder SetTransportationTask(global::atwork_pb_msgs.TransportationTask.Builder builderForValue) { pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); PrepareBuilder(); result.hasTransportationTask = true; result.transportationTask_ = builderForValue.Build(); return(this); }
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { PrepareBuilder(); pb::UnknownFieldSet.Builder unknownFields = null; uint tag; string field_name; while (input.ReadTag(out tag, out field_name)) { if (tag == 0 && field_name != null) { int field_ordinal = global::System.Array.BinarySearch(_taskFieldNames, field_name, global::System.StringComparer.Ordinal); if (field_ordinal >= 0) { tag = _taskFieldTags[field_ordinal]; } else { if (unknownFields == null) { unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); } ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); continue; } } switch (tag) { case 0: { throw pb::InvalidProtocolBufferException.InvalidTag(); } default: { if (pb::WireFormat.IsEndGroupTag(tag)) { if (unknownFields != null) { this.UnknownFields = unknownFields.Build(); } return(this); } if (unknownFields == null) { unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); } ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); break; } case 8: { result.hasId = input.ReadUInt64(ref result.id_); break; } case 16: { object unknown; if (input.ReadEnum(ref result.type_, out unknown)) { result.hasType = true; } else if (unknown is int) { if (unknownFields == null) { unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); } unknownFields.MergeVarintField(2, (ulong)(int)unknown); } break; } case 24: { object unknown; if (input.ReadEnum(ref result.status_, out unknown)) { result.hasStatus = true; } else if (unknown is int) { if (unknownFields == null) { unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); } unknownFields.MergeVarintField(3, (ulong)(int)unknown); } break; } case 34: { global::atwork_pb_msgs.TransportationTask.Builder subBuilder = global::atwork_pb_msgs.TransportationTask.CreateBuilder(); if (result.hasTransportationTask) { subBuilder.MergeFrom(TransportationTask); } input.ReadMessage(subBuilder, extensionRegistry); TransportationTask = subBuilder.BuildPartial(); break; } case 42: { global::atwork_pb_msgs.NavigationTask.Builder subBuilder = global::atwork_pb_msgs.NavigationTask.CreateBuilder(); if (result.hasNavigationTask) { subBuilder.MergeFrom(NavigationTask); } input.ReadMessage(subBuilder, extensionRegistry); NavigationTask = subBuilder.BuildPartial(); break; } } } if (unknownFields != null) { this.UnknownFields = unknownFields.Build(); } return(this); }