text:
using Common.Logging;
using Doopec.Utils.Transport;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rtps.Messages;
using Rtps.Messages.Submessages;
using Rtps.Messages.Types;
using Rtps.Structure.Types;
using System;
using System.Diagnostics;
using System.Net;
using System.Reflection;
using System.Threading;
using Data = Rtps.Messages.Submessages.Data;

namespace Rtps.Tests.Transport
{
    [TestClass]
    public class RTPSPacketsTests
    {
        //private static string Host = "localhost"; //192.168.4.111";
        //private static string Host = "172.16.0.111";
        private static string Host = "224.0.1.111";
        private const int Port = 7400;

        private UDPSimulator simulator;

        [TestInitialize]
        public void SetUp()
        {
            simulator = new UDPSimulator();
        }

        public void TestPublishPacket1()
        {
            object key = new object();
            UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

            rec.MessageReceived += (s, m) =>
            {
                Message msg = m.Message;
                Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);
                Debug.WriteLine("Message Header: {0}", msg.Header);
                Assert.AreEqual(ProtocolId.PROTOCOL_RTPS, msg.Header.Protocol);
                Assert.AreEqual(VendorId.OCI, msg.Header.VendorId);
                Assert.AreEqual(new byte[] { 0, 1, 3, 0, 0, 1, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, msg.Header.GuidPrefix.Prefix);
                Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1, msg.Header.Version);
                Assert.AreEqual(2, msg.SubMessages.Count);
                foreach (var submsg in msg.SubMessages)
                {
                    Debug.WriteLine("SubMessage: {0}", submsg);
                    switch (submsg.Kind)
                    {
                        case SubMessageKind.DATA:
                            Data d = submsg as Data;
                            foreach (var par in d.InlineQos.Value)
                                Debug.WriteLine("InlineQos: {0}", par);
                            break;
                        case SubMessageKind.INFO_TS:
                            InfoTimestamp its = submsg as InfoTimestamp;
                            Debug.WriteLine("The TimeStampFlag value state is: {0}", its.HasInvalidateFlag);
                            Debug.WriteLine("The EndiannessFlag value state is: {0}", its.Header.Flags.IsLittleEndian);
                            Debug.WriteLine("The octetsToNextHeader value is: {0}", its.Header.SubMessageLength);
                            if (its.HasInvalidateFlag == false)
                            {
                                Debug.WriteLine("The Timestamp value is: {0}", its.TimeStamp);

                            }
                            break;
                        default:
                            Assert.Fail("Only Timestamp and Data submesages are expected");
                            break;
                    }
                }
                lock (key) Monitor.Pulse(key);
            };

            rec.Start();

            simulator.SendUDPPacket("SamplePackets/packet01.dat", Host, Port);
            lock (key)
            {
                Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
            }
            rec.Close();
        }

        [TestMethod]
        public void TestPublishPacket2()
        {
            object key = new object();
            UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

            rec.MessageReceived += (s, m) =>
            {
                Message msg = m.Message;
                Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);
                Debug.WriteLine("Message Header: {0}", msg.Header);
                Assert.AreEqual(ProtocolId.PROTOCOL_RTPS, msg.Header.Protocol);
                Assert.AreEqual(VendorId.OCI, msg.Header.VendorId);
                Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1, msg.Header.Version);
                Assert.AreEqual(2, msg.SubMessages.Count);
                foreach (var submsg in msg.SubMessages)
                {
                    Debug.WriteLine("SubMessage: {0}", submsg);
                    switch (submsg.Kind)
                    {
                        case SubMessageKind.DATA:
                            Data d = submsg as Data;
                            foreach (var par in d.InlineQos.Value)
                                Debug.WriteLine("InlineQos: {0}", par);
                            break;
                        case SubMessageKind.INFO_TS:
                            InfoTimestamp its = submsg as InfoTimestamp;
                            Debug.WriteLine("The TimeStampFlag value state is: {0}", its.HasInvalidateFlag);
                            Debug.WriteLine("The EndiannessFlag value state is: {0}", its.Header.Flags.IsLittleEndian);
                            Debug.WriteLine("The octetsToNextHeader value is: {0}", its.Header.SubMessageLength);
                            if (its.HasInvalidateFlag == false)
                            {
                                Debug.WriteLine("The Timestamp value is: {0}", its.TimeStamp);

                            }
                            break;
                        default:
                            Assert.Fail("Only Timestamp and Data submesages are expected");
                            break;
                    }
                }
                lock (key) Monitor.Pulse(key);
            };

            rec.Start();

            simulator.SendUDPPacket("SamplePackets/packet3.dat", Host, Port);
            lock (key)
            {
                Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
            }
            rec.Close();
        }

        public void TestDiscoveryPacket()
        {
            object key = new object();
            UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

            rec.MessageReceived += (s, m) =>
            {
                Message msg = m.Message;
                Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);
                Debug.WriteLine("Message Header: {0}", msg.Header);
                Assert.AreEqual(ProtocolId.PROTOCOL_RTPS, msg.Header.Protocol);
                Assert.AreEqual(VendorId.OCI, msg.Header.VendorId);
                Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1, msg.Header.Version);
                Assert.AreEqual(2, msg.SubMessages.Count);
                foreach (var submsg in msg.SubMessages)
                {
                    Debug.WriteLine("SubMessage: {0}", submsg);
                    switch (submsg.Kind)
                    {
                        case SubMessageKind.DATA:
                            Data d = submsg as Data;
                            foreach (var par in d.InlineQos.Value)
                                Debug.WriteLine("InlineQos: {0}", par);
                            break;
                        case SubMessageKind.INFO_TS:
                            InfoTimestamp its = submsg as InfoTimestamp;
                            Debug.WriteLine("The TimeStampFlag value state is: {0}", its.HasInvalidateFlag);
                            Debug.WriteLine("The EndiannessFlag value state is: {0}", its.Header.Flags.IsLittleEndian);
                            Debug.WriteLine("The octetsToNextHeader value is: {0}", its.Header.SubMessageLength);
                            if (its.HasInvalidateFlag == false)
                            {
                                Debug.WriteLine("The Timestamp value is: {0}", its.TimeStamp);

                            }
                            break;
                        default:
                            Assert.Fail("Only Timestamp and Data submesages are expected");
                            break;
                    }
                }
                lock (key) Monitor.Pulse(key);
            };

            rec.Start();

            simulator.SendUDPPacket("SamplePackets/DiscoveryPacketSample.dat", Host, Port);
            lock (key)
            {
                Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
            }
            rec.Close();
        }
        /// <summary>
        /// This method is able to test all kinds of submessages ( not tested PAD INF_SrC_
        /// INF_REPLY, INFO_REPLY_IP4, PAD)
        /// </summary>
        [TestMethod]
        public void GeneralRTPSMessageTesterMethod()
        {
            object key = new object();
            UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

            rec.MessageReceived += (s, m) =>
            {
                Message msg = m.Message;
                Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);
                Debug.WriteLine("Message Header: {0}", msg.Header);
                Assert.AreEqual(ProtocolId.PROTOCOL_RTPS, msg.Header.Protocol);
                Debug.WriteLine("The Header Protocol is: {0}", msg.Header.Protocol);
                Assert.AreEqual(VendorId.OCI, msg.Header.VendorId);
                Debug.WriteLine("The VendorId value state is: {0}", msg.Header.VendorId);
                Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1, msg.Header.Version);
                Debug.WriteLine("The Protocol Version value state is: {0}", msg.Header.Version);

                Debug.WriteLine("The number of SubMessages in the message is: {0}", msg.SubMessages.Count);
                //Assert.AreEqual(2, msg.SubMessages.Count);
                foreach (var submsg in msg.SubMessages)
                {
                    Debug.WriteLine("SubMessage: {0}", submsg.Kind);

                    switch (submsg.Kind)
                    {
                        case SubMessageKind.DATA:
                            {
                                Data d = submsg as Data;

                                Debug.WriteLine("The KeyFlag value state is: {0}", d.HasKeyFlag);
                                Debug.WriteLine("The DataFlag value state is: {0}", d.HasDataFlag);
                                Debug.WriteLine("The InlineQoSFlag value state is: {0}", d.HasInlineQosFlag);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The extraFlags value is: {0}", d.ExtraFlags.Value);
                                Debug.WriteLine("The octetsToInlineQos value is: Aun no logro");
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The writerSN is: {0}", d.WriterSN);
                                if (d.HasInlineQosFlag)
                                {
                                    foreach (var par in d.InlineQos.Value)
                                    {
                                        Debug.WriteLine("InlineQos: {0}", par);
                                    }

                                }
                                if (d.HasDataFlag || d.Header.Flags.IsLittleEndian)
                                {

                                    for (int i = 0; i <= d.SerializedPayload.DataEncapsulation.SerializedPayload.Length - 1; i++)
                                    {

                                        Debug.WriteLine("SerializedPayload: {0}", d.SerializedPayload.DataEncapsulation.SerializedPayload.GetValue(i));
                                    }
                                }
                                break;
                            }
                        case SubMessageKind.ACKNACK:
                            {
                                AckNack d = submsg as AckNack;
                                Debug.WriteLine("The FinalFlag value state is: {0}", d.HasFinalFlag);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The readerSNState is: {0}", d.ReaderSNState);
                                Debug.WriteLine("The Count is: {0}", d.Count);
                                break;
                            }
                        case SubMessageKind.NACK_FRAG:
                            {
                                NackFrag d = submsg as NackFrag;

                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The writerSN is: {0}", d.WriterSequenceNumber);
                                Debug.WriteLine("The fragmentNumberState value is: {0}", d.FragmentNumberState);
                                break;
                            }
                        case SubMessageKind.DATA_FRAG:
                            {
                                DataFrag d = submsg as DataFrag;
                                Debug.WriteLine("The KeyFlag value state is: {0}", d.HasKeyFlag);
                                Debug.WriteLine("The InlineQoSFlag value state is: {0}", d.HasInlineQosFlag);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The extraFlags value is: {0}", d.ExtraFlags);
                                Debug.WriteLine("The octetsToInlineQos value is: Aun no logro");
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The writerSN is: {0}", d.WriterSequenceNumber);
                                Debug.WriteLine("The FragmentNumber is: {0}", d.FragmentStartingNumber);
                                Debug.WriteLine("The fragmentsInSubmessage is: {0}", d.FragmentsInSubmessage);
                                Debug.WriteLine("The samplesize is: {0}", d.SampleSize);
                                if (d.HasInlineQosFlag)
                                {
                                    foreach (var par in d.ParameterList.Value)
                                    {
                                        Debug.WriteLine("InlineQos: {0}", par);
                                    }

                                }
                                for (int i = 0; i <= d.SerializedPayload.Length - 1; i++)
                                {

                                    Debug.WriteLine("SerializedPayload: {0}", d.SerializedPayload.GetValue(i));
                                }
                                break;
                            }
                        case SubMessageKind.GAP:
                            {
                                Gap d = submsg as Gap;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The GapStart number is: {0}", d.GapStart);
                                Debug.WriteLine("The GapList value is: {0}", d.GapList);
                                break;
                            }
                        case SubMessageKind.HEARTBEAT:
                            {
                                Heartbeat d = submsg as Heartbeat;
                                Debug.WriteLine("The LivelinessFlag value state is: {0}", d.HasLivelinessFlag);
                                Debug.WriteLine("The FinalFlag value state is: {0}", d.HasFinalFlag);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The firstSN is: {0}", d.FirstSequenceNumber);
                                Debug.WriteLine("The lastSN is: {0}", d.LastSequenceNumber);
                                Debug.WriteLine("The Count is: {0}", d.Count);

                                break;
                            }
                        case SubMessageKind.HEARTBEAT_FRAG:
                            {
                                HeartbeatFrag d = submsg as HeartbeatFrag;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The readerID is: {0}", d.ReaderId);
                                Debug.WriteLine("The writerID is: {0}", d.WriterId);
                                Debug.WriteLine("The writerSN is: {0}", d.WriterSequenceNumber);
                                Debug.WriteLine("The FragmentNumber is: {0}", d.LastFragmentNumber);
                                Debug.WriteLine("The Count is: {0}", d.Count);

                                break;
                            }
                        case SubMessageKind.INFO_DST:
                            {
                                InfoDestination d = submsg as InfoDestination;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The guidPrefix value is: {0}", d.GuidPrefix);
                                break;
                            }

                        case SubMessageKind.INFO_TS:
                            {
                                InfoTimestamp d = submsg as InfoTimestamp;
                                Debug.WriteLine("The TimeStampFlag value state is: {0}", d.HasInvalidateFlag);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                if (d.HasInvalidateFlag == false)
                                {
                                    Debug.WriteLine("The Timestamp value is: {0}", d.TimeStamp);

                                }
                                break;
                            }
                        case SubMessageKind.INFO_SRC:
                            {
                                InfoSource d = submsg as InfoSource;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The ProtocolVersion value is: {0}", d.ProtocolVersion);
                                Debug.WriteLine("The vendorId value is: {0}", d.VendorId);
                                Debug.WriteLine("The guidPrefix value is: {0}", d.GuidPrefix);

                                break;
                            }
                        case SubMessageKind.INFO_REPLY:
                            {
                                InfoReply d = submsg as InfoReply;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The MulticastFlag value state is: {0}", d.HasMulticastFlag);
                                Debug.WriteLine("The unicastLocatorList value state is: {0}", d.UnicastLocatorList);
                                if (d.HasMulticastFlag)
                                {
                                    Debug.WriteLine("The multicastLocatorList value state is: {0}", d.MulticastLocatorList);
                                }
                                break;
                            }
                        case SubMessageKind.INFO_REPLY_IP4:
                            {
                                InfoReplyIp4 d = submsg as InfoReplyIp4;

                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Debug.WriteLine("The MulticastFlag value state is: {0}", d.HasMulticastFlag);
                                Debug.WriteLine("The unicastLocatorList value state is: {0}", d.UnicastLocator);
                                if (d.HasMulticastFlag)
                                {
                                    Debug.WriteLine("The multicastLocatorList value state is: {0}", d.MulticastLocator);
                                }
                                break;
                            }
                        case SubMessageKind.PAD:
                            {
                                Pad d = submsg as Pad;
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                break;
                            }
                    }

                }
                lock (key) Monitor.Pulse(key);
            };

            rec.Start();

            simulator.SendUDPPacket("SamplePackets/TestOpenDDS_rtps_reliability_runtest_local/Packet04.dat", Host, Port);
            lock (key)
            {
                Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
            }
            rec.Close();
        }
        /// <summary>
        /// Data Submessage Reference
        /// </summary>
         [TestMethod]
        public void TesOpenDDS_rtps_reliability_runtest_localPacket01()
        {
            object key = new object();
            UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

            rec.MessageReceived += (s, m) =>
            {
                Message msg = m.Message;
                Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);

                Debug.WriteLine("Message Header: {0}", msg.Header);
                Assert.AreEqual(ProtocolId.PROTOCOL_RTPS.ToString(), msg.Header.Protocol.ToString());
                Debug.WriteLine("The Header Protocol is: {0}", msg.Header.Protocol);
                Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1.ToString(), msg.Header.Version.ToString());
                Debug.WriteLine("The Protocol Version value state is: {0}", msg.Header.Version);
                Assert.AreEqual(VendorId.OCI.ToString(), msg.Header.VendorId.ToString());
                Debug.WriteLine("The VendorId value state is: {0}", msg.Header.VendorId);
                Assert.AreEqual("01-03-08-00-27-B9-29-47-0A-AF-00-00", msg.Header.GuidPrefix.ToString());

                Debug.WriteLine("The guidPrefix value state is: {0}", msg.Header.GuidPrefix);

                Assert.AreEqual(1, msg.SubMessages.Count);
                Debug.WriteLine("The number of SubMessages in the message is: {0}", msg.SubMessages.Count);

                foreach (var submsg in msg.SubMessages)
                {
                    Assert.AreEqual(SubMessageKind.DATA, submsg.Kind );
                    Debug.WriteLine("SubMessage: {0}", submsg.Kind);

                    switch (submsg.Kind)
                    {
                        case SubMessageKind.DATA:
                            {
                                Data d = submsg as Data;

                                Assert.AreEqual(false, d.HasKeyFlag);
                                Debug.WriteLine("The KeyFlag value state is: {0}", d.HasKeyFlag);
                                Assert.AreEqual(true, d.HasDataFlag);
                                Debug.WriteLine("The DataFlag value state is: {0}", d.HasDataFlag);
                                Assert.AreEqual(false, d.HasInlineQosFlag);
                                Debug.WriteLine("The InlineQoSFlag value state is: {0}", d.HasInlineQosFlag);
                                Assert.AreEqual(true, d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Assert.AreEqual(0, d.Header.SubMessageLength);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Assert.AreEqual(0, d.ExtraFlags .Value);
                                Debug.WriteLine("The extraFlags value is: {0}", d.ExtraFlags.Value);
                                Debug.WriteLine("The octetsToInlineQos value is: ");
                                Assert.AreEqual(0, d.ReaderId.EntityKey0);
                                Assert.AreEqual(0, d.ReaderId.EntityKey1);
                                Assert.AreEqual(0, d.ReaderId.EntityKey2);
                                Debug.WriteLine("The readerIDEntityKey is: {0}-{1}-{2}", d.ReaderId.EntityKey0,d.ReaderId.EntityKey1,d.ReaderId.EntityKey2);
                                Assert.AreEqual(0,(int) d.ReaderId.TypeID);
                                Debug.WriteLine("The readerIDEntityKind value is: {0} ",(int)d.ReaderId.TypeID);
                                Assert.AreEqual(0, d.WriterId.EntityKey0);
                                Assert.AreEqual(1, d.WriterId.EntityKey1);
                                Assert.AreEqual(2, d.WriterId.EntityKey2);
                                Debug.WriteLine("The writerID is: {0}-{1}-{2}", d.WriterId.EntityKey0, d.WriterId.EntityKey1, d.WriterId.EntityKey2);
                                Assert.AreEqual(2, (int)d.WriterId.TypeID);
                                Debug.WriteLine("The writerIDEntityKind value is:{0} ",(int) d.WriterId.TypeID);
                                Assert.AreEqual("1", d.WriterSN.ToString());

                                Debug.WriteLine("The writerSN is: {0}", d.WriterSN);
                                if (d.HasInlineQosFlag)
                                {
                                    /*foreach (var par in d.InlineQos.Value)
                                    {
                                        Debug.WriteLine("InlineQos: {0}", par);
                                    }*/

                                }

                                if (d.HasDataFlag || d.Header.Flags.IsLittleEndian)
                                {

                                    for (int i = 0; i <= d.SerializedPayload.DataEncapsulation.SerializedPayload.Length - 1; i++)
                                    {

                                        Debug.WriteLine("SerializedPayload: {0}", d.SerializedPayload.DataEncapsulation.SerializedPayload.GetValue(i));
                                    }
                                }
                                break;
                            }
                    }

                }
                lock (key) Monitor.Pulse(key);
            };

            rec.Start();

            simulator.SendUDPPacket("SamplePackets/TestOpenDDS_rtps_reliability_runtest_local/Packet01.dat", Host, Port);
            lock (key)
            {
                Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
            }
            rec.Close();
        }

         [TestMethod]
         public void TesOpenDDS_rtps_reliability_runtest_localPacket02()
         {
             object key = new object();
             UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

             rec.MessageReceived += (s, m) =>
             {
                 Message msg = m.Message;
                 Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);

                 Debug.WriteLine("Message Header: {0}", msg.Header);
                 Assert.AreEqual(ProtocolId.PROTOCOL_RTPS.ToString(), msg.Header.Protocol.ToString());
                 Debug.WriteLine("The Header Protocol is: {0}", msg.Header.Protocol);
                 Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1.ToString(), msg.Header.Version.ToString());
                 Debug.WriteLine("The Protocol Version value state is: {0}", msg.Header.Version);
                 Assert.AreEqual(VendorId.OCI.ToString(), msg.Header.VendorId.ToString());
                 Debug.WriteLine("The VendorId value state is: {0}", msg.Header.VendorId);
                 Assert.AreEqual("01-03-08-00-27-B9-29-47-0A-AF-00-00", msg.Header.GuidPrefix.ToString());

                 Debug.WriteLine("The guidPrefix value state is: {0}", msg.Header.GuidPrefix);

                 Assert.AreEqual(1, msg.SubMessages.Count);
                 Debug.WriteLine("The number of SubMessages in the message is: {0}", msg.SubMessages.Count);

                 foreach (var submsg in msg.SubMessages)
                 {
                     Assert.AreEqual(SubMessageKind.HEARTBEAT, submsg.Kind);
                     Debug.WriteLine("SubMessage: {0}", submsg.Kind);

                     switch (submsg.Kind)
                     {
                         case SubMessageKind.HEARTBEAT:
                            {
                                Heartbeat d = submsg as Heartbeat;
                                Assert.AreEqual(false, d.HasLivelinessFlag);
                                Debug.WriteLine("The LivelinessFlag value state is: {0}", d.HasLivelinessFlag);
                                Assert.AreEqual(false, d.HasFinalFlag);
                                Debug.WriteLine("The FinalFlag value state is: {0}", d.HasFinalFlag);
                                Assert.AreEqual(true, d.Header.Flags.IsLittleEndian);
                                Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                Assert.AreEqual(0, d.Header.SubMessageLength);
                                Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                Assert.AreEqual(0, d.ReaderId.EntityKey0);
                                Assert.AreEqual(0, d.ReaderId.EntityKey1);
                                Assert.AreEqual(0, d.ReaderId.EntityKey2);
                                Debug.WriteLine("The readerIDEntityKey is: {0}-{1}-{2}", d.ReaderId.EntityKey0, d.ReaderId.EntityKey1, d.ReaderId.EntityKey2);
                                Assert.AreEqual(0, (int)d.ReaderId.TypeID);
                                Debug.WriteLine("The readerIDEntityKind value is: {0} ", (int)d.ReaderId.TypeID);
                                Assert.AreEqual(0, d.WriterId.EntityKey0);
                                Assert.AreEqual(1, d.WriterId.EntityKey1);
                                Assert.AreEqual(2, d.WriterId.EntityKey2);
                                Debug.WriteLine("The writerID is: {0}-{1}-{2}", d.WriterId.EntityKey0, d.WriterId.EntityKey1, d.WriterId.EntityKey2);
                                Assert.AreEqual(2, (int)d.WriterId.TypeID);

                                Debug.WriteLine("The writerIDEntityKind value is:{0} ", (int)d.WriterId.TypeID);
                                Assert.AreEqual(1,d.FirstSequenceNumber);
                                Debug.WriteLine("The firstSN is: {0}", d.FirstSequenceNumber);
                                Assert.AreEqual(1,d.LastSequenceNumber);
                                Debug.WriteLine("The lastSN is: {0}", d.LastSequenceNumber);
                                Assert.AreEqual(1,d.Count);
                                Debug.WriteLine("The Count is: {0}", d.Count);

                                break;
                            }

                     }

                 }
                 lock (key) Monitor.Pulse(key);
             };

             rec.Start();

             simulator.SendUDPPacket("SamplePackets/TestOpenDDS_rtps_reliability_runtest_local/Packet02.dat", Host, Port);
             lock (key)
             {
                 Assert.IsTrue(Monitor.Wait(key, 10000), "Time-out. Message has not arrived or there is an error on it.");
             }
             rec.Close();
         }

         [TestMethod]
         public void TesOpenDDS_rtps_reliability_runtest_localPacket03()
         {
             object key = new object();
             UDPReceiver rec = new UDPReceiver(new Uri("udp://" + Host + ":" + Port), 1024);

             rec.MessageReceived += (s, m) =>
             {
                 Message msg = m.Message;
                 Debug.WriteLine("New Message has arrived from {0}", m.Session.RemoteEndPoint);

                 Debug.WriteLine("Message Header: {0}", msg.Header);
                 Assert.AreEqual(ProtocolId.PROTOCOL_RTPS.ToString(), msg.Header.Protocol.ToString());
                 Debug.WriteLine("The Header Protocol is: {0}", msg.Header.Protocol);
                 Assert.AreEqual(ProtocolVersion.PROTOCOLVERSION_2_1.ToString(), msg.Header.Version.ToString());
                 Debug.WriteLine("The Protocol Version value state is: {0}", msg.Header.Version);
                 Assert.AreEqual(VendorId.OCI.ToString(), msg.Header.VendorId.ToString());
                 Debug.WriteLine("The VendorId value state is: {0}", msg.Header.VendorId);
                 Assert.AreEqual("01-03-08-00-27-B9-29-47-0A-AF-00-01", msg.Header.GuidPrefix.ToString());

                 Debug.WriteLine("The guidPrefix value state is: {0}", msg.Header.GuidPrefix);

                 Assert.AreEqual(2, msg.SubMessages.Count);
                 Debug.WriteLine("The number of SubMessages in the message is: {0}", msg.SubMessages.Count);

                 foreach (var submsg in msg.SubMessages)
                 {

                     Debug.WriteLine("SubMessage: {0}", submsg.Kind);

                     switch (submsg.Kind)
                     {
                         case SubMessageKind.INFO_DST:
                             {
                                 InfoDestination d = submsg as InfoDestination;

                                 Assert.AreEqual(true, d.Header.Flags.IsLittleEndian);
                                 Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                 Assert.AreEqual(12, d.Header.SubMessageLength);
                                 Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                 Assert.AreEqual("01-03-08-00-27-B9-29-47-0A-AF-00-00", d.GuidPrefix.ToString());

                                 Debug.WriteLine("The guidPrefix value is: {0}", d.GuidPrefix);
                                 break;
                             }
                         case SubMessageKind.ACKNACK:
                             {
                                 AckNack d = submsg as AckNack;
                                 Assert.AreEqual(true, d.HasFinalFlag);
                                 Debug.WriteLine("The FinalFlag value state is: {0}", d.HasFinalFlag);
                                 Assert.AreEqual(true, d.Header.Flags.IsLittleEndian);
                                 Debug.WriteLine("The EndiannessFlag value state is: {0}", d.Header.Flags.IsLittleEndian);
                                 Debug.WriteLine("The octetsToNextHeader value is: {0}", d.Header.SubMessageLength);
                                 Assert.AreEqual(0, d.ReaderId.EntityKey0);
                                 Assert.AreEqual(1, d.ReaderId.EntityKey1);
                                 Assert.AreEqual(5, d.ReaderId.EntityKey2);
                                 Debug.WriteLine("The readerIDEntityKey is: {0}-{1}-{2}", d.ReaderId.EntityKey0, d.ReaderId.EntityKey1, d.ReaderId.EntityKey2);
                                 Assert.AreEqual(7, (int)d.ReaderId.TypeID);
                                 Debug.WriteLine("The readerIDEntityKind value is: {0} ", (int)d.ReaderId.TypeID);
                                 Assert.AreEqual(0, d.WriterId.EntityKey0);
                                 Assert.AreEqual(1, d.WriterId.EntityKey1);
                                 Assert.AreEqual(2, d.WriterId.EntityKey2);
                                 Debug.WriteLine("The writerID is: {0}-{1}-{2}", d.WriterId.EntityKey0, d.WriterId.EntityKey1, d.WriterId.EntityKey2);
                                 Assert.AreEqual(2, (int)d.WriterId.TypeID);

                                 Debug.WriteLine("The writerIDEntityKind value is:{0} ", (int)d.WriterId.TypeID);
                                 Assert.AreEqual("2", d.ReaderSNState.BitmapBase.ToString());
                                 Assert.AreEqual(1, d.ReaderSNState.NumBits);
                                 Assert.AreEqual(0, d.ReaderSNState.Bitmaps[0]);

                                 Debug.WriteLine("The readerSNState is: {0}", d.ReaderSNState);
                                 Debug.WriteLine("The Count is: {0}", d.Count);
                                 break;
                             }

                     }

                 }
                 lock (key) Monitor.Pulse(key);
             };

             rec.Start();

             simulator.SendUDPPacket("SamplePackets/TestOpenDDS_rtps_reliability_runtest_local/Packet03.dat", Host, Port);
             lock (key)
             {
                 Assert.IsTrue(Monitor.Wait(key, 1000), "Time-out. Message has not arrived or there is an error on it.");
             }
             rec.Close();
         }

    }
}


text:
#pragma once
#include "SharedDefine.h"
#include "EnumSet.h"

struct Tile
{
	MapTileType m_MapTileType; // R
	MapObjectType m_MapObjectType; // G
	float m_MapHeight; // B
};

class GameMapManager
{
public:
	GameMapManager();
	~GameMapManager();

	bool		Initialize();
	bool		ReadMapFile( const char* filename );

	const std::vector<PositionInfo>&	GetKingPositionList() { return m_KingPositionList; }
	const std::vector<PositionInfo>&	GetGuardPositionList() { return m_GuardPositionList; }

	const PositionInfo&					GetKingPositionInfo( int index ) const { return m_KingPositionList.at( index ); }
	const PositionInfo&					GetGuardPositionInfo( int index ) const { return m_GuardPositionList.at( index ); }

	const MapTileType&					GetMapTileType( int x, int z ) const { return m_BattleMap.at( x ).at( z ).m_MapTileType; }
	const MapObjectType&				GetMapObjectType( int x, int z ) const { return m_BattleMap.at( x ).at( z ).m_MapObjectType; }
	const float&				GetMapHeight( int x, int z ) const { return m_BattleMap.at( x ).at( z ).m_MapHeight; }

private:
	std::vector<std::vector<Tile>>	m_BattleMap;

	std::vector<PositionInfo> m_KingPositionList;
	std::vector<PositionInfo> m_GuardPositionList;
};

redpajama_set_name: RedPajamaGithub


text:
from scrapy.downloadermiddlewares.httpproxy import HttpProxyMiddleware

class ProxyMiddleware(HttpProxyMiddleware):

    def __init__(self, proxies):
        self.proxies = proxies

    def process_request(self, request, spider):
        """ 使用外部代理方法 """
        request.meta['proxy'] = self.proxy_shadowsocks()

    @staticmethod
    def proxy_xxnet():
        """ 使用 xx-net 代理 """
        proxy = "http://127.0.0.1:8087"
        return proxy

    @staticmethod
    def proxy_shadowsocks():
        """ 使用 shadowsocks 代理 """
        proxy = "http://127.0.0.1:1080"
        return proxy


text:
//
// This source code implements specifications defined by the Java
// Community Process. In order to remain compliant with the specification
// DO NOT add / change / or delete method signatures!
//

package javax.jms;

/**
 * @version $Rev$ $Date$
 */
public interface TopicSession extends Session {
    Topic createTopic(String topicName) throws JMSException;

    TopicSubscriber createSubscriber(Topic topic) throws JMSException;

    TopicSubscriber createSubscriber(
        Topic topic,
        String messageSelector,
        boolean noLocal)
        throws JMSException;

    TopicSubscriber createDurableSubscriber(Topic topic, String name)
        throws JMSException;

    TopicSubscriber createDurableSubscriber(
        Topic topic,
        String name,
        String messageSelector,
        boolean noLocal)
        throws JMSException;

    TopicPublisher createPublisher(Topic topic) throws JMSException;

    TemporaryTopic createTemporaryTopic() throws JMSException;

    void unsubscribe(String name) throws JMSException;
}


text:
Education

BE in Computer Engineering

            Vanderbilt University
            <address>Nashville, TN, USA</address><time>2010 to 2014</time>

            Founded VINES, the Vanderbilt Entrepreneurial Society. Served on the Honor Council. Accepted into and attended Vanderbilt's Accelerator business program. Completed Computer Engineering degree in 2 years after switching major at end of sophomore year. Two credits short of a Music Minor. Designed game design independent study.


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<title>The switchboard application</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">

Modules

imap

reloader

rfc2822

switchboard

switchboard_jmap

switchboard_oauth

switchboard_workers


text:
package org.apache.camel.builder.endpoint.dsl;

import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
import org.apache.camel.ExchangePattern;
import org.apache.camel.builder.EndpointConsumerBuilder;
import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
import org.apache.camel.spi.ExceptionHandler;
import org.apache.camel.spi.HeaderFilterStrategy;

/**
 * The elytron component is allows you to work with the Elytron Security
 * Framework
 *
 * Generated by camel-package-maven-plugin - do not edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface ElytronEndpointBuilderFactory {

    /**
     * Builder for endpoint consumers for the Elytron component.
     */
    public interface ElytronEndpointConsumerBuilder
            extends
                EndpointConsumerBuilder {
        default AdvancedElytronEndpointConsumerBuilder advanced() {
            return (AdvancedElytronEndpointConsumerBuilder) this;
        }
        /**
         * Comma separated list of allowed roles.
         *
         * The option is a: java.lang.String type.
         *
         * Group: common
         */
        default ElytronEndpointConsumerBuilder allowedRoles(String allowedRoles) {
            doSetProperty("allowedRoles", allowedRoles);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointConsumerBuilder useStreaming(boolean useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointConsumerBuilder useStreaming(String useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * Whether or not the consumer should write access log.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder accessLog(Boolean accessLog) {
            doSetProperty("accessLog", accessLog);
            return this;
        }
        /**
         * Whether or not the consumer should write access log.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder accessLog(String accessLog) {
            doSetProperty("accessLog", accessLog);
            return this;
        }
        /**
         * Allows for bridging the consumer to the Camel routing Error Handler,
         * which mean any exceptions occurred while the consumer is trying to
         * pickup incoming messages, or the likes, will now be processed as a
         * message and handled by the routing Error Handler. By default the
         * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
         * with exceptions, that will be logged at WARN or ERROR level and
         * ignored.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder bridgeErrorHandler(
                boolean bridgeErrorHandler) {
            doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
            return this;
        }
        /**
         * Allows for bridging the consumer to the Camel routing Error Handler,
         * which mean any exceptions occurred while the consumer is trying to
         * pickup incoming messages, or the likes, will now be processed as a
         * message and handled by the routing Error Handler. By default the
         * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
         * with exceptions, that will be logged at WARN or ERROR level and
         * ignored.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder bridgeErrorHandler(
                String bridgeErrorHandler) {
            doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
            return this;
        }
        /**
         * Used to only allow consuming if the HttpMethod matches, such as
         * GET/POST/PUT etc. Multiple methods can be specified separated by
         * comma.
         *
         * The option is a: java.lang.String type.
         *
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder httpMethodRestrict(
                String httpMethodRestrict) {
            doSetProperty("httpMethodRestrict", httpMethodRestrict);
            return this;
        }
        /**
         * Whether or not the consumer should try to find a target consumer by
         * matching the URI prefix if no exact match is found.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder matchOnUriPrefix(
                Boolean matchOnUriPrefix) {
            doSetProperty("matchOnUriPrefix", matchOnUriPrefix);
            return this;
        }
        /**
         * Whether or not the consumer should try to find a target consumer by
         * matching the URI prefix if no exact match is found.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder matchOnUriPrefix(
                String matchOnUriPrefix) {
            doSetProperty("matchOnUriPrefix", matchOnUriPrefix);
            return this;
        }
        /**
         * If enabled and an Exchange failed processing on the consumer side the
         * response's body won't contain the exception's stack trace.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder muteException(
                boolean muteException) {
            doSetProperty("muteException", muteException);
            return this;
        }
        /**
         * If enabled and an Exchange failed processing on the consumer side the
         * response's body won't contain the exception's stack trace.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder muteException(
                String muteException) {
            doSetProperty("muteException", muteException);
            return this;
        }
        /**
         * Specifies whether to enable HTTP OPTIONS for this Servlet consumer.
         * By default OPTIONS is turned off.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder optionsEnabled(
                boolean optionsEnabled) {
            doSetProperty("optionsEnabled", optionsEnabled);
            return this;
        }
        /**
         * Specifies whether to enable HTTP OPTIONS for this Servlet consumer.
         * By default OPTIONS is turned off.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: consumer
         */
        default ElytronEndpointConsumerBuilder optionsEnabled(
                String optionsEnabled) {
            doSetProperty("optionsEnabled", optionsEnabled);
            return this;
        }
        /**
         * if true, the consumer will post notifications to the route when a new
         * WebSocket peer connects, disconnects, etc. See
         * UndertowConstants.EVENT_TYPE and EventType.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: websocket
         */
        default ElytronEndpointConsumerBuilder fireWebSocketChannelEvents(
                boolean fireWebSocketChannelEvents) {
            doSetProperty("fireWebSocketChannelEvents", fireWebSocketChannelEvents);
            return this;
        }
        /**
         * if true, the consumer will post notifications to the route when a new
         * WebSocket peer connects, disconnects, etc. See
         * UndertowConstants.EVENT_TYPE and EventType.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: websocket
         */
        default ElytronEndpointConsumerBuilder fireWebSocketChannelEvents(
                String fireWebSocketChannelEvents) {
            doSetProperty("fireWebSocketChannelEvents", fireWebSocketChannelEvents);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option is a:
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointConsumerBuilder sslContextParameters(
                Object sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option will be converted to a
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointConsumerBuilder sslContextParameters(
                String sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint consumers for the Elytron component.
     */
    public interface AdvancedElytronEndpointConsumerBuilder
            extends
                EndpointConsumerBuilder {
        default ElytronEndpointConsumerBuilder basic() {
            return (ElytronEndpointConsumerBuilder) this;
        }
        /**
         * To let the consumer use a custom ExceptionHandler. Notice if the
         * option bridgeErrorHandler is enabled then this option is not in use.
         * By default the consumer will deal with exceptions, that will be
         * logged at WARN or ERROR level and ignored.
         *
         * The option is a: org.apache.camel.spi.ExceptionHandler
         * type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder exceptionHandler(
                ExceptionHandler exceptionHandler) {
            doSetProperty("exceptionHandler", exceptionHandler);
            return this;
        }
        /**
         * To let the consumer use a custom ExceptionHandler. Notice if the
         * option bridgeErrorHandler is enabled then this option is not in use.
         * By default the consumer will deal with exceptions, that will be
         * logged at WARN or ERROR level and ignored.
         *
         * The option will be converted to a
         * org.apache.camel.spi.ExceptionHandler type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder exceptionHandler(
                String exceptionHandler) {
            doSetProperty("exceptionHandler", exceptionHandler);
            return this;
        }
        /**
         * Sets the exchange pattern when the consumer creates an exchange.
         *
         * The option is a: org.apache.camel.ExchangePattern type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder exchangePattern(
                ExchangePattern exchangePattern) {
            doSetProperty("exchangePattern", exchangePattern);
            return this;
        }
        /**
         * Sets the exchange pattern when the consumer creates an exchange.
         *
         * The option will be converted to a
         * org.apache.camel.ExchangePattern type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder exchangePattern(
                String exchangePattern) {
            doSetProperty("exchangePattern", exchangePattern);
            return this;
        }
        /**
         * Specifies a comma-delimited set of io.undertow.server.HttpHandler
         * instances in your Registry (such as your Spring ApplicationContext).
         * These handlers are added to the Undertow handler chain (for example,
         * to add security). Important: You can not use different handlers with
         * different Undertow endpoints using the same port number. The handlers
         * is associated to the port number. If you need different handlers,
         * then use different port numbers.
         *
         * The option is a:
         * java.util.Set<org.apache.camel.component.undertow.HttpHandlerRegistrationInfo> type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder handlers(
                Set<Object> handlers) {
            doSetProperty("handlers", handlers);
            return this;
        }
        /**
         * Specifies a comma-delimited set of io.undertow.server.HttpHandler
         * instances in your Registry (such as your Spring ApplicationContext).
         * These handlers are added to the Undertow handler chain (for example,
         * to add security). Important: You can not use different handlers with
         * different Undertow endpoints using the same port number. The handlers
         * is associated to the port number. If you need different handlers,
         * then use different port numbers.
         *
         * The option will be converted to a
         * java.util.Set<org.apache.camel.component.undertow.HttpHandlerRegistrationInfo> type.
         *
         * Group: consumer (advanced)
         */
        default AdvancedElytronEndpointConsumerBuilder handlers(String handlers) {
            doSetProperty("handlers", handlers);
            return this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option is a:
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder accessLogReceiver(
                Object accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option will be converted to a
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder accessLogReceiver(
                String accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder basicPropertyBinding(
                boolean basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder basicPropertyBinding(
                String basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option is a:
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder headerFilterStrategy(
                HeaderFilterStrategy headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option will be converted to a
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder headerFilterStrategy(
                String headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder synchronous(
                boolean synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder synchronous(
                String synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option is a:
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder undertowHttpBinding(
                Object undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option will be converted to a
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointConsumerBuilder undertowHttpBinding(
                String undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
    }

    /**
     * Builder for endpoint producers for the Elytron component.
     */
    public interface ElytronEndpointProducerBuilder
            extends
                EndpointProducerBuilder {
        default AdvancedElytronEndpointProducerBuilder advanced() {
            return (AdvancedElytronEndpointProducerBuilder) this;
        }
        /**
         * Comma separated list of allowed roles.
         *
         * The option is a: java.lang.String type.
         *
         * Group: common
         */
        default ElytronEndpointProducerBuilder allowedRoles(String allowedRoles) {
            doSetProperty("allowedRoles", allowedRoles);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointProducerBuilder useStreaming(boolean useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointProducerBuilder useStreaming(String useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * Configure a cookie handler to maintain a HTTP session.
         *
         * The option is a:
         * org.apache.camel.http.base.cookie.CookieHandler type.
         *
         * Group: producer
         */
        default ElytronEndpointProducerBuilder cookieHandler(
                Object cookieHandler) {
            doSetProperty("cookieHandler", cookieHandler);
            return this;
        }
        /**
         * Configure a cookie handler to maintain a HTTP session.
         *
         * The option will be converted to a
         * org.apache.camel.http.base.cookie.CookieHandler type.
         *
         * Group: producer
         */
        default ElytronEndpointProducerBuilder cookieHandler(
                String cookieHandler) {
            doSetProperty("cookieHandler", cookieHandler);
            return this;
        }
        /**
         * Setting to ensure socket is not closed due to inactivity.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder keepAlive(Boolean keepAlive) {
            doSetProperty("keepAlive", keepAlive);
            return this;
        }
        /**
         * Setting to ensure socket is not closed due to inactivity.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder keepAlive(String keepAlive) {
            doSetProperty("keepAlive", keepAlive);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: producer
         */
        default ElytronEndpointProducerBuilder lazyStartProducer(
                boolean lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: producer
         */
        default ElytronEndpointProducerBuilder lazyStartProducer(
                String lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Sets additional channel options. The options that can be used are
         * defined in org.xnio.Options. To configure from endpoint uri, then
         * prefix each option with option., such as
         * option.close-abort=true&option.send-buffer=8192.
         *
         * The option is a: java.util.Map<java.lang.String,
         * java.lang.Object> type.
         *
         * Group: producer
         */
        default ElytronEndpointProducerBuilder options(
                Map<String, Object> options) {
            doSetProperty("options", options);
            return this;
        }
        /**
         * Sets additional channel options. The options that can be used are
         * defined in org.xnio.Options. To configure from endpoint uri, then
         * prefix each option with option., such as
         * option.close-abort=true&option.send-buffer=8192.
         *
         * The option will be converted to a
         * java.util.Map<java.lang.String, java.lang.Object>
         * type.
         *
         * Group: producer
         */
        default ElytronEndpointProducerBuilder options(String options) {
            doSetProperty("options", options);
            return this;
        }
        /**
         * If the option is true, UndertowProducer will set the Host header to
         * the value contained in the current exchange Host header, useful in
         * reverse proxy applications where you want the Host header received by
         * the downstream server to reflect the URL called by the upstream
         * client, this allows applications which use the Host header to
         * generate accurate URL's for a proxied service.
         *
         * The option is a: boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder preserveHostHeader(
                boolean preserveHostHeader) {
            doSetProperty("preserveHostHeader", preserveHostHeader);
            return this;
        }
        /**
         * If the option is true, UndertowProducer will set the Host header to
         * the value contained in the current exchange Host header, useful in
         * reverse proxy applications where you want the Host header received by
         * the downstream server to reflect the URL called by the upstream
         * client, this allows applications which use the Host header to
         * generate accurate URL's for a proxied service.
         *
         * The option will be converted to a boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder preserveHostHeader(
                String preserveHostHeader) {
            doSetProperty("preserveHostHeader", preserveHostHeader);
            return this;
        }
        /**
         * Setting to facilitate socket multiplexing.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder reuseAddresses(
                Boolean reuseAddresses) {
            doSetProperty("reuseAddresses", reuseAddresses);
            return this;
        }
        /**
         * Setting to facilitate socket multiplexing.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder reuseAddresses(
                String reuseAddresses) {
            doSetProperty("reuseAddresses", reuseAddresses);
            return this;
        }
        /**
         * Setting to improve TCP protocol performance.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder tcpNoDelay(Boolean tcpNoDelay) {
            doSetProperty("tcpNoDelay", tcpNoDelay);
            return this;
        }
        /**
         * Setting to improve TCP protocol performance.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder tcpNoDelay(String tcpNoDelay) {
            doSetProperty("tcpNoDelay", tcpNoDelay);
            return this;
        }
        /**
         * Option to disable throwing the HttpOperationFailedException in case
         * of failed responses from the remote server. This allows you to get
         * all responses regardless of the HTTP status code.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder throwExceptionOnFailure(
                Boolean throwExceptionOnFailure) {
            doSetProperty("throwExceptionOnFailure", throwExceptionOnFailure);
            return this;
        }
        /**
         * Option to disable throwing the HttpOperationFailedException in case
         * of failed responses from the remote server. This allows you to get
         * all responses regardless of the HTTP status code.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: true
         * Group: producer
         */
        default ElytronEndpointProducerBuilder throwExceptionOnFailure(
                String throwExceptionOnFailure) {
            doSetProperty("throwExceptionOnFailure", throwExceptionOnFailure);
            return this;
        }
        /**
         * If enabled and an Exchange failed processing on the consumer side and
         * if the caused Exception was send back serialized in the response as a
         * application/x-java-serialized-object content type. On the producer
         * side the exception will be deserialized and thrown as is instead of
         * the HttpOperationFailedException. The caused exception is required to
         * be serialized. This is by default turned off. If you enable this then
         * be aware that Java will deserialize the incoming data from the
         * request to Java and that can be a potential security risk.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Default: false
         * Group: producer
         */
        default ElytronEndpointProducerBuilder transferException(
                Boolean transferException) {
            doSetProperty("transferException", transferException);
            return this;
        }
        /**
         * If enabled and an Exchange failed processing on the consumer side and
         * if the caused Exception was send back serialized in the response as a
         * application/x-java-serialized-object content type. On the producer
         * side the exception will be deserialized and thrown as is instead of
         * the HttpOperationFailedException. The caused exception is required to
         * be serialized. This is by default turned off. If you enable this then
         * be aware that Java will deserialize the incoming data from the
         * request to Java and that can be a potential security risk.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Default: false
         * Group: producer
         */
        default ElytronEndpointProducerBuilder transferException(
                String transferException) {
            doSetProperty("transferException", transferException);
            return this;
        }
        /**
         * Timeout in milliseconds when sending to a websocket channel. The
         * default timeout is 30000 (30 seconds).
         *
         * The option is a: java.lang.Integer type.
         *
         * Default: 30000
         * Group: websocket
         */
        default ElytronEndpointProducerBuilder sendTimeout(Integer sendTimeout) {
            doSetProperty("sendTimeout", sendTimeout);
            return this;
        }
        /**
         * Timeout in milliseconds when sending to a websocket channel. The
         * default timeout is 30000 (30 seconds).
         *
         * The option will be converted to a java.lang.Integer
         * type.
         *
         * Default: 30000
         * Group: websocket
         */
        default ElytronEndpointProducerBuilder sendTimeout(String sendTimeout) {
            doSetProperty("sendTimeout", sendTimeout);
            return this;
        }
        /**
         * To send to all websocket subscribers. Can be used to configure on
         * endpoint level, instead of having to use the
         * UndertowConstants.SEND_TO_ALL header on the message.
         *
         * The option is a: java.lang.Boolean type.
         *
         * Group: websocket
         */
        default ElytronEndpointProducerBuilder sendToAll(Boolean sendToAll) {
            doSetProperty("sendToAll", sendToAll);
            return this;
        }
        /**
         * To send to all websocket subscribers. Can be used to configure on
         * endpoint level, instead of having to use the
         * UndertowConstants.SEND_TO_ALL header on the message.
         *
         * The option will be converted to a java.lang.Boolean
         * type.
         *
         * Group: websocket
         */
        default ElytronEndpointProducerBuilder sendToAll(String sendToAll) {
            doSetProperty("sendToAll", sendToAll);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option is a:
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointProducerBuilder sslContextParameters(
                Object sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option will be converted to a
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointProducerBuilder sslContextParameters(
                String sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint producers for the Elytron component.
     */
    public interface AdvancedElytronEndpointProducerBuilder
            extends
                EndpointProducerBuilder {
        default ElytronEndpointProducerBuilder basic() {
            return (ElytronEndpointProducerBuilder) this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option is a:
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder accessLogReceiver(
                Object accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option will be converted to a
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder accessLogReceiver(
                String accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder basicPropertyBinding(
                boolean basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder basicPropertyBinding(
                String basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option is a:
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder headerFilterStrategy(
                HeaderFilterStrategy headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option will be converted to a
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder headerFilterStrategy(
                String headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder synchronous(
                boolean synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder synchronous(
                String synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option is a:
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder undertowHttpBinding(
                Object undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option will be converted to a
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointProducerBuilder undertowHttpBinding(
                String undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
    }

    /**
     * Builder for endpoint for the Elytron component.
     */
    public interface ElytronEndpointBuilder
            extends
                ElytronEndpointConsumerBuilder,
                ElytronEndpointProducerBuilder {
        default AdvancedElytronEndpointBuilder advanced() {
            return (AdvancedElytronEndpointBuilder) this;
        }
        /**
         * Comma separated list of allowed roles.
         *
         * The option is a: java.lang.String type.
         *
         * Group: common
         */
        default ElytronEndpointBuilder allowedRoles(String allowedRoles) {
            doSetProperty("allowedRoles", allowedRoles);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointBuilder useStreaming(boolean useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * For HTTP endpoint: if true, text and binary messages will be wrapped
         * as java.io.InputStream before they are passed to an Exchange;
         * otherwise they will be passed as byte. For WebSocket endpoint: if
         * true, text and binary messages will be wrapped as java.io.Reader and
         * java.io.InputStream respectively before they are passed to an
         * Exchange; otherwise they will be passed as String and byte
         * respectively.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: common
         */
        default ElytronEndpointBuilder useStreaming(String useStreaming) {
            doSetProperty("useStreaming", useStreaming);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option is a:
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointBuilder sslContextParameters(
                Object sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
        /**
         * To configure security using SSLContextParameters.
         *
         * The option will be converted to a
         * org.apache.camel.support.jsse.SSLContextParameters type.
         *
         * Group: security
         */
        default ElytronEndpointBuilder sslContextParameters(
                String sslContextParameters) {
            doSetProperty("sslContextParameters", sslContextParameters);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint for the Elytron component.
     */
    public interface AdvancedElytronEndpointBuilder
            extends
                AdvancedElytronEndpointConsumerBuilder,
                AdvancedElytronEndpointProducerBuilder {
        default ElytronEndpointBuilder basic() {
            return (ElytronEndpointBuilder) this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option is a:
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder accessLogReceiver(
                Object accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Which Undertow AccessLogReciever should be used Will use
         * JBossLoggingAccessLogReceiver if not specifid.
         *
         * The option will be converted to a
         * io.undertow.server.handlers.accesslog.AccessLogReceiver
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder accessLogReceiver(
                String accessLogReceiver) {
            doSetProperty("accessLogReceiver", accessLogReceiver);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder basicPropertyBinding(
                boolean basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * Whether the endpoint should use basic property binding (Camel 2.x) or
         * the newer property binding with additional capabilities.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder basicPropertyBinding(
                String basicPropertyBinding) {
            doSetProperty("basicPropertyBinding", basicPropertyBinding);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option is a:
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder headerFilterStrategy(
                HeaderFilterStrategy headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * To use a custom HeaderFilterStrategy to filter header to and from
         * Camel message.
         *
         * The option will be converted to a
         * org.apache.camel.spi.HeaderFilterStrategy type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder headerFilterStrategy(
                String headerFilterStrategy) {
            doSetProperty("headerFilterStrategy", headerFilterStrategy);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder synchronous(boolean synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder synchronous(String synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option is a:
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder undertowHttpBinding(
                Object undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
        /**
         * To use a custom UndertowHttpBinding to control the mapping between
         * Camel message and undertow.
         *
         * The option will be converted to a
         * org.apache.camel.component.undertow.UndertowHttpBinding
         * type.
         *
         * Group: advanced
         */
        default AdvancedElytronEndpointBuilder undertowHttpBinding(
                String undertowHttpBinding) {
            doSetProperty("undertowHttpBinding", undertowHttpBinding);
            return this;
        }
    }

    public interface ElytronBuilders {
        /**
         * Elytron (camel-elytron)
         * The elytron component is allows you to work with the Elytron Security
         * Framework
         *
         * Category: http
         * Since: 3.1
         * Maven coordinates: org.apache.camel:camel-elytron
         *
         * Syntax: elytron:httpURI
         *
         * Path parameter: httpURI (required)
         * The url of the HTTP endpoint to use.
         */
        default ElytronEndpointBuilder elytron(String path) {
            return ElytronEndpointBuilderFactory.elytron(path);
        }
    }
    /**
     * Elytron (camel-elytron)
     * The elytron component is allows you to work with the Elytron Security
     * Framework
     *
     * Category: http
     * Since: 3.1
     * Maven coordinates: org.apache.camel:camel-elytron
     *
     * Syntax: elytron:httpURI
     *
     * Path parameter: httpURI (required)
     * The url of the HTTP endpoint to use.
     */
    static ElytronEndpointBuilder elytron(String path) {
        class ElytronEndpointBuilderImpl extends AbstractEndpointBuilder implements ElytronEndpointBuilder, AdvancedElytronEndpointBuilder {
            public ElytronEndpointBuilderImpl(String path) {
                super("elytron", path);
            }
        }
        return new ElytronEndpointBuilderImpl(path);
    }
}