Exemplo n.º 1
0
        public void MergeFrom(StreamAccessLogsMessage other)
        {
            if (other == null)
            {
                return;
            }
            if (other.identifier_ != null)
            {
                if (identifier_ == null)
                {
                    Identifier = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.Identifier();
                }
                Identifier.MergeFrom(other.Identifier);
            }
            switch (other.LogEntriesCase)
            {
            case LogEntriesOneofCase.HttpLogs:
                if (HttpLogs == null)
                {
                    HttpLogs = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.HTTPAccessLogEntries();
                }
                HttpLogs.MergeFrom(other.HttpLogs);
                break;

            case LogEntriesOneofCase.TcpLogs:
                if (TcpLogs == null)
                {
                    TcpLogs = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.TCPAccessLogEntries();
                }
                TcpLogs.MergeFrom(other.TcpLogs);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 2
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 10: {
                    if (identifier_ == null)
                    {
                        Identifier = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.Identifier();
                    }
                    input.ReadMessage(Identifier);
                    break;
                }

                case 18: {
                    global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.HTTPAccessLogEntries subBuilder = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.HTTPAccessLogEntries();
                    if (logEntriesCase_ == LogEntriesOneofCase.HttpLogs)
                    {
                        subBuilder.MergeFrom(HttpLogs);
                    }
                    input.ReadMessage(subBuilder);
                    HttpLogs = subBuilder;
                    break;
                }

                case 26: {
                    global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.TCPAccessLogEntries subBuilder = new global::Envoy.Service.Accesslog.V3Alpha.StreamAccessLogsMessage.Types.TCPAccessLogEntries();
                    if (logEntriesCase_ == LogEntriesOneofCase.TcpLogs)
                    {
                        subBuilder.MergeFrom(TcpLogs);
                    }
                    input.ReadMessage(subBuilder);
                    TcpLogs = subBuilder;
                    break;
                }
                }
            }
        }