Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8: {
                    TraceId = input.ReadUInt64();
                    break;
                }

                case 18: {
                    global::Envoy.Api.V2.Core.HeaderMap subBuilder = new global::Envoy.Api.V2.Core.HeaderMap();
                    if (messagePieceCase_ == MessagePieceOneofCase.RequestHeaders)
                    {
                        subBuilder.MergeFrom(RequestHeaders);
                    }
                    input.ReadMessage(subBuilder);
                    RequestHeaders = subBuilder;
                    break;
                }

                case 26: {
                    global::Envoy.Data.Tap.V2Alpha.Body subBuilder = new global::Envoy.Data.Tap.V2Alpha.Body();
                    if (messagePieceCase_ == MessagePieceOneofCase.RequestBodyChunk)
                    {
                        subBuilder.MergeFrom(RequestBodyChunk);
                    }
                    input.ReadMessage(subBuilder);
                    RequestBodyChunk = subBuilder;
                    break;
                }

                case 34: {
                    global::Envoy.Api.V2.Core.HeaderMap subBuilder = new global::Envoy.Api.V2.Core.HeaderMap();
                    if (messagePieceCase_ == MessagePieceOneofCase.RequestTrailers)
                    {
                        subBuilder.MergeFrom(RequestTrailers);
                    }
                    input.ReadMessage(subBuilder);
                    RequestTrailers = subBuilder;
                    break;
                }

                case 42: {
                    global::Envoy.Api.V2.Core.HeaderMap subBuilder = new global::Envoy.Api.V2.Core.HeaderMap();
                    if (messagePieceCase_ == MessagePieceOneofCase.ResponseHeaders)
                    {
                        subBuilder.MergeFrom(ResponseHeaders);
                    }
                    input.ReadMessage(subBuilder);
                    ResponseHeaders = subBuilder;
                    break;
                }

                case 50: {
                    global::Envoy.Data.Tap.V2Alpha.Body subBuilder = new global::Envoy.Data.Tap.V2Alpha.Body();
                    if (messagePieceCase_ == MessagePieceOneofCase.ResponseBodyChunk)
                    {
                        subBuilder.MergeFrom(ResponseBodyChunk);
                    }
                    input.ReadMessage(subBuilder);
                    ResponseBodyChunk = subBuilder;
                    break;
                }

                case 58: {
                    global::Envoy.Api.V2.Core.HeaderMap subBuilder = new global::Envoy.Api.V2.Core.HeaderMap();
                    if (messagePieceCase_ == MessagePieceOneofCase.ResponseTrailers)
                    {
                        subBuilder.MergeFrom(ResponseTrailers);
                    }
                    input.ReadMessage(subBuilder);
                    ResponseTrailers = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
        public void MergeFrom(HttpStreamedTraceSegment other)
        {
            if (other == null)
            {
                return;
            }
            if (other.TraceId != 0UL)
            {
                TraceId = other.TraceId;
            }
            switch (other.MessagePieceCase)
            {
            case MessagePieceOneofCase.RequestHeaders:
                if (RequestHeaders == null)
                {
                    RequestHeaders = new global::Envoy.Api.V2.Core.HeaderMap();
                }
                RequestHeaders.MergeFrom(other.RequestHeaders);
                break;

            case MessagePieceOneofCase.RequestBodyChunk:
                if (RequestBodyChunk == null)
                {
                    RequestBodyChunk = new global::Envoy.Data.Tap.V2Alpha.Body();
                }
                RequestBodyChunk.MergeFrom(other.RequestBodyChunk);
                break;

            case MessagePieceOneofCase.RequestTrailers:
                if (RequestTrailers == null)
                {
                    RequestTrailers = new global::Envoy.Api.V2.Core.HeaderMap();
                }
                RequestTrailers.MergeFrom(other.RequestTrailers);
                break;

            case MessagePieceOneofCase.ResponseHeaders:
                if (ResponseHeaders == null)
                {
                    ResponseHeaders = new global::Envoy.Api.V2.Core.HeaderMap();
                }
                ResponseHeaders.MergeFrom(other.ResponseHeaders);
                break;

            case MessagePieceOneofCase.ResponseBodyChunk:
                if (ResponseBodyChunk == null)
                {
                    ResponseBodyChunk = new global::Envoy.Data.Tap.V2Alpha.Body();
                }
                ResponseBodyChunk.MergeFrom(other.ResponseBodyChunk);
                break;

            case MessagePieceOneofCase.ResponseTrailers:
                if (ResponseTrailers == null)
                {
                    ResponseTrailers = new global::Envoy.Api.V2.Core.HeaderMap();
                }
                ResponseTrailers.MergeFrom(other.ResponseTrailers);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }