using System;
using System.Text;
using QCRPG.Framework;

namespace QCRPG.TSL.BT.Packets;

public class EnhancedAcceptSynchronousConnectionRequest : PacketBase
{
	public class UserFieldsWrapper
	{
		public enum TransmitBandwidthEnum
		{
			TX_BANDWIDTH_IN_OCTETS_PER_SECOND,
			DONT_CARE,
			InvalidTransmitBandwidthValue
		}

		public static class TransmitBandwidthInfo
		{
			public static TransmitBandwidthEnum ValueToTransmitBandwidth(uint value)
			{
				if (value >= 0 && value <= 4294967294u)
				{
					return TransmitBandwidthEnum.TX_BANDWIDTH_IN_OCTETS_PER_SECOND;
				}
				if (value == uint.MaxValue)
				{
					return TransmitBandwidthEnum.DONT_CARE;
				}
				return TransmitBandwidthEnum.InvalidTransmitBandwidthValue;
			}

			public static uint TransmitBandwidthToValue(TransmitBandwidthEnum enumItem)
			{
				return enumItem switch
				{
					TransmitBandwidthEnum.TX_BANDWIDTH_IN_OCTETS_PER_SECOND => 0u, 
					TransmitBandwidthEnum.DONT_CARE => uint.MaxValue, 
					_ => uint.MaxValue, 
				};
			}

			public static string TransmitBandwidthToString(TransmitBandwidthEnum enumItem)
			{
				return enumItem switch
				{
					TransmitBandwidthEnum.TX_BANDWIDTH_IN_OCTETS_PER_SECOND => "Transmit bandwidth in octets per second", 
					TransmitBandwidthEnum.DONT_CARE => "Don't Care", 
					_ => "Invalid TransmitBandwidth Value", 
				};
			}

			public static string TransmitBandwidthToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0-0xFFFFFFFE = Transmit bandwidth in octets per second");
				stringBuilder.AppendLine("0xFFFFFFFF = Don't Care");
				return stringBuilder.ToString();
			}
		}

		public enum ReceiveBandwidthEnum
		{
			RX_BANDWIDTH_IN_OCTETS_PER_SECOND,
			DONT_CARE,
			InvalidReceiveBandwidthValue
		}

		public static class ReceiveBandwidthInfo
		{
			public static ReceiveBandwidthEnum ValueToReceiveBandwidth(uint value)
			{
				if (value >= 0 && value <= 4294967294u)
				{
					return ReceiveBandwidthEnum.RX_BANDWIDTH_IN_OCTETS_PER_SECOND;
				}
				if (value == uint.MaxValue)
				{
					return ReceiveBandwidthEnum.DONT_CARE;
				}
				return ReceiveBandwidthEnum.InvalidReceiveBandwidthValue;
			}

			public static uint ReceiveBandwidthToValue(ReceiveBandwidthEnum enumItem)
			{
				return enumItem switch
				{
					ReceiveBandwidthEnum.RX_BANDWIDTH_IN_OCTETS_PER_SECOND => 0u, 
					ReceiveBandwidthEnum.DONT_CARE => uint.MaxValue, 
					_ => uint.MaxValue, 
				};
			}

			public static string ReceiveBandwidthToString(ReceiveBandwidthEnum enumItem)
			{
				return enumItem switch
				{
					ReceiveBandwidthEnum.RX_BANDWIDTH_IN_OCTETS_PER_SECOND => "Recieve bandwidth in octets per second", 
					ReceiveBandwidthEnum.DONT_CARE => "Don't Care", 
					_ => "Invalid ReceiveBandwidth Value", 
				};
			}

			public static string ReceiveBandwidthToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0-0xFFFFFFFE = Recieve bandwidth in octets per second");
				stringBuilder.AppendLine("0xFFFFFFFF = Don't Care");
				return stringBuilder.ToString();
			}
		}

		public enum TransmitCodecFrameSizeEnum
		{
			Reserved,
			THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS,
			InvalidTransmitCodecFrameSizeValue
		}

		public static class TransmitCodecFrameSizeInfo
		{
			public static TransmitCodecFrameSizeEnum ValueToTransmitCodecFrameSize(uint value)
			{
				if (value == 0)
				{
					return TransmitCodecFrameSizeEnum.Reserved;
				}
				if (value >= 1 && value <= 65535)
				{
					return TransmitCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS;
				}
				return TransmitCodecFrameSizeEnum.InvalidTransmitCodecFrameSizeValue;
			}

			public static uint TransmitCodecFrameSizeToValue(TransmitCodecFrameSizeEnum enumItem)
			{
				return enumItem switch
				{
					TransmitCodecFrameSizeEnum.Reserved => 0u, 
					TransmitCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS => 1u, 
					_ => uint.MaxValue, 
				};
			}

			public static string TransmitCodecFrameSizeToString(TransmitCodecFrameSizeEnum enumItem)
			{
				return enumItem switch
				{
					TransmitCodecFrameSizeEnum.Reserved => "Reserved", 
					TransmitCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS => "the actual size of the over-the-air encoded frame in octets", 
					_ => "Invalid TransmitCodecFrameSize Value", 
				};
			}

			public static string TransmitCodecFrameSizeToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0 = Reserved");
				stringBuilder.AppendLine("0x1-0xFFFF = the actual size of the over-the-air encoded frame in octets");
				return stringBuilder.ToString();
			}
		}

		public enum ReceiveCodecFrameSizeEnum
		{
			Reserved,
			THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS,
			InvalidReceiveCodecFrameSizeValue
		}

		public static class ReceiveCodecFrameSizeInfo
		{
			public static ReceiveCodecFrameSizeEnum ValueToReceiveCodecFrameSize(uint value)
			{
				if (value == 0)
				{
					return ReceiveCodecFrameSizeEnum.Reserved;
				}
				if (value >= 1 && value <= 65535)
				{
					return ReceiveCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS;
				}
				return ReceiveCodecFrameSizeEnum.InvalidReceiveCodecFrameSizeValue;
			}

			public static uint ReceiveCodecFrameSizeToValue(ReceiveCodecFrameSizeEnum enumItem)
			{
				return enumItem switch
				{
					ReceiveCodecFrameSizeEnum.Reserved => 0u, 
					ReceiveCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS => 1u, 
					_ => uint.MaxValue, 
				};
			}

			public static string ReceiveCodecFrameSizeToString(ReceiveCodecFrameSizeEnum enumItem)
			{
				return enumItem switch
				{
					ReceiveCodecFrameSizeEnum.Reserved => "Reserved", 
					ReceiveCodecFrameSizeEnum.THE_ACTUAL_SIZE_OF_THE_OTA_ENCODED_FRAME_IN_OCTETS => "the actual size of the over-the-air encoded frame in octets", 
					_ => "Invalid ReceiveCodecFrameSize Value", 
				};
			}

			public static string ReceiveCodecFrameSizeToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0 = Reserved");
				stringBuilder.AppendLine("0x1-0xFFFF = the actual size of the over-the-air encoded frame in octets");
				return stringBuilder.ToString();
			}
		}

		public enum InputDataPathEnum
		{
			PFAL_VOICE_PATH_ID_HCI,
			PFAL_VOICE_PATH_ID_ACI0_SLOT0,
			PFAL_VOICE_PATH_ID_ACI0_SLOT1,
			PFAL_VOICE_PATH_ID_ACI0_SLOT2,
			PFAL_VOICE_PATH_ID_ACI1_SLOT0,
			PFAL_VOICE_PATH_ID_ACI1_SLOT1,
			PFAL_VOICE_PATH_ID_ACI1_SLOT2,
			PFAL_VOICE_PATH_ID_ACI2_SLOT0,
			PFAL_VOICE_PATH_ID_ACI2_SLOT1,
			PFAL_VOICE_PATH_ID_ACI2_SLOT2,
			PFAL_VOICE_PATH_ID_AUP0,
			PFAL_VOICE_PATH_ID_AUP1,
			PFAL_VOICE_PATH_ID_AUP2,
			PFAL_VOICE_PATH_ID_DISABLED,
			PFAL_VOICE_PATH_ID_TEST_MODE,
			InvalidInputDataPathValue
		}

		public static class InputDataPathInfo
		{
			public static InputDataPathEnum ValueToInputDataPath(uint value)
			{
				return value switch
				{
					0u => InputDataPathEnum.PFAL_VOICE_PATH_ID_HCI, 
					1u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0, 
					2u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1, 
					3u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2, 
					4u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0, 
					5u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1, 
					6u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2, 
					7u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0, 
					8u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1, 
					9u => InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2, 
					10u => InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0, 
					11u => InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1, 
					12u => InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2, 
					254u => InputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED, 
					255u => InputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE, 
					_ => InputDataPathEnum.InvalidInputDataPathValue, 
				};
			}

			public static uint InputDataPathToValue(InputDataPathEnum enumItem)
			{
				return enumItem switch
				{
					InputDataPathEnum.PFAL_VOICE_PATH_ID_HCI => 0u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0 => 1u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1 => 2u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2 => 3u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0 => 4u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1 => 5u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2 => 6u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0 => 7u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1 => 8u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2 => 9u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0 => 10u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1 => 11u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2 => 12u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED => 254u, 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE => 255u, 
					_ => uint.MaxValue, 
				};
			}

			public static string InputDataPathToString(InputDataPathEnum enumItem)
			{
				return enumItem switch
				{
					InputDataPathEnum.PFAL_VOICE_PATH_ID_HCI => "PFAL_VOICE_PATH_ID_HCI", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0 => "PFAL_VOICE_PATH_ID_ACI0_SLOT0", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1 => "PFAL_VOICE_PATH_ID_ACI0_SLOT1", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2 => "PFAL_VOICE_PATH_ID_ACI0_SLOT2", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0 => "PFAL_VOICE_PATH_ID_ACI1_SLOT0", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1 => "PFAL_VOICE_PATH_ID_ACI1_SLOT1", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2 => "PFAL_VOICE_PATH_ID_ACI1_SLOT2", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0 => "PFAL_VOICE_PATH_ID_ACI2_SLOT0", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1 => "PFAL_VOICE_PATH_ID_ACI2_SLOT1", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2 => "PFAL_VOICE_PATH_ID_ACI2_SLOT2", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0 => "PFAL_VOICE_PATH_ID_AUP0", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1 => "PFAL_VOICE_PATH_ID_AUP1", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2 => "PFAL_VOICE_PATH_ID_AUP2", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED => "PFAL_VOICE_PATH_ID_DISABLED", 
					InputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE => "PFAL_VOICE_PATH_ID_TEST_MODE", 
					_ => "Invalid InputDataPath Value", 
				};
			}

			public static string InputDataPathToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0 = PFAL_VOICE_PATH_ID_HCI");
				stringBuilder.AppendLine("0x1 = PFAL_VOICE_PATH_ID_ACI0_SLOT0");
				stringBuilder.AppendLine("0x2 = PFAL_VOICE_PATH_ID_ACI0_SLOT1");
				stringBuilder.AppendLine("0x3 = PFAL_VOICE_PATH_ID_ACI0_SLOT2");
				stringBuilder.AppendLine("0x4 = PFAL_VOICE_PATH_ID_ACI1_SLOT0");
				stringBuilder.AppendLine("0x5 = PFAL_VOICE_PATH_ID_ACI1_SLOT1");
				stringBuilder.AppendLine("0x6 = PFAL_VOICE_PATH_ID_ACI1_SLOT2");
				stringBuilder.AppendLine("0x7 = PFAL_VOICE_PATH_ID_ACI2_SLOT0");
				stringBuilder.AppendLine("0x8 = PFAL_VOICE_PATH_ID_ACI2_SLOT1");
				stringBuilder.AppendLine("0x9 = PFAL_VOICE_PATH_ID_ACI2_SLOT2");
				stringBuilder.AppendLine("0xA = PFAL_VOICE_PATH_ID_AUP0");
				stringBuilder.AppendLine("0xB = PFAL_VOICE_PATH_ID_AUP1");
				stringBuilder.AppendLine("0xC = PFAL_VOICE_PATH_ID_AUP2");
				stringBuilder.AppendLine("0xFE = PFAL_VOICE_PATH_ID_DISABLED");
				stringBuilder.AppendLine("0xFF = PFAL_VOICE_PATH_ID_TEST_MODE");
				return stringBuilder.ToString();
			}
		}

		public enum OutputDataPathEnum
		{
			PFAL_VOICE_PATH_ID_HCI,
			PFAL_VOICE_PATH_ID_ACI0_SLOT0,
			PFAL_VOICE_PATH_ID_ACI0_SLOT1,
			PFAL_VOICE_PATH_ID_ACI0_SLOT2,
			PFAL_VOICE_PATH_ID_ACI1_SLOT0,
			PFAL_VOICE_PATH_ID_ACI1_SLOT1,
			PFAL_VOICE_PATH_ID_ACI1_SLOT2,
			PFAL_VOICE_PATH_ID_ACI2_SLOT0,
			PFAL_VOICE_PATH_ID_ACI2_SLOT1,
			PFAL_VOICE_PATH_ID_ACI2_SLOT2,
			PFAL_VOICE_PATH_ID_AUP0,
			PFAL_VOICE_PATH_ID_AUP1,
			PFAL_VOICE_PATH_ID_AUP2,
			PFAL_VOICE_PATH_ID_DISABLED,
			PFAL_VOICE_PATH_ID_TEST_MODE,
			InvalidOutputDataPathValue
		}

		public static class OutputDataPathInfo
		{
			public static OutputDataPathEnum ValueToOutputDataPath(uint value)
			{
				return value switch
				{
					0u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_HCI, 
					1u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0, 
					2u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1, 
					3u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2, 
					4u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0, 
					5u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1, 
					6u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2, 
					7u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0, 
					8u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1, 
					9u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2, 
					10u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0, 
					11u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1, 
					12u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2, 
					254u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED, 
					255u => OutputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE, 
					_ => OutputDataPathEnum.InvalidOutputDataPathValue, 
				};
			}

			public static uint OutputDataPathToValue(OutputDataPathEnum enumItem)
			{
				return enumItem switch
				{
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_HCI => 0u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0 => 1u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1 => 2u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2 => 3u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0 => 4u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1 => 5u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2 => 6u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0 => 7u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1 => 8u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2 => 9u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0 => 10u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1 => 11u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2 => 12u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED => 254u, 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE => 255u, 
					_ => uint.MaxValue, 
				};
			}

			public static string OutputDataPathToString(OutputDataPathEnum enumItem)
			{
				return enumItem switch
				{
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_HCI => "PFAL_VOICE_PATH_ID_HCI", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT0 => "PFAL_VOICE_PATH_ID_ACI0_SLOT0", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT1 => "PFAL_VOICE_PATH_ID_ACI0_SLOT1", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI0_SLOT2 => "PFAL_VOICE_PATH_ID_ACI0_SLOT2", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT0 => "PFAL_VOICE_PATH_ID_ACI1_SLOT0", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT1 => "PFAL_VOICE_PATH_ID_ACI1_SLOT1", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI1_SLOT2 => "PFAL_VOICE_PATH_ID_ACI1_SLOT2", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT0 => "PFAL_VOICE_PATH_ID_ACI2_SLOT0", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT1 => "PFAL_VOICE_PATH_ID_ACI2_SLOT1", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_ACI2_SLOT2 => "PFAL_VOICE_PATH_ID_ACI2_SLOT2", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP0 => "PFAL_VOICE_PATH_ID_AUP0", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP1 => "PFAL_VOICE_PATH_ID_AUP1", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_AUP2 => "PFAL_VOICE_PATH_ID_AUP2", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_DISABLED => "PFAL_VOICE_PATH_ID_DISABLED", 
					OutputDataPathEnum.PFAL_VOICE_PATH_ID_TEST_MODE => "PFAL_VOICE_PATH_ID_TEST_MODE", 
					_ => "Invalid OutputDataPath Value", 
				};
			}

			public static string OutputDataPathToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0 = PFAL_VOICE_PATH_ID_HCI");
				stringBuilder.AppendLine("0x1 = PFAL_VOICE_PATH_ID_ACI0_SLOT0");
				stringBuilder.AppendLine("0x2 = PFAL_VOICE_PATH_ID_ACI0_SLOT1");
				stringBuilder.AppendLine("0x3 = PFAL_VOICE_PATH_ID_ACI0_SLOT2");
				stringBuilder.AppendLine("0x4 = PFAL_VOICE_PATH_ID_ACI1_SLOT0");
				stringBuilder.AppendLine("0x5 = PFAL_VOICE_PATH_ID_ACI1_SLOT1");
				stringBuilder.AppendLine("0x6 = PFAL_VOICE_PATH_ID_ACI1_SLOT2");
				stringBuilder.AppendLine("0x7 = PFAL_VOICE_PATH_ID_ACI2_SLOT0");
				stringBuilder.AppendLine("0x8 = PFAL_VOICE_PATH_ID_ACI2_SLOT1");
				stringBuilder.AppendLine("0x9 = PFAL_VOICE_PATH_ID_ACI2_SLOT2");
				stringBuilder.AppendLine("0xA = PFAL_VOICE_PATH_ID_AUP0");
				stringBuilder.AppendLine("0xB = PFAL_VOICE_PATH_ID_AUP1");
				stringBuilder.AppendLine("0xC = PFAL_VOICE_PATH_ID_AUP2");
				stringBuilder.AppendLine("0xFE = PFAL_VOICE_PATH_ID_DISABLED");
				stringBuilder.AppendLine("0xFF = PFAL_VOICE_PATH_ID_TEST_MODE");
				return stringBuilder.ToString();
			}
		}

		public enum RetransmissionEffortEnum
		{
			NO_RETRANSMISSIONS,
			AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_POWER_CONSUMPTION,
			AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_LINK_QUALITY,
			Reserved,
			DONT_CARE,
			InvalidRetransmissionEffortValue
		}

		public static class RetransmissionEffortInfo
		{
			public static RetransmissionEffortEnum ValueToRetransmissionEffort(uint value)
			{
				switch (value)
				{
				case 0u:
					return RetransmissionEffortEnum.NO_RETRANSMISSIONS;
				case 1u:
					return RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_POWER_CONSUMPTION;
				case 2u:
					return RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_LINK_QUALITY;
				default:
					if (value >= 3 && value <= 254)
					{
						return RetransmissionEffortEnum.Reserved;
					}
					if (value == 255)
					{
						return RetransmissionEffortEnum.DONT_CARE;
					}
					return RetransmissionEffortEnum.InvalidRetransmissionEffortValue;
				}
			}

			public static uint RetransmissionEffortToValue(RetransmissionEffortEnum enumItem)
			{
				return enumItem switch
				{
					RetransmissionEffortEnum.NO_RETRANSMISSIONS => 0u, 
					RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_POWER_CONSUMPTION => 1u, 
					RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_LINK_QUALITY => 2u, 
					RetransmissionEffortEnum.Reserved => 3u, 
					RetransmissionEffortEnum.DONT_CARE => 255u, 
					_ => uint.MaxValue, 
				};
			}

			public static string RetransmissionEffortToString(RetransmissionEffortEnum enumItem)
			{
				return enumItem switch
				{
					RetransmissionEffortEnum.NO_RETRANSMISSIONS => "No Retransmissions", 
					RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_POWER_CONSUMPTION => "At least one retransmission, optimize for power consumption", 
					RetransmissionEffortEnum.AT_LEAST_ONE_RETRANSMISSION_OPTIMIZE_FOR_LINK_QUALITY => "At least one retransmission, optimize for link quality", 
					RetransmissionEffortEnum.Reserved => "Reserved", 
					RetransmissionEffortEnum.DONT_CARE => "Don't Care", 
					_ => "Invalid RetransmissionEffort Value", 
				};
			}

			public static string RetransmissionEffortToDescription()
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.AppendLine("0x0 = No Retransmissions");
				stringBuilder.AppendLine("0x1 = At least one retransmission, optimize for power consumption");
				stringBuilder.AppendLine("0x2 = At least one retransmission, optimize for link quality");
				stringBuilder.AppendLine("0x3-0xFE = Reserved");
				stringBuilder.AppendLine("0xFF = Don't Care");
				return stringBuilder.ToString();
			}
		}

		private ulong _BdAddr;

		private uint _TransmitBandwidth;

		private uint _ReceiveBandwidth;

		private ulong _TransmitCodingFormat;

		private ulong _ReceiveCodingFormat;

		private uint _TransmitCodecFrameSize;

		private uint _ReceiveCodecFrameSize;

		private uint _InputBandwidth;

		private uint _OutputBandwidth;

		private ulong _InputCodingFormat;

		private ulong _OutputCodingFormat;

		private uint _InputCodeDataSize;

		private uint _OutputCodeDataSize;

		private uint _InputPcmDataFormat;

		private uint _OutputPcmDataFormat;

		private uint _InputPcmSamplePayloadMsbPosition;

		private uint _OutputPcmSamplePayloadMsbPosition;

		private uint _InputDataPath;

		private uint _OutputDataPath;

		private uint _InputTransportUnitSize;

		private uint _OutputTransportUnitSize;

		private uint _MaxLatency;

		private uint _PacketType;

		private uint _RetransmissionEffort;

		public ulong BdAddr
		{
			get
			{
				return _BdAddr;
			}
			set
			{
				_BdAddr = value;
			}
		}

		public uint TransmitBandwidth
		{
			get
			{
				return _TransmitBandwidth;
			}
			set
			{
				_TransmitBandwidth = value;
			}
		}

		public uint ReceiveBandwidth
		{
			get
			{
				return _ReceiveBandwidth;
			}
			set
			{
				_ReceiveBandwidth = value;
			}
		}

		public ulong TransmitCodingFormat
		{
			get
			{
				return _TransmitCodingFormat;
			}
			set
			{
				_TransmitCodingFormat = value;
			}
		}

		public ulong ReceiveCodingFormat
		{
			get
			{
				return _ReceiveCodingFormat;
			}
			set
			{
				_ReceiveCodingFormat = value;
			}
		}

		public uint TransmitCodecFrameSize
		{
			get
			{
				return _TransmitCodecFrameSize;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for TransmitCodecFrameSize is 0xFFFF");
				}
				_TransmitCodecFrameSize = value;
			}
		}

		public uint ReceiveCodecFrameSize
		{
			get
			{
				return _ReceiveCodecFrameSize;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for ReceiveCodecFrameSize is 0xFFFF");
				}
				_ReceiveCodecFrameSize = value;
			}
		}

		public uint InputBandwidth
		{
			get
			{
				return _InputBandwidth;
			}
			set
			{
				_InputBandwidth = value;
			}
		}

		public uint OutputBandwidth
		{
			get
			{
				return _OutputBandwidth;
			}
			set
			{
				_OutputBandwidth = value;
			}
		}

		public ulong InputCodingFormat
		{
			get
			{
				return _InputCodingFormat;
			}
			set
			{
				_InputCodingFormat = value;
			}
		}

		public ulong OutputCodingFormat
		{
			get
			{
				return _OutputCodingFormat;
			}
			set
			{
				_OutputCodingFormat = value;
			}
		}

		public uint InputCodeDataSize
		{
			get
			{
				return _InputCodeDataSize;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for InputCodeDataSize is 0xFFFF");
				}
				_InputCodeDataSize = value;
			}
		}

		public uint OutputCodeDataSize
		{
			get
			{
				return _OutputCodeDataSize;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for OutputCodeDataSize is 0xFFFF");
				}
				_OutputCodeDataSize = value;
			}
		}

		public uint InputPcmDataFormat
		{
			get
			{
				return _InputPcmDataFormat;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for InputPcmDataFormat is 0xFF");
				}
				_InputPcmDataFormat = value;
			}
		}

		public uint OutputPcmDataFormat
		{
			get
			{
				return _OutputPcmDataFormat;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for OutputPcmDataFormat is 0xFF");
				}
				_OutputPcmDataFormat = value;
			}
		}

		public uint InputPcmSamplePayloadMsbPosition
		{
			get
			{
				return _InputPcmSamplePayloadMsbPosition;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for InputPcmSamplePayloadMsbPosition is 0xFF");
				}
				_InputPcmSamplePayloadMsbPosition = value;
			}
		}

		public uint OutputPcmSamplePayloadMsbPosition
		{
			get
			{
				return _OutputPcmSamplePayloadMsbPosition;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for OutputPcmSamplePayloadMsbPosition is 0xFF");
				}
				_OutputPcmSamplePayloadMsbPosition = value;
			}
		}

		public uint InputDataPath
		{
			get
			{
				return _InputDataPath;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for InputDataPath is 0xFF");
				}
				_InputDataPath = value;
			}
		}

		public uint OutputDataPath
		{
			get
			{
				return _OutputDataPath;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for OutputDataPath is 0xFF");
				}
				_OutputDataPath = value;
			}
		}

		public uint InputTransportUnitSize
		{
			get
			{
				return _InputTransportUnitSize;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for InputTransportUnitSize is 0xFF");
				}
				_InputTransportUnitSize = value;
			}
		}

		public uint OutputTransportUnitSize
		{
			get
			{
				return _OutputTransportUnitSize;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for OutputTransportUnitSize is 0xFF");
				}
				_OutputTransportUnitSize = value;
			}
		}

		public uint MaxLatency
		{
			get
			{
				return _MaxLatency;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for MaxLatency is 0xFFFF");
				}
				_MaxLatency = value;
			}
		}

		public uint PacketType
		{
			get
			{
				return _PacketType;
			}
			set
			{
				if (value > 65535)
				{
					throw new Exception("Maximum possible value for PacketType is 0xFFFF");
				}
				_PacketType = value;
			}
		}

		public uint RetransmissionEffort
		{
			get
			{
				return _RetransmissionEffort;
			}
			set
			{
				if (value > 255)
				{
					throw new Exception("Maximum possible value for RetransmissionEffort is 0xFF");
				}
				_RetransmissionEffort = value;
			}
		}

		public TransmitBandwidthEnum GetTransmitBandwidthAsTransmitBandwidthEnum()
		{
			return TransmitBandwidthInfo.ValueToTransmitBandwidth(_TransmitBandwidth);
		}

		public void SetTransmitBandwidthAsTransmitBandwidthEnum(TransmitBandwidthEnum enumItem)
		{
			TransmitBandwidth = TransmitBandwidthInfo.TransmitBandwidthToValue(enumItem);
		}

		public ReceiveBandwidthEnum GetReceiveBandwidthAsReceiveBandwidthEnum()
		{
			return ReceiveBandwidthInfo.ValueToReceiveBandwidth(_ReceiveBandwidth);
		}

		public void SetReceiveBandwidthAsReceiveBandwidthEnum(ReceiveBandwidthEnum enumItem)
		{
			ReceiveBandwidth = ReceiveBandwidthInfo.ReceiveBandwidthToValue(enumItem);
		}

		public TransmitCodecFrameSizeEnum GetTransmitCodecFrameSizeAsTransmitCodecFrameSizeEnum()
		{
			return TransmitCodecFrameSizeInfo.ValueToTransmitCodecFrameSize(_TransmitCodecFrameSize);
		}

		public void SetTransmitCodecFrameSizeAsTransmitCodecFrameSizeEnum(TransmitCodecFrameSizeEnum enumItem)
		{
			TransmitCodecFrameSize = TransmitCodecFrameSizeInfo.TransmitCodecFrameSizeToValue(enumItem);
		}

		public ReceiveCodecFrameSizeEnum GetReceiveCodecFrameSizeAsReceiveCodecFrameSizeEnum()
		{
			return ReceiveCodecFrameSizeInfo.ValueToReceiveCodecFrameSize(_ReceiveCodecFrameSize);
		}

		public void SetReceiveCodecFrameSizeAsReceiveCodecFrameSizeEnum(ReceiveCodecFrameSizeEnum enumItem)
		{
			ReceiveCodecFrameSize = ReceiveCodecFrameSizeInfo.ReceiveCodecFrameSizeToValue(enumItem);
		}

		public InputDataPathEnum GetInputDataPathAsInputDataPathEnum()
		{
			return InputDataPathInfo.ValueToInputDataPath(_InputDataPath);
		}

		public void SetInputDataPathAsInputDataPathEnum(InputDataPathEnum enumItem)
		{
			InputDataPath = InputDataPathInfo.InputDataPathToValue(enumItem);
		}

		public OutputDataPathEnum GetOutputDataPathAsOutputDataPathEnum()
		{
			return OutputDataPathInfo.ValueToOutputDataPath(_OutputDataPath);
		}

		public void SetOutputDataPathAsOutputDataPathEnum(OutputDataPathEnum enumItem)
		{
			OutputDataPath = OutputDataPathInfo.OutputDataPathToValue(enumItem);
		}

		public EnhancedSynchronousPacketTypeEnumCollection GetPacketTypeAsEnhancedSynchronousPacketTypeEnumCollection()
		{
			return EnhancedSynchronousPacketTypeInfo.ValueToEnhancedSynchronousPacketType(_PacketType);
		}

		public void SetPacketTypeAsEnhancedSynchronousPacketTypeEnumCollection(EnhancedSynchronousPacketTypeEnumCollection enumCollection)
		{
			PacketType = EnhancedSynchronousPacketTypeInfo.EnhancedSynchronousPacketTypeToValue(enumCollection);
		}

		public RetransmissionEffortEnum GetRetransmissionEffortAsRetransmissionEffortEnum()
		{
			return RetransmissionEffortInfo.ValueToRetransmissionEffort(_RetransmissionEffort);
		}

		public void SetRetransmissionEffortAsRetransmissionEffortEnum(RetransmissionEffortEnum enumItem)
		{
			RetransmissionEffort = RetransmissionEffortInfo.RetransmissionEffortToValue(enumItem);
		}
	}

	private const uint _Opcode = 1086u;

	private Type[] expectedResponseTypes = new Type[3]
	{
		typeof(CommandStatusForEnhancedAcceptSynchronousConnectionRequest),
		typeof(SynchronousConnectionComplete),
		typeof(ConnectionComplete)
	};

	private PacketInfoBase info;

	private uint _PayloadLength;

	public UserFieldsWrapper _UserFields = new UserFieldsWrapper();

	public override PacketType Type => PacketType.Command;

	public override Type[] ExpectedResponseTypes => expectedResponseTypes;

	public override PacketInfoBase Info
	{
		get
		{
			if (info == null)
			{
				info = new EnhancedAcceptSynchronousConnectionRequestInfo(this);
			}
			return info;
		}
	}

	public uint Opcode => 1086u;

	public uint PayloadLength
	{
		get
		{
			ToBitString();
			return _PayloadLength;
		}
	}

	public UserFieldsWrapper UserFields => _UserFields;

	public override void SetDefaultValues()
	{
		UserFields.TransmitBandwidth = uint.MaxValue;
		UserFields.ReceiveBandwidth = uint.MaxValue;
		UserFields.MaxLatency = 65535u;
		UserFields.PacketType = 63u;
		UserFields.RetransmissionEffort = 255u;
	}

	protected override bool FromBitBuilder(ref BitBuilder bitBuilder)
	{
		if (bitBuilder.RemoveBitsAsUintLittleEndian(16) != Opcode)
		{
			return false;
		}
		_PayloadLength = bitBuilder.RemoveBitsAsUint(8);
		int numberOfBits = bitBuilder.GetNumberOfBits();
		if (numberOfBits > _PayloadLength * 8 + 7)
		{
			return false;
		}
		if (numberOfBits < _PayloadLength * 8)
		{
			return false;
		}
		UserFields.BdAddr = bitBuilder.RemoveBitsAsUlongLittleEndian(48);
		UserFields.TransmitBandwidth = bitBuilder.RemoveBitsAsUintLittleEndian(32);
		UserFields.ReceiveBandwidth = bitBuilder.RemoveBitsAsUintLittleEndian(32);
		UserFields.TransmitCodingFormat = bitBuilder.RemoveBitsAsUlong(40);
		UserFields.ReceiveCodingFormat = bitBuilder.RemoveBitsAsUlong(40);
		UserFields.TransmitCodecFrameSize = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.ReceiveCodecFrameSize = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.InputBandwidth = bitBuilder.RemoveBitsAsUintLittleEndian(32);
		UserFields.OutputBandwidth = bitBuilder.RemoveBitsAsUintLittleEndian(32);
		UserFields.InputCodingFormat = bitBuilder.RemoveBitsAsUlong(40);
		UserFields.OutputCodingFormat = bitBuilder.RemoveBitsAsUlong(40);
		UserFields.InputCodeDataSize = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.OutputCodeDataSize = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.InputPcmDataFormat = bitBuilder.RemoveBitsAsUint(8);
		UserFields.OutputPcmDataFormat = bitBuilder.RemoveBitsAsUint(8);
		UserFields.InputPcmSamplePayloadMsbPosition = bitBuilder.RemoveBitsAsUint(8);
		UserFields.OutputPcmSamplePayloadMsbPosition = bitBuilder.RemoveBitsAsUint(8);
		UserFields.InputDataPath = bitBuilder.RemoveBitsAsUint(8);
		UserFields.OutputDataPath = bitBuilder.RemoveBitsAsUint(8);
		UserFields.InputTransportUnitSize = bitBuilder.RemoveBitsAsUint(8);
		UserFields.OutputTransportUnitSize = bitBuilder.RemoveBitsAsUint(8);
		UserFields.MaxLatency = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.PacketType = bitBuilder.RemoveBitsAsUintLittleEndian(16);
		UserFields.RetransmissionEffort = bitBuilder.RemoveBitsAsUint(8);
		if (bitBuilder.GetNumberOfBits() > 7)
		{
			return false;
		}
		return true;
	}

	public override string ToBitString()
	{
		BitBuilder bitBuilder = new BitBuilder();
		bitBuilder.AddBitsAsUintLittleEndian(Opcode, 16);
		int numberOfBits = bitBuilder.GetNumberOfBits();
		bitBuilder.AddBitsAsUint(0u, 8);
		bitBuilder.AddBitsAsUlongLittleEndian(UserFields.BdAddr, 48);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.TransmitBandwidth, 32);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.ReceiveBandwidth, 32);
		bitBuilder.AddBitsAsUlong(UserFields.TransmitCodingFormat, 40);
		bitBuilder.AddBitsAsUlong(UserFields.ReceiveCodingFormat, 40);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.TransmitCodecFrameSize, 16);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.ReceiveCodecFrameSize, 16);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.InputBandwidth, 32);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.OutputBandwidth, 32);
		bitBuilder.AddBitsAsUlong(UserFields.InputCodingFormat, 40);
		bitBuilder.AddBitsAsUlong(UserFields.OutputCodingFormat, 40);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.InputCodeDataSize, 16);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.OutputCodeDataSize, 16);
		bitBuilder.AddBitsAsUint(UserFields.InputPcmDataFormat, 8);
		bitBuilder.AddBitsAsUint(UserFields.OutputPcmDataFormat, 8);
		bitBuilder.AddBitsAsUint(UserFields.InputPcmSamplePayloadMsbPosition, 8);
		bitBuilder.AddBitsAsUint(UserFields.OutputPcmSamplePayloadMsbPosition, 8);
		bitBuilder.AddBitsAsUint(UserFields.InputDataPath, 8);
		bitBuilder.AddBitsAsUint(UserFields.OutputDataPath, 8);
		bitBuilder.AddBitsAsUint(UserFields.InputTransportUnitSize, 8);
		bitBuilder.AddBitsAsUint(UserFields.OutputTransportUnitSize, 8);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.MaxLatency, 16);
		bitBuilder.AddBitsAsUintLittleEndian(UserFields.PacketType, 16);
		bitBuilder.AddBitsAsUint(UserFields.RetransmissionEffort, 8);
		_PayloadLength = (uint)((bitBuilder.GetNumberOfBits() - numberOfBits - 8) / 8);
		if ((bitBuilder.GetNumberOfBits() - numberOfBits - 8) % 8 != 0)
		{
			_PayloadLength++;
		}
		bitBuilder.ChangeBitsAsUint(numberOfBits, _PayloadLength, 8);
		return bitBuilder.ToString();
	}
}
