// @generated by libremetaverse-codegen; DO NOT EDIT.
// Regenerate: cargo run -p libremetaverse-codegen -- generate
// Generator: packets
// Source: codegen/inputs/message_template.msg sha256=15e524a46a9a449ead33c26d495a292ae2e100e641a408ac66ef63b8a7a2489d license=BSD-3-Clause

#![allow(
    clippy::cast_possible_truncation,
    clippy::cast_possible_wrap,
    clippy::cast_sign_loss,
    clippy::collapsible_if,
    clippy::similar_names,
    clippy::too_many_lines,
    clippy::unnecessary_wraps,
    clippy::vec_init_then_push,
    clippy::wrong_self_convention
)]
pub const GOLDEN_GENERATOR_SOURCE: &str = "SourceGenerators/PacketSourceGenerator/PacketSourceGenerator.cs";
pub const GOLDEN_GENERATOR_SHA256: &str = "8e63c0356cd0269e10521d15fbcde780cf58f821935601b4f223933930db758f";
pub const GOLDEN_GENERATOR_LICENSE: &str = "BSD-3-Clause";
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum FieldKind {
    U8,
    U16,
    U32,
    U64,
    S8,
    S16,
    S32,
    F32,
    F64,
    LlUuid,
    Bool,
    LlVector3,
    LlVector3d,
    LlVector4,
    LlQuaternion,
    IpAddr,
    IpPort,
    Variable,
    Fixed,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BlockRepetition {
    Single,
    Multiple(usize),
    Variable,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct FieldDescriptor {
    pub name: &'static str,
    pub kind: FieldKind,
    pub count: usize,
    pub fixed_width: usize,
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct BlockDescriptor {
    pub name: &'static str,
    pub repetition: BlockRepetition,
    pub fields: &'static [FieldDescriptor],
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct PacketDescriptor {
    pub name: &'static str,
    pub packet_type: PacketType,
    pub id: u16,
    pub frequency: crate::PacketFrequency,
    pub trusted: bool,
    pub zerocoded: bool,
    pub flags: &'static [&'static str],
    pub blocks: &'static [BlockDescriptor],
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
#[repr(i32)]
pub enum PacketType {
    Default = 0,
    TestMessage = 0x1_0001,
    PacketAck = 0x1_fffb,
    OpenCircuit = 0x1_fffc,
    CloseCircuit = 0x1_fffd,
    AddCircuitCode = 0x1_0002,
    UseCircuitCode = 0x1_0003,
    AvatarTextureUpdate = 0x1_0004,
    SimulatorMapUpdate = 0x1_0005,
    SimulatorSetMap = 0x1_0006,
    SubscribeLoad = 0x1_0007,
    UnsubscribeLoad = 0x1_0008,
    SimulatorReady = 0x1_0009,
    TelehubInfo = 0x1_000a,
    SimulatorPresentAtLocation = 0x1_000b,
    SimulatorLoad = 0x1_000c,
    SimulatorShutdownRequest = 0x1_000d,
    RegionPresenceRequestByRegionID = 0x1_000e,
    RegionPresenceRequestByHandle = 0x1_000f,
    RegionPresenceResponse = 0x1_0010,
    UpdateSimulator = 0x1_0011,
    LogDwellTime = 0x1_0012,
    FeatureDisabled = 0x1_0013,
    LogFailedMoneyTransaction = 0x1_0014,
    UserReportInternal = 0x1_0015,
    SetSimStatusInDatabase = 0x1_0016,
    SetSimPresenceInDatabase = 0x1_0017,
    EconomyDataRequest = 0x1_0018,
    EconomyData = 0x1_0019,
    AvatarPickerRequest = 0x1_001a,
    AvatarPickerRequestBackend = 0x1_001b,
    AvatarPickerReply = 0x1_001c,
    PlacesQuery = 0x1_001d,
    PlacesReply = 0x1_001e,
    DirFindQuery = 0x1_001f,
    DirFindQueryBackend = 0x1_0020,
    DirPlacesQuery = 0x1_0021,
    DirPlacesQueryBackend = 0x1_0022,
    DirPlacesReply = 0x1_0023,
    DirPeopleReply = 0x1_0024,
    DirEventsReply = 0x1_0025,
    DirGroupsReply = 0x1_0026,
    DirClassifiedQuery = 0x1_0027,
    DirClassifiedQueryBackend = 0x1_0028,
    DirClassifiedReply = 0x1_0029,
    AvatarClassifiedReply = 0x1_002a,
    ClassifiedInfoRequest = 0x1_002b,
    ClassifiedInfoReply = 0x1_002c,
    ClassifiedInfoUpdate = 0x1_002d,
    ClassifiedDelete = 0x1_002e,
    ClassifiedGodDelete = 0x1_002f,
    DirLandQuery = 0x1_0030,
    DirLandQueryBackend = 0x1_0031,
    DirLandReply = 0x1_0032,
    DirPopularQuery = 0x1_0033,
    DirPopularQueryBackend = 0x1_0034,
    DirPopularReply = 0x1_0035,
    ParcelInfoRequest = 0x1_0036,
    ParcelInfoReply = 0x1_0037,
    ParcelObjectOwnersRequest = 0x1_0038,
    ParcelObjectOwnersReply = 0x1_0039,
    GroupNoticesListRequest = 0x1_003a,
    GroupNoticesListReply = 0x1_003b,
    GroupNoticeRequest = 0x1_003c,
    GroupNoticeAdd = 0x1_003d,
    TeleportRequest = 0x1_003e,
    TeleportLocationRequest = 0x1_003f,
    TeleportLocal = 0x1_0040,
    TeleportLandmarkRequest = 0x1_0041,
    TeleportProgress = 0x1_0042,
    DataHomeLocationRequest = 0x1_0043,
    DataHomeLocationReply = 0x1_0044,
    TeleportFinish = 0x1_0045,
    StartLure = 0x1_0046,
    TeleportLureRequest = 0x1_0047,
    TeleportCancel = 0x1_0048,
    TeleportStart = 0x1_0049,
    TeleportFailed = 0x1_004a,
    Undo = 0x1_004b,
    Redo = 0x1_004c,
    UndoLand = 0x1_004d,
    AgentPause = 0x1_004e,
    AgentResume = 0x1_004f,
    ChatFromViewer = 0x1_0050,
    AgentThrottle = 0x1_0051,
    AgentFOV = 0x1_0052,
    AgentHeightWidth = 0x1_0053,
    AgentSetAppearance = 0x1_0054,
    AgentQuitCopy = 0x1_0055,
    ImageNotInDatabase = 0x1_0056,
    RebakeAvatarTextures = 0x1_0057,
    SetAlwaysRun = 0x1_0058,
    ObjectDelete = 0x1_0059,
    ObjectDuplicate = 0x1_005a,
    ObjectDuplicateOnRay = 0x1_005b,
    ObjectScale = 0x1_005c,
    ObjectRotation = 0x1_005d,
    ObjectFlagUpdate = 0x1_005e,
    ObjectClickAction = 0x1_005f,
    ObjectImage = 0x1_0060,
    ObjectBypassModUpdate = 0x1_01af,
    ObjectMaterial = 0x1_0061,
    ObjectShape = 0x1_0062,
    ObjectExtraParams = 0x1_0063,
    ObjectOwner = 0x1_0064,
    ObjectGroup = 0x1_0065,
    ObjectBuy = 0x1_0066,
    BuyObjectInventory = 0x1_0067,
    DerezContainer = 0x1_0068,
    ObjectPermissions = 0x1_0069,
    ObjectSaleInfo = 0x1_006a,
    ObjectName = 0x1_006b,
    ObjectDescription = 0x1_006c,
    ObjectCategory = 0x1_006d,
    ObjectSelect = 0x1_006e,
    ObjectDeselect = 0x1_006f,
    ObjectAttach = 0x1_0070,
    ObjectDetach = 0x1_0071,
    ObjectDrop = 0x1_0072,
    ObjectLink = 0x1_0073,
    ObjectDelink = 0x1_0074,
    ObjectGrab = 0x1_0075,
    ObjectGrabUpdate = 0x1_0076,
    ObjectDeGrab = 0x1_0077,
    ObjectSpinStart = 0x1_0078,
    ObjectSpinUpdate = 0x1_0079,
    ObjectSpinStop = 0x1_007a,
    ObjectExportSelected = 0x1_007b,
    ModifyLand = 0x1_007c,
    VelocityInterpolateOn = 0x1_007d,
    VelocityInterpolateOff = 0x1_007e,
    StateSave = 0x1_007f,
    ReportAutosaveCrash = 0x1_0080,
    SimWideDeletes = 0x1_0081,
    TrackAgent = 0x1_0082,
    ViewerStats = 0x1_0083,
    ScriptAnswerYes = 0x1_0084,
    UserReport = 0x1_0085,
    AlertMessage = 0x1_0086,
    AgentAlertMessage = 0x1_0087,
    MeanCollisionAlert = 0x1_0088,
    ViewerFrozenMessage = 0x1_0089,
    HealthMessage = 0x1_008a,
    ChatFromSimulator = 0x1_008b,
    SimStats = 0x1_008c,
    RequestRegionInfo = 0x1_008d,
    RegionInfo = 0x1_008e,
    GodUpdateRegionInfo = 0x1_008f,
    NearestLandingRegionRequest = 0x1_0090,
    NearestLandingRegionReply = 0x1_0091,
    NearestLandingRegionUpdated = 0x1_0092,
    TeleportLandingStatusChanged = 0x1_0093,
    RegionHandshake = 0x1_0094,
    RegionHandshakeReply = 0x1_0095,
    SimulatorViewerTimeMessage = 0x1_0096,
    EnableSimulator = 0x1_0097,
    DisableSimulator = 0x1_0098,
    TransferRequest = 0x1_0099,
    TransferInfo = 0x1_009a,
    TransferAbort = 0x1_009b,
    RequestXfer = 0x1_009c,
    AbortXfer = 0x1_009d,
    AvatarAppearance = 0x1_009e,
    SetFollowCamProperties = 0x1_009f,
    ClearFollowCamProperties = 0x1_00a0,
    RequestPayPrice = 0x1_00a1,
    PayPriceReply = 0x1_00a2,
    KickUser = 0x1_00a3,
    KickUserAck = 0x1_00a4,
    GodKickUser = 0x1_00a5,
    SystemKickUser = 0x1_00a6,
    EjectUser = 0x1_00a7,
    FreezeUser = 0x1_00a8,
    AvatarPropertiesRequest = 0x1_00a9,
    AvatarPropertiesRequestBackend = 0x1_00aa,
    AvatarPropertiesReply = 0x1_00ab,
    AvatarInterestsReply = 0x1_00ac,
    AvatarGroupsReply = 0x1_00ad,
    AvatarPropertiesUpdate = 0x1_00ae,
    AvatarInterestsUpdate = 0x1_00af,
    AvatarNotesReply = 0x1_00b0,
    AvatarNotesUpdate = 0x1_00b1,
    AvatarPicksReply = 0x1_00b2,
    EventInfoRequest = 0x1_00b3,
    EventInfoReply = 0x1_00b4,
    EventNotificationAddRequest = 0x1_00b5,
    EventNotificationRemoveRequest = 0x1_00b6,
    EventGodDelete = 0x1_00b7,
    PickInfoReply = 0x1_00b8,
    PickInfoUpdate = 0x1_00b9,
    PickDelete = 0x1_00ba,
    PickGodDelete = 0x1_00bb,
    ScriptQuestion = 0x1_00bc,
    ScriptControlChange = 0x1_00bd,
    ScriptDialog = 0x1_00be,
    ScriptDialogReply = 0x1_00bf,
    ForceScriptControlRelease = 0x1_00c0,
    RevokePermissions = 0x1_00c1,
    LoadURL = 0x1_00c2,
    ScriptTeleportRequest = 0x1_00c3,
    ParcelOverlay = 0x1_00c4,
    ParcelPropertiesRequestByID = 0x1_00c5,
    ParcelPropertiesUpdate = 0x1_00c6,
    ParcelReturnObjects = 0x1_00c7,
    ParcelSetOtherCleanTime = 0x1_00c8,
    ParcelDisableObjects = 0x1_00c9,
    ParcelSelectObjects = 0x1_00ca,
    EstateCovenantRequest = 0x1_00cb,
    EstateCovenantReply = 0x1_00cc,
    ForceObjectSelect = 0x1_00cd,
    ParcelBuyPass = 0x1_00ce,
    ParcelDeedToGroup = 0x1_00cf,
    ParcelReclaim = 0x1_00d0,
    ParcelClaim = 0x1_00d1,
    ParcelJoin = 0x1_00d2,
    ParcelDivide = 0x1_00d3,
    ParcelRelease = 0x1_00d4,
    ParcelBuy = 0x1_00d5,
    ParcelGodForceOwner = 0x1_00d6,
    ParcelAccessListRequest = 0x1_00d7,
    ParcelAccessListReply = 0x1_00d8,
    ParcelAccessListUpdate = 0x1_00d9,
    ParcelDwellRequest = 0x1_00da,
    ParcelDwellReply = 0x1_00db,
    RequestParcelTransfer = 0x1_00dc,
    UpdateParcel = 0x1_00dd,
    RemoveParcel = 0x1_00de,
    MergeParcel = 0x1_00df,
    LogParcelChanges = 0x1_00e0,
    CheckParcelSales = 0x1_00e1,
    ParcelSales = 0x1_00e2,
    ParcelGodMarkAsContent = 0x1_00e3,
    ViewerStartAuction = 0x1_00e4,
    StartAuction = 0x1_00e5,
    ConfirmAuctionStart = 0x1_00e6,
    CompleteAuction = 0x1_00e7,
    CancelAuction = 0x1_00e8,
    CheckParcelAuctions = 0x1_00e9,
    ParcelAuctions = 0x1_00ea,
    UUIDNameRequest = 0x1_00eb,
    UUIDNameReply = 0x1_00ec,
    UUIDGroupNameRequest = 0x1_00ed,
    UUIDGroupNameReply = 0x1_00ee,
    ChatPass = 0x1_00ef,
    ChildAgentDying = 0x1_00f0,
    ChildAgentUnknown = 0x1_00f1,
    KillChildAgents = 0x1_00f2,
    GetScriptRunning = 0x1_00f3,
    ScriptRunningReply = 0x1_00f4,
    SetScriptRunning = 0x1_00f5,
    ScriptReset = 0x1_00f6,
    ScriptSensorRequest = 0x1_00f7,
    ScriptSensorReply = 0x1_00f8,
    CompleteAgentMovement = 0x1_00f9,
    AgentMovementComplete = 0x1_00fa,
    DataServerLogout = 0x1_00fb,
    LogoutRequest = 0x1_00fc,
    LogoutReply = 0x1_00fd,
    ImprovedInstantMessage = 0x1_00fe,
    RetrieveInstantMessages = 0x1_00ff,
    FindAgent = 0x1_0100,
    RequestGodlikePowers = 0x1_0101,
    GrantGodlikePowers = 0x1_0102,
    GodlikeMessage = 0x1_0103,
    EstateOwnerMessage = 0x1_0104,
    GenericMessage = 0x1_0105,
    LargeGenericMessage = 0x1_01ae,
    MuteListRequest = 0x1_0106,
    UpdateMuteListEntry = 0x1_0107,
    RemoveMuteListEntry = 0x1_0108,
    CopyInventoryFromNotecard = 0x1_0109,
    UpdateInventoryItem = 0x1_010a,
    UpdateCreateInventoryItem = 0x1_010b,
    MoveInventoryItem = 0x1_010c,
    CopyInventoryItem = 0x1_010d,
    RemoveInventoryItem = 0x1_010e,
    ChangeInventoryItemFlags = 0x1_010f,
    SaveAssetIntoInventory = 0x1_0110,
    CreateInventoryFolder = 0x1_0111,
    UpdateInventoryFolder = 0x1_0112,
    MoveInventoryFolder = 0x1_0113,
    RemoveInventoryFolder = 0x1_0114,
    FetchInventoryDescendents = 0x1_0115,
    InventoryDescendents = 0x1_0116,
    FetchInventory = 0x1_0117,
    FetchInventoryReply = 0x1_0118,
    BulkUpdateInventory = 0x1_0119,
    RequestInventoryAsset = 0x1_011a,
    InventoryAssetResponse = 0x1_011b,
    RemoveInventoryObjects = 0x1_011c,
    PurgeInventoryDescendents = 0x1_011d,
    UpdateTaskInventory = 0x1_011e,
    RemoveTaskInventory = 0x1_011f,
    MoveTaskInventory = 0x1_0120,
    RequestTaskInventory = 0x1_0121,
    ReplyTaskInventory = 0x1_0122,
    DeRezObject = 0x1_0123,
    DeRezAck = 0x1_0124,
    RezObject = 0x1_0125,
    RezObjectFromNotecard = 0x1_0126,
    TransferInventory = 0x1_0127,
    TransferInventoryAck = 0x1_0128,
    AcceptFriendship = 0x1_0129,
    DeclineFriendship = 0x1_012a,
    FormFriendship = 0x1_012b,
    TerminateFriendship = 0x1_012c,
    OfferCallingCard = 0x1_012d,
    AcceptCallingCard = 0x1_012e,
    DeclineCallingCard = 0x1_012f,
    RezScript = 0x1_0130,
    CreateInventoryItem = 0x1_0131,
    CreateLandmarkForEvent = 0x1_0132,
    EventLocationRequest = 0x1_0133,
    EventLocationReply = 0x1_0134,
    RegionHandleRequest = 0x1_0135,
    RegionIDAndHandleReply = 0x1_0136,
    MoneyTransferRequest = 0x1_0137,
    MoneyTransferBackend = 0x1_0138,
    MoneyBalanceRequest = 0x1_0139,
    MoneyBalanceReply = 0x1_013a,
    RoutedMoneyBalanceReply = 0x1_013b,
    ActivateGestures = 0x1_013c,
    DeactivateGestures = 0x1_013d,
    MuteListUpdate = 0x1_013e,
    UseCachedMuteList = 0x1_013f,
    GrantUserRights = 0x1_0140,
    ChangeUserRights = 0x1_0141,
    OnlineNotification = 0x1_0142,
    OfflineNotification = 0x1_0143,
    SetStartLocationRequest = 0x1_0144,
    SetStartLocation = 0x1_0145,
    NetTest = 0x1_0146,
    SetCPURatio = 0x1_0147,
    SimCrashed = 0x1_0148,
    NameValuePair = 0x1_0149,
    RemoveNameValuePair = 0x1_014a,
    UpdateAttachment = 0x1_014b,
    RemoveAttachment = 0x1_014c,
    AssetUploadRequest = 0x1_014d,
    AssetUploadComplete = 0x1_014e,
    EmailMessageRequest = 0x1_014f,
    EmailMessageReply = 0x1_0150,
    ScriptDataRequest = 0x1_0151,
    ScriptDataReply = 0x1_0152,
    CreateGroupRequest = 0x1_0153,
    CreateGroupReply = 0x1_0154,
    UpdateGroupInfo = 0x1_0155,
    GroupRoleChanges = 0x1_0156,
    JoinGroupRequest = 0x1_0157,
    JoinGroupReply = 0x1_0158,
    EjectGroupMemberRequest = 0x1_0159,
    EjectGroupMemberReply = 0x1_015a,
    LeaveGroupRequest = 0x1_015b,
    LeaveGroupReply = 0x1_015c,
    InviteGroupRequest = 0x1_015d,
    InviteGroupResponse = 0x1_015e,
    GroupProfileRequest = 0x1_015f,
    GroupProfileReply = 0x1_0160,
    GroupAccountSummaryRequest = 0x1_0161,
    GroupAccountSummaryReply = 0x1_0162,
    GroupAccountDetailsRequest = 0x1_0163,
    GroupAccountDetailsReply = 0x1_0164,
    GroupAccountTransactionsRequest = 0x1_0165,
    GroupAccountTransactionsReply = 0x1_0166,
    GroupActiveProposalsRequest = 0x1_0167,
    GroupActiveProposalItemReply = 0x1_0168,
    GroupVoteHistoryRequest = 0x1_0169,
    GroupVoteHistoryItemReply = 0x1_016a,
    StartGroupProposal = 0x1_016b,
    GroupProposalBallot = 0x1_016c,
    TallyVotes = 0x1_016d,
    GroupMembersRequest = 0x1_016e,
    GroupMembersReply = 0x1_016f,
    ActivateGroup = 0x1_0170,
    SetGroupContribution = 0x1_0171,
    SetGroupAcceptNotices = 0x1_0172,
    GroupRoleDataRequest = 0x1_0173,
    GroupRoleDataReply = 0x1_0174,
    GroupRoleMembersRequest = 0x1_0175,
    GroupRoleMembersReply = 0x1_0176,
    GroupTitlesRequest = 0x1_0177,
    GroupTitlesReply = 0x1_0178,
    GroupTitleUpdate = 0x1_0179,
    GroupRoleUpdate = 0x1_017a,
    LiveHelpGroupRequest = 0x1_017b,
    LiveHelpGroupReply = 0x1_017c,
    AgentWearablesRequest = 0x1_017d,
    AgentWearablesUpdate = 0x1_017e,
    AgentIsNowWearing = 0x1_017f,
    AgentCachedTexture = 0x1_0180,
    AgentCachedTextureResponse = 0x1_0181,
    AgentDataUpdateRequest = 0x1_0182,
    AgentDataUpdate = 0x1_0183,
    GroupDataUpdate = 0x1_0184,
    AgentGroupDataUpdate = 0x1_0185,
    AgentDropGroup = 0x1_0186,
    LogTextMessage = 0x1_0187,
    CreateTrustedCircuit = 0x1_0188,
    DenyTrustedCircuit = 0x1_0189,
    RequestTrustedCircuit = 0x1_018a,
    RezSingleAttachmentFromInv = 0x1_018b,
    RezMultipleAttachmentsFromInv = 0x1_018c,
    DetachAttachmentIntoInv = 0x1_018d,
    CreateNewOutfitAttachments = 0x1_018e,
    UserInfoRequest = 0x1_018f,
    UserInfoReply = 0x1_0190,
    UpdateUserInfo = 0x1_0191,
    ParcelRename = 0x1_0192,
    InitiateDownload = 0x1_0193,
    SystemMessage = 0x1_0194,
    MapLayerRequest = 0x1_0195,
    MapLayerReply = 0x1_0196,
    MapBlockRequest = 0x1_0197,
    MapNameRequest = 0x1_0198,
    MapBlockReply = 0x1_0199,
    MapItemRequest = 0x1_019a,
    MapItemReply = 0x1_019b,
    SendPostcard = 0x1_019c,
    RpcChannelRequest = 0x1_019d,
    RpcChannelReply = 0x1_019e,
    RpcScriptRequestInbound = 0x1_019f,
    RpcScriptRequestInboundForward = 0x1_01a0,
    RpcScriptReplyInbound = 0x1_01a1,
    ScriptMailRegistration = 0x1_01a2,
    ParcelMediaCommandMessage = 0x1_01a3,
    ParcelMediaUpdate = 0x1_01a4,
    LandStatRequest = 0x1_01a5,
    LandStatReply = 0x1_01a6,
    Error = 0x1_01a7,
    ObjectIncludeInSearch = 0x1_01a8,
    RezRestoreToWorld = 0x1_01a9,
    LinkInventoryItem = 0x1_01aa,
    RetrieveIMsExtended = 0x1_01ab,
    JoinGroupRequestExtended = 0x1_01ac,
    CreateGroupRequestExtended = 0x1_01ad,
    ObjectAdd = 0x2_0001,
    MultipleObjectUpdate = 0x2_0002,
    RequestMultipleObjects = 0x2_0003,
    ObjectPosition = 0x2_0004,
    RequestObjectPropertiesFamily = 0x2_0005,
    CoarseLocationUpdate = 0x2_0006,
    CrossedRegion = 0x2_0007,
    ConfirmEnableSimulator = 0x2_0008,
    ObjectProperties = 0x2_0009,
    ObjectPropertiesFamily = 0x2_000a,
    ParcelPropertiesRequest = 0x2_000b,
    SimStatus = 0x2_000c,
    AttachedSound = 0x2_000d,
    AttachedSoundGainChange = 0x2_000e,
    PreloadSound = 0x2_000f,
    InternalScriptMail = 0x2_0010,
    ViewerEffect = 0x2_0011,
    StartPingCheck = 0x3_0001,
    CompletePingCheck = 0x3_0002,
    NeighborList = 0x3_0003,
    AgentUpdate = 0x3_0004,
    AgentAnimation = 0x3_0005,
    AgentRequestSit = 0x3_0006,
    AgentSit = 0x3_0007,
    RequestImage = 0x3_0008,
    ImageData = 0x3_0009,
    ImagePacket = 0x3_000a,
    LayerData = 0x3_000b,
    ObjectUpdate = 0x3_000c,
    ObjectUpdateCompressed = 0x3_000d,
    ObjectUpdateCached = 0x3_000e,
    ImprovedTerseObjectUpdate = 0x3_000f,
    KillObject = 0x3_0010,
    TransferPacket = 0x3_0011,
    SendXferPacket = 0x3_0012,
    ConfirmXferPacket = 0x3_0013,
    AvatarAnimation = 0x3_0014,
    AvatarSitResponse = 0x3_0015,
    CameraConstraint = 0x3_0016,
    ParcelProperties = 0x3_0017,
    EdgeDataPacket = 0x3_0018,
    ChildAgentUpdate = 0x3_0019,
    ChildAgentAlive = 0x3_001a,
    ChildAgentPositionUpdate = 0x3_001b,
    AtomicPassObject = 0x3_001c,
    GenericStreamingMessage = 0x3_001f,
    SoundTrigger = 0x3_001d,
    ObjectAnimation = 0x3_001e,
    GameControlInput = 0x3_0020,
}
static PACKET_0_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Test1",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_0_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Test0",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Test1",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Test2",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_0_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TestBlock1",
        repetition: BlockRepetition::Single,
        fields: PACKET_0_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NeighborBlock",
        repetition: BlockRepetition::Multiple(4),
        fields: PACKET_0_BLOCK_1_FIELDS,
    },
];
static PACKET_1_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_1_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Packets",
        repetition: BlockRepetition::Variable,
        fields: PACKET_1_BLOCK_0_FIELDS,
    },
];
static PACKET_2_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "IP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_2_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "CircuitInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_2_BLOCK_0_FIELDS,
    },
];
static PACKET_3_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_4_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Code",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_4_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "CircuitCode",
        repetition: BlockRepetition::Single,
        fields: PACKET_4_BLOCK_0_FIELDS,
    },
];
static PACKET_5_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Code",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_5_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "CircuitCode",
        repetition: BlockRepetition::Single,
        fields: PACKET_5_BLOCK_0_FIELDS,
    },
];
static PACKET_6_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TexturesChanged",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_6_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CacheID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TextureIndex",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "HostName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_6_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TextureID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_6_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_6_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_6_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TextureData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_6_BLOCK_2_FIELDS,
    },
];
static PACKET_7_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_7_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MapData",
        repetition: BlockRepetition::Single,
        fields: PACKET_7_BLOCK_0_FIELDS,
    },
];
static PACKET_8_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MapImage",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_8_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MapData",
        repetition: BlockRepetition::Single,
        fields: PACKET_8_BLOCK_0_FIELDS,
    },
];
static PACKET_9_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_10_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_11_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParentEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_11_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "HasTelehub",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TelehubPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_11_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimulatorBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_11_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TelehubBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_11_BLOCK_1_FIELDS,
    },
];
static PACKET_12_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TelehubPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "TelehubRot",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_12_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SpawnPointPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_12_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TelehubBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_12_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SpawnPointBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_12_BLOCK_1_FIELDS,
    },
];
static PACKET_13_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "SimulatorIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_13_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "IP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_13_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParentEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_13_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "HasTelehub",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TelehubPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_13_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimulatorPublicHostBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_13_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NeighborBlock",
        repetition: BlockRepetition::Multiple(4),
        fields: PACKET_13_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "SimulatorBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_13_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "TelehubBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_13_BLOCK_3_FIELDS,
    },
];
static PACKET_14_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TimeDilation",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CanAcceptAgents",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_14_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "X",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Y",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_14_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimulatorLoad",
        repetition: BlockRepetition::Single,
        fields: PACKET_14_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AgentList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_14_BLOCK_1_FIELDS,
    },
];
static PACKET_15_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_16_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_16_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_16_BLOCK_0_FIELDS,
    },
];
static PACKET_17_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_17_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_17_BLOCK_0_FIELDS,
    },
];
static PACKET_18_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "InternalRegionIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ExternalRegionIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ValidUntil",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_18_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_18_BLOCK_0_FIELDS,
    },
];
static PACKET_19_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_19_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimulatorInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_19_BLOCK_0_FIELDS,
    },
];
static PACKET_20_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Duration",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "RegionX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AvgAgentsInView",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AvgViewerFPS",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_20_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DwellInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_20_BLOCK_0_FIELDS,
    },
];
static PACKET_21_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ErrorMessage",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_21_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "FailureInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_21_BLOCK_0_FIELDS,
    },
];
static PACKET_22_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionTime",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimulatorIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FailureType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_22_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_22_BLOCK_0_FIELDS,
    },
];
static PACKET_23_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ReportType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ReporterID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ViewerPosition",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AgentPosition",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ScreenshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LastOwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AbuserID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AbuseRegionName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AbuseRegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Summary",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Details",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "VersionString",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_23_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ReportData",
        repetition: BlockRepetition::Single,
        fields: PACKET_23_BLOCK_0_FIELDS,
    },
];
static PACKET_24_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "HostName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "X",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Y",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TimeToLive",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_24_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_24_BLOCK_0_FIELDS,
    },
];
static PACKET_25_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "HostName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TimeToLive",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_25_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimData",
        repetition: BlockRepetition::Single,
        fields: PACKET_25_BLOCK_0_FIELDS,
    },
];
static PACKET_26_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_27_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectCapacity",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceEnergyUnit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceObjectClaim",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PricePublicObjectDecay",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PricePublicObjectDelete",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceParcelClaim",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceParcelClaimFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceUpload",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceRentLight",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TeleportMinPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TeleportPriceExponent",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EnergyEfficiency",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceObjectRent",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceObjectScaleFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceParcelRent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceGroupCreate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_27_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_27_BLOCK_0_FIELDS,
    },
];
static PACKET_28_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_28_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_28_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_28_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_28_BLOCK_1_FIELDS,
    },
];
static PACKET_29_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GodLevel",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_29_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_29_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_29_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_29_BLOCK_1_FIELDS,
    },
];
static PACKET_30_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_30_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FirstName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LastName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_30_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_30_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_30_BLOCK_1_FIELDS,
    },
];
static PACKET_31_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_31_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_31_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_31_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_31_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_31_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_31_BLOCK_2_FIELDS,
    },
];
static PACKET_32_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_32_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_32_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GlobalX",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GlobalY",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GlobalZ",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Dwell",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Price",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_32_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_32_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_32_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_32_BLOCK_2_FIELDS,
    },
];
static PACKET_33_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_33_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_33_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_33_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_33_BLOCK_1_FIELDS,
    },
];
static PACKET_34_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_34_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_34_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_34_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_34_BLOCK_1_FIELDS,
    },
];
static PACKET_35_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_35_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_35_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_35_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_35_BLOCK_1_FIELDS,
    },
];
static PACKET_36_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_36_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_36_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_36_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_36_BLOCK_1_FIELDS,
    },
];
static PACKET_37_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_37_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_37_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ForSale",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Auction",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Dwell",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_37_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_37_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_37_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_37_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_37_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "StatusData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_37_BLOCK_3_FIELDS,
    },
];
static PACKET_38_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_38_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_38_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FirstName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LastName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Group",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Online",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Reputation",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_38_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_38_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_38_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_38_BLOCK_2_FIELDS,
    },
];
static PACKET_39_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_39_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_39_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Date",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "UnixTime",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EventFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_39_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_39_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_39_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_39_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_39_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "StatusData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_39_BLOCK_3_FIELDS,
    },
];
static PACKET_40_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_40_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_40_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Members",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SearchOrder",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_40_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_40_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_40_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_40_BLOCK_2_FIELDS,
    },
];
static PACKET_41_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_41_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_41_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_41_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_41_BLOCK_1_FIELDS,
    },
];
static PACKET_42_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_42_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_42_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_42_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_42_BLOCK_1_FIELDS,
    },
];
static PACKET_43_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_43_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_43_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ClassifiedFlags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ExpirationDate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PriceForListing",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_43_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_43_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_43_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_43_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_43_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "StatusData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_43_BLOCK_3_FIELDS,
    },
];
static PACKET_44_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_44_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_44_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_44_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_44_BLOCK_1_FIELDS,
    },
];
static PACKET_45_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_45_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_45_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_45_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_45_BLOCK_1_FIELDS,
    },
];
static PACKET_46_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_46_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ExpirationDate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentEstate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "PosGlobal",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "ParcelName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ClassifiedFlags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PriceForListing",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_46_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_46_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_46_BLOCK_1_FIELDS,
    },
];
static PACKET_47_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_47_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentEstate",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PosGlobal",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "ClassifiedFlags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PriceForListing",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_47_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_47_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_47_BLOCK_1_FIELDS,
    },
];
static PACKET_48_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_48_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_48_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_48_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_48_BLOCK_1_FIELDS,
    },
];
static PACKET_49_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_49_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ClassifiedID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_49_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_49_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_49_BLOCK_1_FIELDS,
    },
];
static PACKET_50_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_50_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SearchType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Price",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Area",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_50_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_50_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_50_BLOCK_1_FIELDS,
    },
];
static PACKET_51_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_51_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SearchType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Price",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Area",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_51_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_51_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_51_BLOCK_1_FIELDS,
    },
];
static PACKET_52_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_52_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_52_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Auction",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ForSale",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_52_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_52_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_52_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_52_BLOCK_2_FIELDS,
    },
];
static PACKET_53_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_53_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_53_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_53_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_53_BLOCK_1_FIELDS,
    },
];
static PACKET_54_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_54_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_54_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_54_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_54_BLOCK_1_FIELDS,
    },
];
static PACKET_55_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_55_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_55_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Dwell",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_55_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_55_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_55_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryReplies",
        repetition: BlockRepetition::Variable,
        fields: PACKET_55_BLOCK_2_FIELDS,
    },
];
static PACKET_56_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_56_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_56_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_56_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_56_BLOCK_1_FIELDS,
    },
];
static PACKET_57_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_57_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GlobalX",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GlobalY",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GlobalZ",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Dwell",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AuctionID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_57_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_57_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_57_BLOCK_1_FIELDS,
    },
];
static PACKET_58_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_58_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_58_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_58_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_58_BLOCK_1_FIELDS,
    },
];
static PACKET_59_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsGroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Count",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OnlineStatus",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_59_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_59_BLOCK_0_FIELDS,
    },
];
static PACKET_60_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_60_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_60_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_60_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_60_BLOCK_1_FIELDS,
    },
];
static PACKET_61_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_61_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NoticeID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Timestamp",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FromName",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Subject",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "HasAttachment",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_61_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_61_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_61_BLOCK_1_FIELDS,
    },
];
static PACKET_62_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_62_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupNoticeID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_62_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_62_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_62_BLOCK_1_FIELDS,
    },
];
static PACKET_63_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_63_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ToGroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Dialog",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "FromAgentName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "BinaryBucket",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_63_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_63_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MessageBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_63_BLOCK_1_FIELDS,
    },
];
static PACKET_64_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_64_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_64_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_64_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_64_BLOCK_1_FIELDS,
    },
];
static PACKET_65_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_65_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_65_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_65_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_65_BLOCK_1_FIELDS,
    },
];
static PACKET_66_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocationID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "TeleportFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_66_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_66_BLOCK_0_FIELDS,
    },
];
static PACKET_67_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LandmarkID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_67_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_67_BLOCK_0_FIELDS,
    },
];
static PACKET_68_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_68_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TeleportFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_68_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_68_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_68_BLOCK_1_FIELDS,
    },
];
static PACKET_69_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "KickedFromEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_69_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentEffectiveMaturity",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_69_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_69_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AgentInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_69_BLOCK_1_FIELDS,
    },
];
static PACKET_70_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_70_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_70_BLOCK_0_FIELDS,
    },
];
static PACKET_71_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocationID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "SeedCapability",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TeleportFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_71_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_71_BLOCK_0_FIELDS,
    },
];
static PACKET_72_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_72_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LureType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_72_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_72_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_72_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_72_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TargetData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_72_BLOCK_2_FIELDS,
    },
];
static PACKET_73_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LureID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TeleportFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_73_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_73_BLOCK_0_FIELDS,
    },
];
static PACKET_74_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_74_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_74_BLOCK_0_FIELDS,
    },
];
static PACKET_75_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TeleportFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_75_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_75_BLOCK_0_FIELDS,
    },
];
static PACKET_76_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Reason",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_76_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ExtraParams",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_76_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_76_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AlertInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_76_BLOCK_1_FIELDS,
    },
];
static PACKET_77_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_77_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_77_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_77_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_77_BLOCK_1_FIELDS,
    },
];
static PACKET_78_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_78_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_78_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_78_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_78_BLOCK_1_FIELDS,
    },
];
static PACKET_79_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_79_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_79_BLOCK_0_FIELDS,
    },
];
static PACKET_80_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_80_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_80_BLOCK_0_FIELDS,
    },
];
static PACKET_81_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_81_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_81_BLOCK_0_FIELDS,
    },
];
static PACKET_82_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_82_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Channel",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_82_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_82_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ChatData",
        repetition: BlockRepetition::Single,
        fields: PACKET_82_BLOCK_1_FIELDS,
    },
];
static PACKET_83_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_83_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GenCounter",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Throttles",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_83_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_83_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Throttle",
        repetition: BlockRepetition::Single,
        fields: PACKET_83_BLOCK_1_FIELDS,
    },
];
static PACKET_84_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_84_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GenCounter",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "VerticalAngle",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_84_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_84_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FOVBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_84_BLOCK_1_FIELDS,
    },
];
static PACKET_85_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_85_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GenCounter",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Height",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "Width",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_85_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_85_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "HeightWidthBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_85_BLOCK_1_FIELDS,
    },
];
static PACKET_86_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Size",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_86_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CacheID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TextureIndex",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_86_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TextureEntry",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_86_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParamValue",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_86_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_86_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_86_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_86_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "VisualParam",
        repetition: BlockRepetition::Variable,
        fields: PACKET_86_BLOCK_3_FIELDS,
    },
];
static PACKET_87_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_87_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ViewerCircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_87_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_87_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FuseBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_87_BLOCK_1_FIELDS,
    },
];
static PACKET_88_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_88_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ImageID",
        repetition: BlockRepetition::Single,
        fields: PACKET_88_BLOCK_0_FIELDS,
    },
];
static PACKET_89_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TextureID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_89_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TextureData",
        repetition: BlockRepetition::Single,
        fields: PACKET_89_BLOCK_0_FIELDS,
    },
];
static PACKET_90_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AlwaysRun",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_90_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_90_BLOCK_0_FIELDS,
    },
];
static PACKET_91_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Force",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_91_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_91_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_91_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_91_BLOCK_1_FIELDS,
    },
];
static PACKET_92_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_92_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Offset",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "DuplicateFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_92_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_92_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_92_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SharedData",
        repetition: BlockRepetition::Single,
        fields: PACKET_92_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_92_BLOCK_2_FIELDS,
    },
];
static PACKET_93_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RayStart",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayEnd",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "BypassRaycast",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RayEndIsIntersection",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CopyCenters",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CopyRotates",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RayTargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DuplicateFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_93_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_93_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_93_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_93_BLOCK_1_FIELDS,
    },
];
static PACKET_94_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_94_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Scale",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_94_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_94_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_94_BLOCK_1_FIELDS,
    },
];
static PACKET_95_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_95_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Rotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_95_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_95_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_95_BLOCK_1_FIELDS,
    },
];
static PACKET_96_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "UsePhysics",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "IsTemporary",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "IsPhantom",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CastsShadows",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_96_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PhysicsShapeType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Density",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Friction",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Restitution",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GravityMultiplier",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_96_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_96_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ExtraPhysics",
        repetition: BlockRepetition::Variable,
        fields: PACKET_96_BLOCK_1_FIELDS,
    },
];
static PACKET_97_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_97_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ClickAction",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_97_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_97_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_97_BLOCK_1_FIELDS,
    },
];
static PACKET_98_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_98_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MediaURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TextureEntry",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_98_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_98_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_98_BLOCK_1_FIELDS,
    },
];
static PACKET_99_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_99_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PropertyID",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Value",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_99_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_99_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_99_BLOCK_1_FIELDS,
    },
];
static PACKET_100_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_100_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Material",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_100_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_100_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_100_BLOCK_1_FIELDS,
    },
];
static PACKET_101_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_101_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PathCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathScaleX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathScaleY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwist",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwistBegin",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRadiusOffset",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperX",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperY",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRevolutions",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathSkew",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileHollow",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_101_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_101_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_101_BLOCK_1_FIELDS,
    },
];
static PACKET_102_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_102_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParamType",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ParamInUse",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ParamSize",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParamData",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_102_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_102_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_102_BLOCK_1_FIELDS,
    },
];
static PACKET_103_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_103_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Override",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_103_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_103_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_103_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "HeaderData",
        repetition: BlockRepetition::Single,
        fields: PACKET_103_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_103_BLOCK_2_FIELDS,
    },
];
static PACKET_104_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_104_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_104_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_104_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_104_BLOCK_1_FIELDS,
    },
];
static PACKET_105_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CategoryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_105_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_105_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_105_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_105_BLOCK_1_FIELDS,
    },
];
static PACKET_106_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_106_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_106_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_106_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_106_BLOCK_1_FIELDS,
    },
];
static PACKET_107_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Delete",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_107_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_107_BLOCK_0_FIELDS,
    },
];
static PACKET_108_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_108_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Override",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_108_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Field",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Set",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Mask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_108_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_108_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "HeaderData",
        repetition: BlockRepetition::Single,
        fields: PACKET_108_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_108_BLOCK_2_FIELDS,
    },
];
static PACKET_109_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_109_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_109_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_109_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_109_BLOCK_1_FIELDS,
    },
];
static PACKET_110_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_110_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_110_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_110_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_110_BLOCK_1_FIELDS,
    },
];
static PACKET_111_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_111_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_111_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_111_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_111_BLOCK_1_FIELDS,
    },
];
static PACKET_112_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_112_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_112_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_112_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_112_BLOCK_1_FIELDS,
    },
];
static PACKET_113_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_113_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_113_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_113_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_113_BLOCK_1_FIELDS,
    },
];
static PACKET_114_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_114_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_114_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_114_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_114_BLOCK_1_FIELDS,
    },
];
static PACKET_115_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AttachmentPoint",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_115_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Rotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_115_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_115_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_115_BLOCK_1_FIELDS,
    },
];
static PACKET_116_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_116_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_116_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_116_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_116_BLOCK_1_FIELDS,
    },
];
static PACKET_117_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_117_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_117_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_117_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_117_BLOCK_1_FIELDS,
    },
];
static PACKET_118_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_118_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_118_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_118_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_118_BLOCK_1_FIELDS,
    },
];
static PACKET_119_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_119_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_119_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_119_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_119_BLOCK_1_FIELDS,
    },
];
static PACKET_120_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_120_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GrabOffset",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_120_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UVCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "STCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "FaceIndex",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Normal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Binormal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_120_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_120_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_120_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "SurfaceInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_120_BLOCK_2_FIELDS,
    },
];
static PACKET_121_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_121_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GrabOffsetInitial",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "GrabPosition",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "TimeSinceLast",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_121_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UVCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "STCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "FaceIndex",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Normal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Binormal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_121_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_121_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_121_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "SurfaceInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_121_BLOCK_2_FIELDS,
    },
];
static PACKET_122_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_122_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_122_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UVCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "STCoord",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "FaceIndex",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Normal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Binormal",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_122_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_122_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_122_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "SurfaceInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_122_BLOCK_2_FIELDS,
    },
];
static PACKET_123_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_123_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_123_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_123_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_123_BLOCK_1_FIELDS,
    },
];
static PACKET_124_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_124_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Rotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_124_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_124_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_124_BLOCK_1_FIELDS,
    },
];
static PACKET_125_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_125_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_125_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_125_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_125_BLOCK_1_FIELDS,
    },
];
static PACKET_126_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VolumeDetail",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_126_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_126_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_126_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_126_BLOCK_1_FIELDS,
    },
];
static PACKET_127_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_127_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Action",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "BrushSize",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Seconds",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Height",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_127_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "West",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "South",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "East",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "North",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_127_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "BrushSize",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_127_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_127_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ModifyBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_127_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_127_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "ModifyBlockExtended",
        repetition: BlockRepetition::Variable,
        fields: PACKET_127_BLOCK_3_FIELDS,
    },
];
static PACKET_128_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_128_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_128_BLOCK_0_FIELDS,
    },
];
static PACKET_129_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_129_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_129_BLOCK_0_FIELDS,
    },
];
static PACKET_130_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_130_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Filename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_130_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_130_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_130_BLOCK_1_FIELDS,
    },
];
static PACKET_131_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_131_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AutosaveData",
        repetition: BlockRepetition::Single,
        fields: PACKET_131_BLOCK_0_FIELDS,
    },
];
static PACKET_132_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_132_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_132_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_132_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_132_BLOCK_1_FIELDS,
    },
];
static PACKET_133_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_133_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PreyID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_133_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_133_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TargetData",
        repetition: BlockRepetition::Single,
        fields: PACKET_133_BLOCK_1_FIELDS,
    },
];
static PACKET_134_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StartTime",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RunTime",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimFPS",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FPS",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentsInView",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Ping",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MetersTraveled",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "RegionsVisited",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SysRAM",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SysOS",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SysCPU",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SysGPU",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_134_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "World",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Objects",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Textures",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_134_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Bytes",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Packets",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Compressed",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Savings",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_134_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SendPacket",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Dropped",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Resent",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FailedResends",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OffCircuit",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Invalid",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_134_BLOCK_4_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Value",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_134_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_134_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DownloadTotals",
        repetition: BlockRepetition::Single,
        fields: PACKET_134_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "NetStats",
        repetition: BlockRepetition::Multiple(2),
        fields: PACKET_134_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "FailStats",
        repetition: BlockRepetition::Single,
        fields: PACKET_134_BLOCK_3_FIELDS,
    },
    BlockDescriptor {
        name: "MiscStats",
        repetition: BlockRepetition::Variable,
        fields: PACKET_134_BLOCK_4_FIELDS,
    },
];
static PACKET_135_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_135_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Questions",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_135_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_135_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_135_BLOCK_1_FIELDS,
    },
];
static PACKET_136_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_136_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ReportType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CheckFlags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ScreenshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AbuserID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AbuseRegionName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AbuseRegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Summary",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Details",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "VersionString",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_136_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_136_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ReportData",
        repetition: BlockRepetition::Single,
        fields: PACKET_136_BLOCK_1_FIELDS,
    },
];
static PACKET_137_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_137_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ExtraParams",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_137_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_137_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AlertData",
        repetition: BlockRepetition::Single,
        fields: PACKET_137_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AlertInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_137_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "AgentInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_137_BLOCK_2_FIELDS,
    },
];
static PACKET_138_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_138_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Modal",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_138_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_138_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AlertData",
        repetition: BlockRepetition::Single,
        fields: PACKET_138_BLOCK_1_FIELDS,
    },
];
static PACKET_139_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Victim",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Perp",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Mag",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_139_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MeanCollision",
        repetition: BlockRepetition::Variable,
        fields: PACKET_139_BLOCK_0_FIELDS,
    },
];
static PACKET_140_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_140_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "FrozenData",
        repetition: BlockRepetition::Single,
        fields: PACKET_140_BLOCK_0_FIELDS,
    },
];
static PACKET_141_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Health",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_141_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "HealthData",
        repetition: BlockRepetition::Single,
        fields: PACKET_141_BLOCK_0_FIELDS,
    },
];
static PACKET_142_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FromName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SourceType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ChatType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Audible",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_142_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ChatData",
        repetition: BlockRepetition::Single,
        fields: PACKET_142_BLOCK_0_FIELDS,
    },
];
static PACKET_143_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectCapacity",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_143_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "StatID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StatValue",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_143_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_143_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionFlagsExtended",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_143_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Region",
        repetition: BlockRepetition::Single,
        fields: PACKET_143_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Stat",
        repetition: BlockRepetition::Variable,
        fields: PACKET_143_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "PidStat",
        repetition: BlockRepetition::Single,
        fields: PACKET_143_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_143_BLOCK_3_FIELDS,
    },
];
static PACKET_144_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_144_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_144_BLOCK_0_FIELDS,
    },
];
static PACKET_145_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_145_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParentEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaxAgents",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "BillableFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectBonusFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "WaterHeight",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainRaiseLimit",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainLowerLimit",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PricePerMeter",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RedirectGridX",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RedirectGridY",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "UseEstateSun",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SunHour",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_145_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ProductSKU",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ProductName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MaxAgents32",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "HardMaxAgents",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "HardMaxObjects",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_145_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionFlagsExtended",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_145_BLOCK_4_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ChatWhisperRange",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatNormalRange",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatShoutRange",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatWhisperOffset",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatNormalOffset",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatShoutOffset",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ChatFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_145_BLOCK_5_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CombatFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OnDeath",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DamageThrottle",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegenerationRate",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "InvulnerabilyTime",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "DamageLimit",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_145_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_145_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_145_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo2",
        repetition: BlockRepetition::Single,
        fields: PACKET_145_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo3",
        repetition: BlockRepetition::Variable,
        fields: PACKET_145_BLOCK_3_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo5",
        repetition: BlockRepetition::Variable,
        fields: PACKET_145_BLOCK_4_FIELDS,
    },
    BlockDescriptor {
        name: "CombatSettings",
        repetition: BlockRepetition::Variable,
        fields: PACKET_145_BLOCK_5_FIELDS,
    },
];
static PACKET_146_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_146_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParentEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PricePerMeter",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RedirectGridX",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RedirectGridY",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_146_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionFlagsExtended",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_146_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_146_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_146_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo2",
        repetition: BlockRepetition::Variable,
        fields: PACKET_146_BLOCK_2_FIELDS,
    },
];
static PACKET_147_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_147_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RequestingRegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_147_BLOCK_0_FIELDS,
    },
];
static PACKET_148_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_148_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "LandingRegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_148_BLOCK_0_FIELDS,
    },
];
static PACKET_149_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_149_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_149_BLOCK_0_FIELDS,
    },
];
static PACKET_150_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_150_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_150_BLOCK_0_FIELDS,
    },
];
static PACKET_151_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimOwner",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsEstateManager",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "WaterHeight",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableFactor",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CacheID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainBase0",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainBase1",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainBase2",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainBase3",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainDetail0",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainDetail1",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainDetail2",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainDetail3",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerrainStartHeight00",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainStartHeight01",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainStartHeight10",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainStartHeight11",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainHeightRange00",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainHeightRange01",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainHeightRange10",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TerrainHeightRange11",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_151_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_151_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CPUClassID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CPURatio",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ColoName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ProductSKU",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ProductName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_151_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionFlagsExtended",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "RegionProtocols",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_151_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_151_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo2",
        repetition: BlockRepetition::Single,
        fields: PACKET_151_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo3",
        repetition: BlockRepetition::Single,
        fields: PACKET_151_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo4",
        repetition: BlockRepetition::Variable,
        fields: PACKET_151_BLOCK_3_FIELDS,
    },
];
static PACKET_152_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_152_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_152_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_152_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_152_BLOCK_1_FIELDS,
    },
];
static PACKET_153_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UsecSinceStart",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "SecPerDay",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SecPerYear",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SunDirection",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "SunPhase",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SunAngVelocity",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_153_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TimeInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_153_BLOCK_0_FIELDS,
    },
];
static PACKET_154_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Handle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "IP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_154_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimulatorInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_154_BLOCK_0_FIELDS,
    },
];
static PACKET_155_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_156_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransferID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Priority",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Params",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_156_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransferInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_156_BLOCK_0_FIELDS,
    },
];
static PACKET_157_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransferID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TargetType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Size",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Params",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_157_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransferInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_157_BLOCK_0_FIELDS,
    },
];
static PACKET_158_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransferID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_158_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransferInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_158_BLOCK_0_FIELDS,
    },
];
static PACKET_159_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Filename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "FilePath",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DeleteOnCompletion",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "UseBigPackets",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "VFileID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VFileType",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_159_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "XferID",
        repetition: BlockRepetition::Single,
        fields: PACKET_159_BLOCK_0_FIELDS,
    },
];
static PACKET_160_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Result",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_160_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "XferID",
        repetition: BlockRepetition::Single,
        fields: PACKET_160_BLOCK_0_FIELDS,
    },
];
static PACKET_161_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsTrial",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_161_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TextureEntry",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_161_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParamValue",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_161_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AppearanceVersion",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CofVersion",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_161_BLOCK_4_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "HoverHeight",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_161_BLOCK_5_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AttachmentPoint",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_161_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Sender",
        repetition: BlockRepetition::Single,
        fields: PACKET_161_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_161_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "VisualParam",
        repetition: BlockRepetition::Variable,
        fields: PACKET_161_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "AppearanceData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_161_BLOCK_3_FIELDS,
    },
    BlockDescriptor {
        name: "AppearanceHover",
        repetition: BlockRepetition::Variable,
        fields: PACKET_161_BLOCK_4_FIELDS,
    },
    BlockDescriptor {
        name: "AttachmentBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_161_BLOCK_5_FIELDS,
    },
];
static PACKET_162_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_162_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Value",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_162_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_162_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "CameraProperty",
        repetition: BlockRepetition::Variable,
        fields: PACKET_162_BLOCK_1_FIELDS,
    },
];
static PACKET_163_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_163_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_163_BLOCK_0_FIELDS,
    },
];
static PACKET_164_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_164_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_164_BLOCK_0_FIELDS,
    },
];
static PACKET_165_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DefaultPayPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_165_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PayButton",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_165_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_165_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ButtonData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_165_BLOCK_1_FIELDS,
    },
];
static PACKET_166_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TargetPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_166_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Reason",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_166_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TargetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_166_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "UserInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_166_BLOCK_1_FIELDS,
    },
];
static PACKET_167_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_167_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UserInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_167_BLOCK_0_FIELDS,
    },
];
static PACKET_168_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GodID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GodSessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "KickFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Reason",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_168_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UserInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_168_BLOCK_0_FIELDS,
    },
];
static PACKET_169_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_169_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_169_BLOCK_0_FIELDS,
    },
];
static PACKET_170_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_170_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_170_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_170_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_170_BLOCK_1_FIELDS,
    },
];
static PACKET_171_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_171_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_171_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_171_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_171_BLOCK_1_FIELDS,
    },
];
static PACKET_172_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_172_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_172_BLOCK_0_FIELDS,
    },
];
static PACKET_173_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GodLevel",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "WebProfilesDisabled",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_173_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_173_BLOCK_0_FIELDS,
    },
];
static PACKET_174_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_174_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FLImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PartnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AboutText",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "FLAboutText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "BornOn",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ProfileURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CharterMember",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_174_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_174_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "PropertiesData",
        repetition: BlockRepetition::Single,
        fields: PACKET_174_BLOCK_1_FIELDS,
    },
];
static PACKET_175_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_175_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "WantToMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "WantToText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SkillsMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SkillsText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LanguagesText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_175_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_175_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "PropertiesData",
        repetition: BlockRepetition::Single,
        fields: PACKET_175_BLOCK_1_FIELDS,
    },
];
static PACKET_176_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AvatarID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_176_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "AcceptNotices",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GroupTitle",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "GroupInsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_176_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ListInProfile",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_176_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_176_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_176_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "NewGroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_176_BLOCK_2_FIELDS,
    },
];
static PACKET_177_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_177_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FLImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AboutText",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "FLAboutText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_177_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_177_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "PropertiesData",
        repetition: BlockRepetition::Single,
        fields: PACKET_177_BLOCK_1_FIELDS,
    },
];
static PACKET_178_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_178_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "WantToMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "WantToText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SkillsMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SkillsText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LanguagesText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_178_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_178_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "PropertiesData",
        repetition: BlockRepetition::Single,
        fields: PACKET_178_BLOCK_1_FIELDS,
    },
];
static PACKET_179_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_179_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Notes",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_179_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_179_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_179_BLOCK_1_FIELDS,
    },
];
static PACKET_180_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_180_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Notes",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_180_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_180_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_180_BLOCK_1_FIELDS,
    },
];
static PACKET_181_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_181_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PickID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PickName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_181_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_181_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_181_BLOCK_1_FIELDS,
    },
];
static PACKET_182_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_182_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_182_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_182_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_182_BLOCK_1_FIELDS,
    },
];
static PACKET_183_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_183_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Creator",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Date",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "DateUTC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Duration",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Cover",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "GlobalPos",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "EventFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_183_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_183_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_183_BLOCK_1_FIELDS,
    },
];
static PACKET_184_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_184_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_184_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_184_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_184_BLOCK_1_FIELDS,
    },
];
static PACKET_185_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_185_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_185_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_185_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_185_BLOCK_1_FIELDS,
    },
];
static PACKET_186_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_186_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_186_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "QueryFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "QueryStart",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_186_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_186_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_186_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_186_BLOCK_2_FIELDS,
    },
];
static PACKET_187_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_187_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PickID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TopPick",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "User",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "OriginalName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "PosGlobal",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "SortOrder",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Enabled",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_187_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_187_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_187_BLOCK_1_FIELDS,
    },
];
static PACKET_188_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_188_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PickID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TopPick",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PosGlobal",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "SortOrder",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Enabled",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_188_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_188_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_188_BLOCK_1_FIELDS,
    },
];
static PACKET_189_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_189_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PickID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_189_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_189_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_189_BLOCK_1_FIELDS,
    },
];
static PACKET_190_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_190_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PickID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_190_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_190_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_190_BLOCK_1_FIELDS,
    },
];
static PACKET_191_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ObjectOwner",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Questions",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_191_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ExperienceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_191_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_191_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Experience",
        repetition: BlockRepetition::Single,
        fields: PACKET_191_BLOCK_1_FIELDS,
    },
];
static PACKET_192_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TakeControls",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Controls",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PassToAgent",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_192_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_192_BLOCK_0_FIELDS,
    },
];
static PACKET_193_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FirstName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LastName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ObjectName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ChatChannel",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_193_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ButtonLabel",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_193_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_193_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_193_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Buttons",
        repetition: BlockRepetition::Variable,
        fields: PACKET_193_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "OwnerData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_193_BLOCK_2_FIELDS,
    },
];
static PACKET_194_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_194_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChatChannel",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ButtonIndex",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ButtonLabel",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_194_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_194_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_194_BLOCK_1_FIELDS,
    },
];
static PACKET_195_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_195_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_195_BLOCK_0_FIELDS,
    },
];
static PACKET_196_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_196_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectPermissions",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_196_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_196_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_196_BLOCK_1_FIELDS,
    },
];
static PACKET_197_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerIsGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "URL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_197_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_197_BLOCK_0_FIELDS,
    },
];
static PACKET_198_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimPosition",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_198_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_198_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_198_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Options",
        repetition: BlockRepetition::Variable,
        fields: PACKET_198_BLOCK_1_FIELDS,
    },
];
static PACKET_199_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_199_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_199_BLOCK_0_FIELDS,
    },
];
static PACKET_200_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_200_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_200_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_200_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_200_BLOCK_1_FIELDS,
    },
];
static PACKET_201_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_201_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MusicURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MediaAutoScale",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PassPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PassHours",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AuthBuyerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "UserLocation",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "UserLookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LandingType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_201_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_201_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_201_BLOCK_1_FIELDS,
    },
];
static PACKET_202_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_202_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ReturnType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_202_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_202_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_202_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_202_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_202_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TaskIDs",
        repetition: BlockRepetition::Variable,
        fields: PACKET_202_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "OwnerIDs",
        repetition: BlockRepetition::Variable,
        fields: PACKET_202_BLOCK_3_FIELDS,
    },
];
static PACKET_203_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_203_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OtherCleanTime",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_203_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_203_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_203_BLOCK_1_FIELDS,
    },
];
static PACKET_204_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_204_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ReturnType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_204_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_204_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_204_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_204_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_204_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TaskIDs",
        repetition: BlockRepetition::Variable,
        fields: PACKET_204_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "OwnerIDs",
        repetition: BlockRepetition::Variable,
        fields: PACKET_204_BLOCK_3_FIELDS,
    },
];
static PACKET_205_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_205_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ReturnType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_205_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ReturnID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_205_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_205_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_205_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ReturnIDs",
        repetition: BlockRepetition::Variable,
        fields: PACKET_205_BLOCK_2_FIELDS,
    },
];
static PACKET_206_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_206_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_206_BLOCK_0_FIELDS,
    },
];
static PACKET_207_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CovenantID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CovenantTimestamp",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EstateOwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_207_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_207_BLOCK_0_FIELDS,
    },
];
static PACKET_208_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ResetList",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_208_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_208_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Header",
        repetition: BlockRepetition::Single,
        fields: PACKET_208_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_208_BLOCK_1_FIELDS,
    },
];
static PACKET_209_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_209_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_209_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_209_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_209_BLOCK_1_FIELDS,
    },
];
static PACKET_210_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_210_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_210_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_210_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_210_BLOCK_1_FIELDS,
    },
];
static PACKET_211_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_211_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_211_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_211_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_211_BLOCK_1_FIELDS,
    },
];
static PACKET_212_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_212_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsGroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Final",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_212_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "West",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "South",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "East",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "North",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_212_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_212_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_212_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_212_BLOCK_2_FIELDS,
    },
];
static PACKET_213_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_213_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "West",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "South",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "East",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "North",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_213_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_213_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_213_BLOCK_1_FIELDS,
    },
];
static PACKET_214_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_214_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "West",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "South",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "East",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "North",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_214_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_214_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_214_BLOCK_1_FIELDS,
    },
];
static PACKET_215_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_215_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_215_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_215_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_215_BLOCK_1_FIELDS,
    },
];
static PACKET_216_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_216_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsGroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RemoveContribution",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Final",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_216_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Price",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Area",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_216_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_216_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_216_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_216_BLOCK_2_FIELDS,
    },
];
static PACKET_217_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_217_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_217_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_217_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_217_BLOCK_1_FIELDS,
    },
];
static PACKET_218_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_218_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_218_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_218_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_218_BLOCK_1_FIELDS,
    },
];
static PACKET_219_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_219_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_219_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_219_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "List",
        repetition: BlockRepetition::Variable,
        fields: PACKET_219_BLOCK_1_FIELDS,
    },
];
static PACKET_220_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_220_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Sections",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_220_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_220_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_220_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_220_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "List",
        repetition: BlockRepetition::Variable,
        fields: PACKET_220_BLOCK_2_FIELDS,
    },
];
static PACKET_221_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_221_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_221_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_221_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_221_BLOCK_1_FIELDS,
    },
];
static PACKET_222_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_222_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Dwell",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_222_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_222_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_222_BLOCK_1_FIELDS,
    },
];
static PACKET_223_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionTime",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Final",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_223_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_223_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_223_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_223_BLOCK_1_FIELDS,
    },
];
static PACKET_224_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MusicURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "RegionX",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionY",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "BillableArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ShowDir",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "IsForSale",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "UserLocation",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AuthorizedBuyerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_224_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_224_BLOCK_0_FIELDS,
    },
];
static PACKET_225_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_225_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_225_BLOCK_0_FIELDS,
    },
];
static PACKET_226_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MasterID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_226_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SlaveID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_226_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MasterParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_226_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SlaveParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_226_BLOCK_1_FIELDS,
    },
];
static PACKET_227_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_227_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_227_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsOwnerGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ActualArea",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Action",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_227_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_227_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_227_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_227_BLOCK_2_FIELDS,
    },
];
static PACKET_228_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_228_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_228_BLOCK_0_FIELDS,
    },
];
static PACKET_229_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BuyerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_229_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_229_BLOCK_0_FIELDS,
    },
];
static PACKET_230_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_230_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_230_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_230_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_230_BLOCK_1_FIELDS,
    },
];
static PACKET_231_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_231_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_231_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_231_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_231_BLOCK_1_FIELDS,
    },
];
static PACKET_232_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_232_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_232_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_232_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_232_BLOCK_1_FIELDS,
    },
];
static PACKET_233_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AuctionID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_233_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AuctionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_233_BLOCK_0_FIELDS,
    },
];
static PACKET_234_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_234_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_234_BLOCK_0_FIELDS,
    },
];
static PACKET_235_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_235_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_235_BLOCK_0_FIELDS,
    },
];
static PACKET_236_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_236_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_236_BLOCK_0_FIELDS,
    },
];
static PACKET_237_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "WinnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_237_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_237_BLOCK_0_FIELDS,
    },
];
static PACKET_238_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_238_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UUIDNameBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_238_BLOCK_0_FIELDS,
    },
];
static PACKET_239_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FirstName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LastName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_239_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UUIDNameBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_239_BLOCK_0_FIELDS,
    },
];
static PACKET_240_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_240_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UUIDNameBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_240_BLOCK_0_FIELDS,
    },
];
static PACKET_241_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_241_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UUIDNameBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_241_BLOCK_0_FIELDS,
    },
];
static PACKET_242_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Channel",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SourceType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Radius",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_242_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ChatData",
        repetition: BlockRepetition::Single,
        fields: PACKET_242_BLOCK_0_FIELDS,
    },
];
static PACKET_243_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_243_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_243_BLOCK_0_FIELDS,
    },
];
static PACKET_244_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_244_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_244_BLOCK_0_FIELDS,
    },
];
static PACKET_245_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_245_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "IDBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_245_BLOCK_0_FIELDS,
    },
];
static PACKET_246_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_246_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Script",
        repetition: BlockRepetition::Single,
        fields: PACKET_246_BLOCK_0_FIELDS,
    },
];
static PACKET_247_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Running",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_247_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Script",
        repetition: BlockRepetition::Single,
        fields: PACKET_247_BLOCK_0_FIELDS,
    },
];
static PACKET_248_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_248_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Running",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_248_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_248_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Script",
        repetition: BlockRepetition::Single,
        fields: PACKET_248_BLOCK_1_FIELDS,
    },
];
static PACKET_249_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_249_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_249_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_249_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Script",
        repetition: BlockRepetition::Single,
        fields: PACKET_249_BLOCK_1_FIELDS,
    },
];
static PACKET_250_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SearchID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SearchPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "SearchDir",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "SearchName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Range",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Arc",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "SearchRegions",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_250_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Requester",
        repetition: BlockRepetition::Single,
        fields: PACKET_250_BLOCK_0_FIELDS,
    },
];
static PACKET_251_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_251_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Velocity",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Rotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Range",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_251_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Requester",
        repetition: BlockRepetition::Single,
        fields: PACKET_251_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SensedData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_251_BLOCK_1_FIELDS,
    },
];
static PACKET_252_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_252_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_252_BLOCK_0_FIELDS,
    },
];
static PACKET_253_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_253_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Timestamp",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_253_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ChannelVersion",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_253_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_253_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_253_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "SimData",
        repetition: BlockRepetition::Single,
        fields: PACKET_253_BLOCK_2_FIELDS,
    },
];
static PACKET_254_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ViewerIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Disconnect",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_254_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "UserData",
        repetition: BlockRepetition::Single,
        fields: PACKET_254_BLOCK_0_FIELDS,
    },
];
static PACKET_255_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_255_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_255_BLOCK_0_FIELDS,
    },
];
static PACKET_256_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_256_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_256_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_256_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_256_BLOCK_1_FIELDS,
    },
];
static PACKET_257_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_257_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FromGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ToAgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentEstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Offline",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Dialog",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Timestamp",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FromAgentName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "BinaryBucket",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_257_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_257_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_257_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_257_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MessageBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_257_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "EstateBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_257_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "MetaData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_257_BLOCK_3_FIELDS,
    },
];
static PACKET_258_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_258_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_258_BLOCK_0_FIELDS,
    },
];
static PACKET_259_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Hunter",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Prey",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SpaceIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_259_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GlobalX",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "GlobalY",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_259_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_259_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "LocationBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_259_BLOCK_1_FIELDS,
    },
];
static PACKET_260_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_260_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Token",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_260_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_260_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RequestBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_260_BLOCK_1_FIELDS,
    },
];
static PACKET_261_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_261_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GodLevel",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Token",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_261_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_261_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GrantData",
        repetition: BlockRepetition::Single,
        fields: PACKET_261_BLOCK_1_FIELDS,
    },
];
static PACKET_262_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_262_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Invoice",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_262_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Parameter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_262_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_262_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_262_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParamList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_262_BLOCK_2_FIELDS,
    },
];
static PACKET_263_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_263_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Invoice",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_263_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Parameter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_263_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_263_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_263_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParamList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_263_BLOCK_2_FIELDS,
    },
];
static PACKET_264_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_264_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Invoice",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_264_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Parameter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_264_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_264_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_264_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParamList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_264_BLOCK_2_FIELDS,
    },
];
static PACKET_265_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_265_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Invoice",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_265_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Parameter",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_265_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_265_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_265_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ParamList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_265_BLOCK_2_FIELDS,
    },
];
static PACKET_266_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_266_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MuteCRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_266_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_266_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MuteData",
        repetition: BlockRepetition::Single,
        fields: PACKET_266_BLOCK_1_FIELDS,
    },
];
static PACKET_267_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_267_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MuteID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MuteName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MuteType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MuteFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_267_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_267_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MuteData",
        repetition: BlockRepetition::Single,
        fields: PACKET_267_BLOCK_1_FIELDS,
    },
];
static PACKET_268_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_268_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MuteID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MuteName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_268_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_268_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MuteData",
        repetition: BlockRepetition::Single,
        fields: PACKET_268_BLOCK_1_FIELDS,
    },
];
static PACKET_269_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_269_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NotecardItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_269_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_269_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_269_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NotecardData",
        repetition: BlockRepetition::Single,
        fields: PACKET_269_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_269_BLOCK_2_FIELDS,
    },
];
static PACKET_270_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_270_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_270_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_270_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_270_BLOCK_1_FIELDS,
    },
];
static PACKET_271_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SimApproved",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_271_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_271_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_271_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_271_BLOCK_1_FIELDS,
    },
];
static PACKET_272_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Stamp",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_272_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NewName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_272_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_272_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_272_BLOCK_1_FIELDS,
    },
];
static PACKET_273_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_273_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OldAgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OldItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NewFolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NewName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_273_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_273_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_273_BLOCK_1_FIELDS,
    },
];
static PACKET_274_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_274_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_274_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_274_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_274_BLOCK_1_FIELDS,
    },
];
static PACKET_275_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_275_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_275_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_275_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_275_BLOCK_1_FIELDS,
    },
];
static PACKET_276_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_276_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NewAssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_276_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_276_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_276_BLOCK_1_FIELDS,
    },
];
static PACKET_277_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_277_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_277_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_277_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Single,
        fields: PACKET_277_BLOCK_1_FIELDS,
    },
];
static PACKET_278_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_278_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_278_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_278_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_278_BLOCK_1_FIELDS,
    },
];
static PACKET_279_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Stamp",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_279_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_279_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_279_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_279_BLOCK_1_FIELDS,
    },
];
static PACKET_280_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_280_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_280_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_280_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_280_BLOCK_1_FIELDS,
    },
];
static PACKET_281_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_281_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SortOrder",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FetchFolders",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "FetchItems",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_281_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_281_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_281_BLOCK_1_FIELDS,
    },
];
static PACKET_282_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Version",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Descendents",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_282_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_282_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_282_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_282_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_282_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ItemData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_282_BLOCK_2_FIELDS,
    },
];
static PACKET_283_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_283_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_283_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_283_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_283_BLOCK_1_FIELDS,
    },
];
static PACKET_284_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_284_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_284_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_284_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_284_BLOCK_1_FIELDS,
    },
];
static PACKET_285_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_285_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_285_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_285_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_285_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_285_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ItemData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_285_BLOCK_2_FIELDS,
    },
];
static PACKET_286_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_286_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_286_BLOCK_0_FIELDS,
    },
];
static PACKET_287_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsReadable",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_287_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_287_BLOCK_0_FIELDS,
    },
];
static PACKET_288_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_288_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_288_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_288_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_288_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_288_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ItemData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_288_BLOCK_2_FIELDS,
    },
];
static PACKET_289_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_289_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_289_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_289_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_289_BLOCK_1_FIELDS,
    },
];
static PACKET_290_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_290_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Key",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_290_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_290_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_290_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "UpdateData",
        repetition: BlockRepetition::Single,
        fields: PACKET_290_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_290_BLOCK_2_FIELDS,
    },
];
static PACKET_291_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_291_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_291_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_291_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_291_BLOCK_1_FIELDS,
    },
];
static PACKET_292_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_292_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_292_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_292_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_292_BLOCK_1_FIELDS,
    },
];
static PACKET_293_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_293_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_293_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_293_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_293_BLOCK_1_FIELDS,
    },
];
static PACKET_294_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Serial",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "Filename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_294_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_294_BLOCK_0_FIELDS,
    },
];
static PACKET_295_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_295_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Destination",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DestinationID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PacketCount",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PacketNumber",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_295_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_295_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_295_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_295_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_295_BLOCK_2_FIELDS,
    },
];
static PACKET_296_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_296_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_296_BLOCK_0_FIELDS,
    },
];
static PACKET_297_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_297_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FromTaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BypassRaycast",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RayStart",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayEnd",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayTargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RayEndIsIntersection",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RezSelected",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RemoveItem",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ItemFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_297_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_297_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_297_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RezData",
        repetition: BlockRepetition::Single,
        fields: PACKET_297_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_297_BLOCK_2_FIELDS,
    },
];
static PACKET_298_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_298_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FromTaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BypassRaycast",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RayStart",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayEnd",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayTargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RayEndIsIntersection",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RezSelected",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RemoveItem",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ItemFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_298_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NotecardItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_298_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_298_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_298_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RezData",
        repetition: BlockRepetition::Single,
        fields: PACKET_298_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "NotecardData",
        repetition: BlockRepetition::Single,
        fields: PACKET_298_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_298_BLOCK_3_FIELDS,
    },
];
static PACKET_299_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_299_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "InventoryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_299_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NeedsValidation",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_299_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "InfoBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_299_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_299_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ValidationBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_299_BLOCK_2_FIELDS,
    },
];
static PACKET_300_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "InventoryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_300_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "InfoBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_300_BLOCK_0_FIELDS,
    },
];
static PACKET_301_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_301_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_301_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_301_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_301_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_301_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_301_BLOCK_2_FIELDS,
    },
];
static PACKET_302_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_302_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_302_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_302_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_302_BLOCK_1_FIELDS,
    },
];
static PACKET_303_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_303_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_303_BLOCK_0_FIELDS,
    },
];
static PACKET_304_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_304_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OtherID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_304_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_304_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ExBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_304_BLOCK_1_FIELDS,
    },
];
static PACKET_305_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_305_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_305_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_305_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_305_BLOCK_1_FIELDS,
    },
];
static PACKET_306_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_306_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_306_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_306_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_306_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_306_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "FolderData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_306_BLOCK_2_FIELDS,
    },
];
static PACKET_307_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_307_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_307_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_307_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_307_BLOCK_1_FIELDS,
    },
];
static PACKET_308_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_308_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Enabled",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_308_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_308_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_308_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "UpdateBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_308_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_308_BLOCK_2_FIELDS,
    },
];
static PACKET_309_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_309_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "WearableType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_309_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_309_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_309_BLOCK_1_FIELDS,
    },
];
static PACKET_310_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_310_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_310_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_310_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_310_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_310_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_310_BLOCK_2_FIELDS,
    },
];
static PACKET_311_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_311_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EventID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_311_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_311_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_311_BLOCK_1_FIELDS,
    },
];
static PACKET_312_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "QueryID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_312_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_312_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "QueryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_312_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "EventData",
        repetition: BlockRepetition::Single,
        fields: PACKET_312_BLOCK_1_FIELDS,
    },
];
static PACKET_313_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_313_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RequestBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_313_BLOCK_0_FIELDS,
    },
];
static PACKET_314_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_314_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ReplyBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_314_BLOCK_0_FIELDS,
    },
];
static PACKET_315_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_315_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AggregatePermNextOwner",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AggregatePermInventory",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_315_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_315_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_315_BLOCK_1_FIELDS,
    },
];
static PACKET_316_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionTime",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AggregatePermNextOwner",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AggregatePermInventory",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_316_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_316_BLOCK_0_FIELDS,
    },
];
static PACKET_317_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_317_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_317_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_317_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_317_BLOCK_1_FIELDS,
    },
];
static PACKET_318_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionSuccess",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MoneyBalance",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SquareMetersCredit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SquareMetersCommitted",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_318_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsSourceGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsDestGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ItemDescription",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_318_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_318_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_318_BLOCK_1_FIELDS,
    },
];
static PACKET_319_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TargetPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_319_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionSuccess",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MoneyBalance",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SquareMetersCredit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SquareMetersCommitted",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_319_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SourceID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsSourceGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsDestGroup",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ItemDescription",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_319_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TargetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_319_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_319_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionInfo",
        repetition: BlockRepetition::Single,
        fields: PACKET_319_BLOCK_2_FIELDS,
    },
];
static PACKET_320_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_320_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GestureFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_320_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_320_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_320_BLOCK_1_FIELDS,
    },
];
static PACKET_321_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_321_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GestureFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_321_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_321_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_321_BLOCK_1_FIELDS,
    },
];
static PACKET_322_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Filename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_322_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MuteData",
        repetition: BlockRepetition::Single,
        fields: PACKET_322_BLOCK_0_FIELDS,
    },
];
static PACKET_323_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_323_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_323_BLOCK_0_FIELDS,
    },
];
static PACKET_324_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_324_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentRelated",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RelatedRights",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_324_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_324_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Rights",
        repetition: BlockRepetition::Variable,
        fields: PACKET_324_BLOCK_1_FIELDS,
    },
];
static PACKET_325_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_325_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentRelated",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RelatedRights",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_325_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_325_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Rights",
        repetition: BlockRepetition::Variable,
        fields: PACKET_325_BLOCK_1_FIELDS,
    },
];
static PACKET_326_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_326_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_326_BLOCK_0_FIELDS,
    },
];
static PACKET_327_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_327_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_327_BLOCK_0_FIELDS,
    },
];
static PACKET_328_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_328_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LocationID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocationPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LocationLookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_328_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_328_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "StartLocationData",
        repetition: BlockRepetition::Single,
        fields: PACKET_328_BLOCK_1_FIELDS,
    },
];
static PACKET_329_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocationID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "LocationPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LocationLookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_329_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "StartLocationData",
        repetition: BlockRepetition::Single,
        fields: PACKET_329_BLOCK_0_FIELDS,
    },
];
static PACKET_330_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_330_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "NetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_330_BLOCK_0_FIELDS,
    },
];
static PACKET_331_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Ratio",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_331_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_331_BLOCK_0_FIELDS,
    },
];
static PACKET_332_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_332_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_332_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_332_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Users",
        repetition: BlockRepetition::Variable,
        fields: PACKET_332_BLOCK_1_FIELDS,
    },
];
static PACKET_333_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_333_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NVPair",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_333_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TaskData",
        repetition: BlockRepetition::Single,
        fields: PACKET_333_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NameValueData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_333_BLOCK_1_FIELDS,
    },
];
static PACKET_334_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_334_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NVPair",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_334_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TaskData",
        repetition: BlockRepetition::Single,
        fields: PACKET_334_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NameValueData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_334_BLOCK_1_FIELDS,
    },
];
static PACKET_335_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_335_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AttachmentPoint",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_335_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AddItem",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "UseExistingAsset",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_335_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_335_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_335_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AttachmentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_335_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "OperationData",
        repetition: BlockRepetition::Single,
        fields: PACKET_335_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_335_BLOCK_3_FIELDS,
    },
];
static PACKET_336_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_336_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AttachmentPoint",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_336_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_336_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AttachmentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_336_BLOCK_1_FIELDS,
    },
];
static PACKET_337_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Tempfile",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "StoreLocal",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AssetData",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_337_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AssetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_337_BLOCK_0_FIELDS,
    },
];
static PACKET_338_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UUID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_338_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AssetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_338_BLOCK_0_FIELDS,
    },
];
static PACKET_339_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FromAddress",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Subject",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_339_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_339_BLOCK_0_FIELDS,
    },
];
static PACKET_340_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "More",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FromAddress",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Subject",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MailFilter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_340_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_340_BLOCK_0_FIELDS,
    },
];
static PACKET_341_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Hash",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "RequestType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Request",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_341_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_341_BLOCK_0_FIELDS,
    },
];
static PACKET_342_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Hash",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Reply",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_342_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_342_BLOCK_0_FIELDS,
    },
];
static PACKET_343_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_343_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Charter",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ShowInList",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MembershipFee",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OpenEnrollment",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_343_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_343_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_343_BLOCK_1_FIELDS,
    },
];
static PACKET_344_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_344_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_344_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_344_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ReplyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_344_BLOCK_1_FIELDS,
    },
];
static PACKET_345_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_345_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Charter",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ShowInList",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MembershipFee",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OpenEnrollment",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_345_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_345_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_345_BLOCK_1_FIELDS,
    },
];
static PACKET_346_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_346_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MemberID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Change",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_346_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_346_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RoleChange",
        repetition: BlockRepetition::Variable,
        fields: PACKET_346_BLOCK_1_FIELDS,
    },
];
static PACKET_347_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_347_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_347_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_347_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_347_BLOCK_1_FIELDS,
    },
];
static PACKET_348_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_348_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_348_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_348_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_348_BLOCK_1_FIELDS,
    },
];
static PACKET_349_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_349_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_349_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EjecteeID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_349_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_349_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_349_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "EjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_349_BLOCK_2_FIELDS,
    },
];
static PACKET_350_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_350_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_350_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_350_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_350_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_350_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "EjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_350_BLOCK_2_FIELDS,
    },
];
static PACKET_351_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_351_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_351_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_351_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_351_BLOCK_1_FIELDS,
    },
];
static PACKET_352_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_352_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Success",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_352_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_352_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_352_BLOCK_1_FIELDS,
    },
];
static PACKET_353_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_353_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_353_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "InviteeID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_353_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_353_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_353_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "InviteData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_353_BLOCK_2_FIELDS,
    },
];
static PACKET_354_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "InviteeID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MembershipFee",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_354_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupLimit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_354_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "InviteData",
        repetition: BlockRepetition::Single,
        fields: PACKET_354_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_354_BLOCK_1_FIELDS,
    },
];
static PACKET_355_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_355_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_355_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_355_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_355_BLOCK_1_FIELDS,
    },
];
static PACKET_356_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_356_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Charter",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ShowInList",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MemberTitle",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "PowersMask",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "InsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FounderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MembershipFee",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OpenEnrollment",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Money",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMembershipCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupRolesCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "OwnerRole",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_356_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_356_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_356_BLOCK_1_FIELDS,
    },
];
static PACKET_357_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_357_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_357_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_357_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_357_BLOCK_1_FIELDS,
    },
];
static PACKET_358_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_358_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StartDate",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Balance",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TotalCredits",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TotalDebits",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectTaxCurrent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LightTaxCurrent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LandTaxCurrent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupTaxCurrent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelDirFeeCurrent",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectTaxEstimate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LightTaxEstimate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LandTaxEstimate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupTaxEstimate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelDirFeeEstimate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NonExemptMembers",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LastTaxDate",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TaxDate",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_358_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_358_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_358_BLOCK_1_FIELDS,
    },
];
static PACKET_359_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_359_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_359_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_359_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_359_BLOCK_1_FIELDS,
    },
];
static PACKET_360_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_360_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StartDate",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_360_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_360_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_360_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_360_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "HistoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_360_BLOCK_2_FIELDS,
    },
];
static PACKET_361_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_361_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_361_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_361_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_361_BLOCK_1_FIELDS,
    },
];
static PACKET_362_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_362_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntervalDays",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CurrentInterval",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StartDate",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_362_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "User",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Item",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Amount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_362_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_362_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MoneyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_362_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "HistoryData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_362_BLOCK_2_FIELDS,
    },
];
static PACKET_363_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_363_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_363_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_363_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_363_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_363_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_363_BLOCK_2_FIELDS,
    },
];
static PACKET_364_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_364_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TotalNumItems",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_364_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "VoteID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VoteInitiator",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerseDateID",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "StartDateTime",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EndDateTime",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AlreadyVoted",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "VoteCast",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Majority",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Quorum",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ProposalText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_364_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_364_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_364_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ProposalData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_364_BLOCK_2_FIELDS,
    },
];
static PACKET_365_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_365_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_365_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_365_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_365_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_365_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_365_BLOCK_2_FIELDS,
    },
];
static PACKET_366_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_366_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TotalNumItems",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_366_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "VoteID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TerseDateID",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "StartDateTime",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EndDateTime",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "VoteInitiator",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VoteType",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "VoteResult",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Majority",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Quorum",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ProposalText",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_366_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CandidateID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VoteCast",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "NumVotes",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_366_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_366_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TransactionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_366_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "HistoryItemData",
        repetition: BlockRepetition::Single,
        fields: PACKET_366_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "VoteItem",
        repetition: BlockRepetition::Variable,
        fields: PACKET_366_BLOCK_3_FIELDS,
    },
];
static PACKET_367_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_367_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Quorum",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Majority",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Duration",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ProposalText",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_367_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_367_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ProposalData",
        repetition: BlockRepetition::Single,
        fields: PACKET_367_BLOCK_1_FIELDS,
    },
];
static PACKET_368_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_368_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ProposalID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "VoteCast",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_368_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_368_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ProposalData",
        repetition: BlockRepetition::Single,
        fields: PACKET_368_BLOCK_1_FIELDS,
    },
];
static PACKET_369_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_370_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_370_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_370_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_370_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_370_BLOCK_1_FIELDS,
    },
];
static PACKET_371_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_371_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MemberCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_371_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Contribution",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OnlineStatus",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AgentPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Title",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "IsOwner",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_371_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_371_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_371_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "MemberData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_371_BLOCK_2_FIELDS,
    },
];
static PACKET_372_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_372_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_372_BLOCK_0_FIELDS,
    },
];
static PACKET_373_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_373_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Contribution",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_373_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_373_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_373_BLOCK_1_FIELDS,
    },
];
static PACKET_374_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_374_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AcceptNotices",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_374_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ListInProfile",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_374_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_374_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_374_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "NewData",
        repetition: BlockRepetition::Single,
        fields: PACKET_374_BLOCK_2_FIELDS,
    },
];
static PACKET_375_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_375_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_375_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_375_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_375_BLOCK_1_FIELDS,
    },
];
static PACKET_376_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_376_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RoleCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_376_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Title",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Powers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Members",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_376_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_376_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_376_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "RoleData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_376_BLOCK_2_FIELDS,
    },
];
static PACKET_377_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_377_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_377_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_377_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_377_BLOCK_1_FIELDS,
    },
];
static PACKET_378_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TotalPairs",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_378_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MemberID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_378_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_378_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "MemberData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_378_BLOCK_1_FIELDS,
    },
];
static PACKET_379_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_379_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_379_BLOCK_0_FIELDS,
    },
];
static PACKET_380_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_380_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Title",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Selected",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_380_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_380_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_380_BLOCK_1_FIELDS,
    },
];
static PACKET_381_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TitleRoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_381_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_381_BLOCK_0_FIELDS,
    },
];
static PACKET_382_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_382_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RoleID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Title",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Powers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "UpdateType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_382_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_382_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RoleData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_382_BLOCK_1_FIELDS,
    },
];
static PACKET_383_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_383_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RequestData",
        repetition: BlockRepetition::Single,
        fields: PACKET_383_BLOCK_0_FIELDS,
    },
];
static PACKET_384_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Selection",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_384_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ReplyData",
        repetition: BlockRepetition::Single,
        fields: PACKET_384_BLOCK_0_FIELDS,
    },
];
static PACKET_385_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_385_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_385_BLOCK_0_FIELDS,
    },
];
static PACKET_386_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_386_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "WearableType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_386_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_386_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_386_BLOCK_1_FIELDS,
    },
];
static PACKET_387_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_387_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "WearableType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_387_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_387_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_387_BLOCK_1_FIELDS,
    },
];
static PACKET_388_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_388_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TextureIndex",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_388_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_388_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_388_BLOCK_1_FIELDS,
    },
];
static PACKET_389_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SerialNum",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_389_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TextureID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TextureIndex",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "HostName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_389_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_389_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "WearableData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_389_BLOCK_1_FIELDS,
    },
];
static PACKET_390_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_390_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_390_BLOCK_0_FIELDS,
    },
];
static PACKET_391_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FirstName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LastName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "GroupTitle",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ActiveGroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "GroupName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_391_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_391_BLOCK_0_FIELDS,
    },
];
static PACKET_392_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "GroupTitle",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_392_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentGroupData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_392_BLOCK_0_FIELDS,
    },
];
static PACKET_393_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_393_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "AcceptNotices",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GroupInsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Contribution",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_393_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_393_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_393_BLOCK_1_FIELDS,
    },
];
static PACKET_394_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_394_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_394_BLOCK_0_FIELDS,
    },
];
static PACKET_395_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "FromAgentId",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ToAgentId",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GlobalX",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "GlobalY",
        kind: FieldKind::F64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_395_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_395_BLOCK_0_FIELDS,
    },
];
static PACKET_396_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EndPointID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Digest",
        kind: FieldKind::Fixed,
        count: 32,
        fixed_width: 32,
    },
];
static PACKET_396_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_396_BLOCK_0_FIELDS,
    },
];
static PACKET_397_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "EndPointID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_397_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_397_BLOCK_0_FIELDS,
    },
];
static PACKET_398_BLOCKS: &[BlockDescriptor] = &[];
static PACKET_399_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_399_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AttachmentPt",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ItemFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_399_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_399_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_399_BLOCK_1_FIELDS,
    },
];
static PACKET_400_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_400_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CompoundMsgID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TotalObjects",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "FirstDetachAll",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_400_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AttachmentPt",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ItemFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_400_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_400_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "HeaderData",
        repetition: BlockRepetition::Single,
        fields: PACKET_400_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_400_BLOCK_2_FIELDS,
    },
];
static PACKET_401_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_401_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_401_BLOCK_0_FIELDS,
    },
];
static PACKET_402_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_402_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NewFolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_402_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "OldItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OldFolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_402_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_402_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "HeaderData",
        repetition: BlockRepetition::Single,
        fields: PACKET_402_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_402_BLOCK_2_FIELDS,
    },
];
static PACKET_403_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_403_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_403_BLOCK_0_FIELDS,
    },
];
static PACKET_404_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_404_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "IMViaEMail",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DirectoryVisibility",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "EMail",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_404_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_404_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "UserData",
        repetition: BlockRepetition::Single,
        fields: PACKET_404_BLOCK_1_FIELDS,
    },
];
static PACKET_405_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_405_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "IMViaEMail",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DirectoryVisibility",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_405_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_405_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "UserData",
        repetition: BlockRepetition::Single,
        fields: PACKET_405_BLOCK_1_FIELDS,
    },
];
static PACKET_406_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "NewName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_406_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_406_BLOCK_0_FIELDS,
    },
];
static PACKET_407_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_407_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimFilename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ViewerFilename",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_407_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_407_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "FileData",
        repetition: BlockRepetition::Single,
        fields: PACKET_407_BLOCK_1_FIELDS,
    },
];
static PACKET_408_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Invoice",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Digest",
        kind: FieldKind::Fixed,
        count: 32,
        fixed_width: 32,
    },
];
static PACKET_408_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Parameter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_408_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_408_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParamList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_408_BLOCK_1_FIELDS,
    },
];
static PACKET_409_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_409_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_409_BLOCK_0_FIELDS,
    },
];
static PACKET_410_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_410_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Left",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Right",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Top",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Bottom",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_410_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_410_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "LayerData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_410_BLOCK_1_FIELDS,
    },
];
static PACKET_411_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_411_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MinX",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "MaxX",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "MinY",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "MaxY",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_411_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_411_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "PositionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_411_BLOCK_1_FIELDS,
    },
];
static PACKET_412_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_412_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_412_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_412_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "NameData",
        repetition: BlockRepetition::Single,
        fields: PACKET_412_BLOCK_1_FIELDS,
    },
];
static PACKET_413_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_413_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "X",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "Y",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Access",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "WaterHeight",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Agents",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MapImageID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_413_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SizeX",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "SizeY",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_413_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_413_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_413_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "Size",
        repetition: BlockRepetition::Variable,
        fields: PACKET_413_BLOCK_2_FIELDS,
    },
];
static PACKET_414_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EstateID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Godlike",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_414_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_414_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_414_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RequestData",
        repetition: BlockRepetition::Single,
        fields: PACKET_414_BLOCK_1_FIELDS,
    },
];
static PACKET_415_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_415_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_415_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "X",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Y",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Extra",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Extra2",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_415_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_415_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RequestData",
        repetition: BlockRepetition::Single,
        fields: PACKET_415_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Variable,
        fields: PACKET_415_BLOCK_2_FIELDS,
    },
];
static PACKET_416_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AssetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PosGlobal",
        kind: FieldKind::LlVector3d,
        count: 1,
        fixed_width: 24,
    },
    FieldDescriptor {
        name: "To",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "From",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Subject",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Msg",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_416_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_416_BLOCK_0_FIELDS,
    },
];
static PACKET_417_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_417_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_417_BLOCK_0_FIELDS,
    },
];
static PACKET_418_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_418_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_418_BLOCK_0_FIELDS,
    },
];
static PACKET_419_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GridX",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GridY",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_419_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntValue",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StringValue",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_419_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TargetBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_419_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_419_BLOCK_1_FIELDS,
    },
];
static PACKET_420_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RPCServerIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RPCServerPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntValue",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StringValue",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_420_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_420_BLOCK_0_FIELDS,
    },
];
static PACKET_421_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IntValue",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "StringValue",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_421_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_421_BLOCK_0_FIELDS,
    },
];
static PACKET_422_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetIP",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TargetPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_422_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_422_BLOCK_0_FIELDS,
    },
];
static PACKET_423_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Command",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Time",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_423_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "CommandBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_423_BLOCK_0_FIELDS,
    },
];
static PACKET_424_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MediaURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MediaAutoScale",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_424_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "MediaType",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaDesc",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaWidth",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MediaHeight",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MediaLoop",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_424_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_424_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataBlockExtended",
        repetition: BlockRepetition::Single,
        fields: PACKET_424_BLOCK_1_FIELDS,
    },
];
static PACKET_425_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_425_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ReportType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RequestFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Filter",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ParcelLocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_425_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_425_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RequestData",
        repetition: BlockRepetition::Single,
        fields: PACKET_425_BLOCK_1_FIELDS,
    },
];
static PACKET_426_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ReportType",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RequestFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TotalObjectCount",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_426_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LocationX",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocationY",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocationZ",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Score",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TaskName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "OwnerName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_426_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RequestData",
        repetition: BlockRepetition::Single,
        fields: PACKET_426_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ReportData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_426_BLOCK_1_FIELDS,
    },
];
static PACKET_427_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_427_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Code",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Token",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "System",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Message",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_427_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_427_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Data",
        repetition: BlockRepetition::Single,
        fields: PACKET_427_BLOCK_1_FIELDS,
    },
];
static PACKET_428_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_428_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "IncludeInSearch",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_428_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_428_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_428_BLOCK_1_FIELDS,
    },
];
static PACKET_429_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_429_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_429_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_429_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryData",
        repetition: BlockRepetition::Single,
        fields: PACKET_429_BLOCK_1_FIELDS,
    },
];
static PACKET_430_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_430_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CallbackID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "TransactionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OldItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InvType",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_430_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_430_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "InventoryBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_430_BLOCK_1_FIELDS,
    },
];
static PACKET_431_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsPremium",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_431_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_431_BLOCK_0_FIELDS,
    },
];
static PACKET_432_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupLimit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_432_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_432_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_432_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_432_BLOCK_1_FIELDS,
    },
];
static PACKET_433_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupLimit",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_433_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Charter",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ShowInList",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "InsigniaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MembershipFee",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OpenEnrollment",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AllowPublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "MaturePublish",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_433_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_433_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Single,
        fields: PACKET_433_BLOCK_1_FIELDS,
    },
];
static PACKET_434_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_434_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PCode",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Material",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AddFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PathCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathScaleX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathScaleY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwist",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwistBegin",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRadiusOffset",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperX",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperY",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRevolutions",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathSkew",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileHollow",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "BypassRaycast",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RayStart",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayEnd",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "RayTargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "RayEndIsIntersection",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Scale",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Rotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "State",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_434_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_434_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_434_BLOCK_1_FIELDS,
    },
];
static PACKET_435_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_435_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_435_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_435_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_435_BLOCK_1_FIELDS,
    },
];
static PACKET_436_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_436_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CacheMissType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_436_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_436_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_436_BLOCK_1_FIELDS,
    },
];
static PACKET_437_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_437_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectLocalID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_437_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_437_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_437_BLOCK_1_FIELDS,
    },
];
static PACKET_438_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_438_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_438_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_438_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_438_BLOCK_1_FIELDS,
    },
];
static PACKET_439_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "X",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Y",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Z",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_439_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "You",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "Prey",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_439_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_439_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Location",
        repetition: BlockRepetition::Variable,
        fields: PACKET_439_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Index",
        repetition: BlockRepetition::Single,
        fields: PACKET_439_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_439_BLOCK_2_FIELDS,
    },
];
static PACKET_440_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_440_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SimIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "SeedCapability",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_440_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_440_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_440_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_440_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "Info",
        repetition: BlockRepetition::Single,
        fields: PACKET_440_BLOCK_2_FIELDS,
    },
];
static PACKET_441_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_441_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_441_BLOCK_0_FIELDS,
    },
];
static PACKET_442_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreatorID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CreationDate",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnershipCost",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AggregatePerms",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AggregatePermTextures",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AggregatePermTexturesOwner",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "InventorySerial",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ItemID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FolderID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "FromTaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "LastOwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TouchName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SitName",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TextureID",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_442_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_442_BLOCK_0_FIELDS,
    },
];
static PACKET_443_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BaseMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EveryoneMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "NextOwnerMask",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnershipCost",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SaleType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LastOwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Description",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_443_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Single,
        fields: PACKET_443_BLOCK_0_FIELDS,
    },
];
static PACKET_444_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_444_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "West",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "South",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "East",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "North",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SnapSelection",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_444_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_444_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_444_BLOCK_1_FIELDS,
    },
];
static PACKET_445_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "CanAcceptAgents",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CanAcceptTasks",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_445_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
];
static PACKET_445_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SimStatus",
        repetition: BlockRepetition::Single,
        fields: PACKET_445_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SimFlags",
        repetition: BlockRepetition::Single,
        fields: PACKET_445_BLOCK_1_FIELDS,
    },
];
static PACKET_446_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SoundID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Gain",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_446_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_446_BLOCK_0_FIELDS,
    },
];
static PACKET_447_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Gain",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_447_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_447_BLOCK_0_FIELDS,
    },
];
static PACKET_448_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SoundID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_448_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_448_BLOCK_0_FIELDS,
    },
];
static PACKET_449_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "From",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "To",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Subject",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Body",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_449_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_449_BLOCK_0_FIELDS,
    },
];
static PACKET_450_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_450_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Duration",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Color",
        kind: FieldKind::Fixed,
        count: 4,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TypeData",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_450_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_450_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "Effect",
        repetition: BlockRepetition::Variable,
        fields: PACKET_450_BLOCK_1_FIELDS,
    },
];
static PACKET_451_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PingID",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "OldestUnacked",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_451_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "PingID",
        repetition: BlockRepetition::Single,
        fields: PACKET_451_BLOCK_0_FIELDS,
    },
];
static PACKET_452_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "PingID",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_452_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "PingID",
        repetition: BlockRepetition::Single,
        fields: PACKET_452_BLOCK_0_FIELDS,
    },
];
static PACKET_453_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "IP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Port",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PublicIP",
        kind: FieldKind::IpAddr,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PublicPort",
        kind: FieldKind::IpPort,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "RegionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "SimAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_453_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "NeighborBlock",
        repetition: BlockRepetition::Multiple(4),
        fields: PACKET_453_BLOCK_0_FIELDS,
    },
];
static PACKET_454_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "BodyRotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "HeadRotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "State",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "CameraCenter",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CameraAtAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CameraLeftAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CameraUpAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Far",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ControlFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_454_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_454_BLOCK_0_FIELDS,
    },
];
static PACKET_455_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_455_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AnimID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "StartAnim",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_455_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TypeData",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_455_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_455_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AnimationList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_455_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "PhysicalAvatarEventList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_455_BLOCK_2_FIELDS,
    },
];
static PACKET_456_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_456_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TargetID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Offset",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_456_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_456_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "TargetObject",
        repetition: BlockRepetition::Single,
        fields: PACKET_456_BLOCK_1_FIELDS,
    },
];
static PACKET_457_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_457_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_457_BLOCK_0_FIELDS,
    },
];
static PACKET_458_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_458_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Image",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "DiscardLevel",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "DownloadPriority",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Packet",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_458_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_458_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "RequestImage",
        repetition: BlockRepetition::Variable,
        fields: PACKET_458_BLOCK_1_FIELDS,
    },
];
static PACKET_459_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Codec",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Size",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Packets",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_459_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_459_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ImageID",
        repetition: BlockRepetition::Single,
        fields: PACKET_459_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ImageData",
        repetition: BlockRepetition::Single,
        fields: PACKET_459_BLOCK_1_FIELDS,
    },
];
static PACKET_460_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Packet",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_460_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_460_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ImageID",
        repetition: BlockRepetition::Single,
        fields: PACKET_460_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ImageData",
        repetition: BlockRepetition::Single,
        fields: PACKET_460_BLOCK_1_FIELDS,
    },
];
static PACKET_461_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Type",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_461_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_461_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "LayerID",
        repetition: BlockRepetition::Single,
        fields: PACKET_461_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "LayerData",
        repetition: BlockRepetition::Single,
        fields: PACKET_461_BLOCK_1_FIELDS,
    },
];
static PACKET_462_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "TimeDilation",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_462_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "State",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "FullID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PCode",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Material",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ClickAction",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Scale",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ObjectData",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "UpdateFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PathCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileCurve",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "PathScaleX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathScaleY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearX",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathShearY",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwist",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTwistBegin",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRadiusOffset",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperX",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathTaperY",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathRevolutions",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PathSkew",
        kind: FieldKind::S8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "ProfileBegin",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileEnd",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "ProfileHollow",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
    FieldDescriptor {
        name: "TextureEntry",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TextureAnim",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "NameValue",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Text",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TextColor",
        kind: FieldKind::Fixed,
        count: 4,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MediaURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "PSBlock",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ExtraParams",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Sound",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Gain",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Radius",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "JointType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "JointPivot",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "JointAxisOrAnchor",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
];
static PACKET_462_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_462_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_462_BLOCK_1_FIELDS,
    },
];
static PACKET_463_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "TimeDilation",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_463_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "UpdateFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_463_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_463_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_463_BLOCK_1_FIELDS,
    },
];
static PACKET_464_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "TimeDilation",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_464_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "CRC",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "UpdateFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_464_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_464_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_464_BLOCK_1_FIELDS,
    },
];
static PACKET_465_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "TimeDilation",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_465_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "TextureEntry",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_465_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "RegionData",
        repetition: BlockRepetition::Single,
        fields: PACKET_465_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_465_BLOCK_1_FIELDS,
    },
];
static PACKET_466_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_466_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ObjectData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_466_BLOCK_0_FIELDS,
    },
];
static PACKET_467_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TransferID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ChannelType",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Packet",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_467_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TransferData",
        repetition: BlockRepetition::Single,
        fields: PACKET_467_BLOCK_0_FIELDS,
    },
];
static PACKET_468_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Packet",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_468_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_468_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "XferID",
        repetition: BlockRepetition::Single,
        fields: PACKET_468_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataPacket",
        repetition: BlockRepetition::Single,
        fields: PACKET_468_BLOCK_1_FIELDS,
    },
];
static PACKET_469_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Packet",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_469_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "XferID",
        repetition: BlockRepetition::Single,
        fields: PACKET_469_BLOCK_0_FIELDS,
    },
];
static PACKET_470_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_470_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AnimID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AnimSequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_470_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_470_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TypeData",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_470_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Sender",
        repetition: BlockRepetition::Single,
        fields: PACKET_470_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AnimationList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_470_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "AnimationSourceList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_470_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "PhysicalAvatarEventList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_470_BLOCK_3_FIELDS,
    },
];
static PACKET_471_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_471_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AutoPilot",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SitPosition",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "SitRotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CameraEyeOffset",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "CameraAtOffset",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ForceMouselook",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_471_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SitObject",
        repetition: BlockRepetition::Single,
        fields: PACKET_471_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "SitTransform",
        repetition: BlockRepetition::Single,
        fields: PACKET_471_BLOCK_1_FIELDS,
    },
];
static PACKET_472_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Plane",
        kind: FieldKind::LlVector4,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_472_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "CameraCollidePlane",
        repetition: BlockRepetition::Single,
        fields: PACKET_472_BLOCK_0_FIELDS,
    },
];
static PACKET_473_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RequestResult",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SnapSelection",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SelfCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OtherCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PublicCount",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "LocalID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "IsGroupOwned",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AuctionID",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ClaimDate",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ClaimPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RentPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AABBMin",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AABBMax",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Bitmap",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Area",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Status",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "SimWideMaxPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SimWideTotalPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "MaxPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "TotalPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OwnerPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GroupPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OtherPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SelectedPrims",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelPrimBonus",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "OtherCleanTime",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "ParcelFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "SalePrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Name",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "Desc",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MusicURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaURL",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "MediaID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "MediaAutoScale",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "PassPrice",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "PassHours",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Category",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AuthBuyerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SnapshotID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "UserLocation",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "UserLookAt",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LandingType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionPushOverride",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionDenyAnonymous",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionDenyIdentified",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "RegionDenyTransacted",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_473_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionDenyAgeUnverified",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_473_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionAllowAccessOverride",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_473_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParcelEnvironmentVersion",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "RegionAllowEnvironmentOverride",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_473_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "ParcelData",
        repetition: BlockRepetition::Single,
        fields: PACKET_473_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AgeVerificationBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_473_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "RegionAllowAccessBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_473_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "ParcelEnvironmentBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_473_BLOCK_3_FIELDS,
    },
];
static PACKET_474_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "LayerType",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Direction",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "LayerData",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_474_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "EdgeData",
        repetition: BlockRepetition::Single,
        fields: PACKET_474_BLOCK_0_FIELDS,
    },
];
static PACKET_475_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "ViewerCircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AgentVel",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Center",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Size",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AtAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LeftAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "UpAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ChangedGrid",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Far",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Aspect",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "Throttles",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "LocomotionState",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "HeadRotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "BodyRotation",
        kind: FieldKind::LlQuaternion,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ControlFlags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "EnergyLevel",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "GodLevel",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AlwaysRun",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "PreyAgent",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AgentTextures",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
    FieldDescriptor {
        name: "ActiveGroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_475_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GroupID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "GroupPowers",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "AcceptNotices",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_475_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Animation",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_475_BLOCK_3_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "GranterID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_475_BLOCK_4_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "NVPairs",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_475_BLOCK_5_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ParamValue",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_475_BLOCK_6_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentLegacyAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "AgentMaxAccess",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_475_BLOCK_7_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Flags",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_475_BLOCK_8_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "InventoryHost",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_475_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_475_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "GroupData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "AnimationData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_2_FIELDS,
    },
    BlockDescriptor {
        name: "GranterBlock",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_3_FIELDS,
    },
    BlockDescriptor {
        name: "NVPairData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_4_FIELDS,
    },
    BlockDescriptor {
        name: "VisualParam",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_5_FIELDS,
    },
    BlockDescriptor {
        name: "AgentAccess",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_6_FIELDS,
    },
    BlockDescriptor {
        name: "AgentInfo",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_7_FIELDS,
    },
    BlockDescriptor {
        name: "AgentInventoryHost",
        repetition: BlockRepetition::Variable,
        fields: PACKET_475_BLOCK_8_FIELDS,
    },
];
static PACKET_476_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "ViewerCircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_476_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_476_BLOCK_0_FIELDS,
    },
];
static PACKET_477_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "RegionHandle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "ViewerCircuitCode",
        kind: FieldKind::U32,
        count: 1,
        fixed_width: 4,
    },
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AgentPos",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AgentVel",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Center",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Size",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "AtAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "LeftAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "UpAxis",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "ChangedGrid",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_477_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_477_BLOCK_0_FIELDS,
    },
];
static PACKET_478_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "TaskID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AttachmentNeedsSave",
        kind: FieldKind::Bool,
        count: 1,
        fixed_width: 1,
    },
];
static PACKET_478_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "TaskData",
        repetition: BlockRepetition::Single,
        fields: PACKET_478_BLOCK_0_FIELDS,
    },
];
static PACKET_479_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Method",
        kind: FieldKind::U16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_479_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 2,
        fixed_width: 0,
    },
];
static PACKET_479_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "MethodData",
        repetition: BlockRepetition::Single,
        fields: PACKET_479_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "DataBlock",
        repetition: BlockRepetition::Single,
        fields: PACKET_479_BLOCK_1_FIELDS,
    },
];
static PACKET_480_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "SoundID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "OwnerID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ObjectID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "ParentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "Handle",
        kind: FieldKind::U64,
        count: 1,
        fixed_width: 8,
    },
    FieldDescriptor {
        name: "Position",
        kind: FieldKind::LlVector3,
        count: 1,
        fixed_width: 12,
    },
    FieldDescriptor {
        name: "Gain",
        kind: FieldKind::F32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_480_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "SoundData",
        repetition: BlockRepetition::Single,
        fields: PACKET_480_BLOCK_0_FIELDS,
    },
];
static PACKET_481_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "ID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_481_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AnimID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "AnimSequenceID",
        kind: FieldKind::S32,
        count: 1,
        fixed_width: 4,
    },
];
static PACKET_481_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "Sender",
        repetition: BlockRepetition::Single,
        fields: PACKET_481_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AnimationList",
        repetition: BlockRepetition::Variable,
        fields: PACKET_481_BLOCK_1_FIELDS,
    },
];
static PACKET_482_BLOCK_0_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "AgentID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
    FieldDescriptor {
        name: "SessionID",
        kind: FieldKind::LlUuid,
        count: 1,
        fixed_width: 16,
    },
];
static PACKET_482_BLOCK_1_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Index",
        kind: FieldKind::U8,
        count: 1,
        fixed_width: 1,
    },
    FieldDescriptor {
        name: "Value",
        kind: FieldKind::S16,
        count: 1,
        fixed_width: 2,
    },
];
static PACKET_482_BLOCK_2_FIELDS: &[FieldDescriptor] = &[
    FieldDescriptor {
        name: "Data",
        kind: FieldKind::Variable,
        count: 1,
        fixed_width: 0,
    },
];
static PACKET_482_BLOCKS: &[BlockDescriptor] = &[
    BlockDescriptor {
        name: "AgentData",
        repetition: BlockRepetition::Single,
        fields: PACKET_482_BLOCK_0_FIELDS,
    },
    BlockDescriptor {
        name: "AxisData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_482_BLOCK_1_FIELDS,
    },
    BlockDescriptor {
        name: "ButtonData",
        repetition: BlockRepetition::Variable,
        fields: PACKET_482_BLOCK_2_FIELDS,
    },
];
pub static PACKETS: &[PacketDescriptor] = &[
    PacketDescriptor {
        name: "TestMessage",
        packet_type: PacketType::TestMessage,
        id: 1,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_0_BLOCKS,
    },
    PacketDescriptor {
        name: "PacketAck",
        packet_type: PacketType::PacketAck,
        id: 65531,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_1_BLOCKS,
    },
    PacketDescriptor {
        name: "OpenCircuit",
        packet_type: PacketType::OpenCircuit,
        id: 65532,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &["UDPBlackListed"],
        blocks: PACKET_2_BLOCKS,
    },
    PacketDescriptor {
        name: "CloseCircuit",
        packet_type: PacketType::CloseCircuit,
        id: 65533,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_3_BLOCKS,
    },
    PacketDescriptor {
        name: "AddCircuitCode",
        packet_type: PacketType::AddCircuitCode,
        id: 2,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_4_BLOCKS,
    },
    PacketDescriptor {
        name: "UseCircuitCode",
        packet_type: PacketType::UseCircuitCode,
        id: 3,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_5_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarTextureUpdate",
        packet_type: PacketType::AvatarTextureUpdate,
        id: 4,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_6_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorMapUpdate",
        packet_type: PacketType::SimulatorMapUpdate,
        id: 5,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_7_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorSetMap",
        packet_type: PacketType::SimulatorSetMap,
        id: 6,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_8_BLOCKS,
    },
    PacketDescriptor {
        name: "SubscribeLoad",
        packet_type: PacketType::SubscribeLoad,
        id: 7,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_9_BLOCKS,
    },
    PacketDescriptor {
        name: "UnsubscribeLoad",
        packet_type: PacketType::UnsubscribeLoad,
        id: 8,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_10_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorReady",
        packet_type: PacketType::SimulatorReady,
        id: 9,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_11_BLOCKS,
    },
    PacketDescriptor {
        name: "TelehubInfo",
        packet_type: PacketType::TelehubInfo,
        id: 10,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_12_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorPresentAtLocation",
        packet_type: PacketType::SimulatorPresentAtLocation,
        id: 11,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_13_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorLoad",
        packet_type: PacketType::SimulatorLoad,
        id: 12,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_14_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorShutdownRequest",
        packet_type: PacketType::SimulatorShutdownRequest,
        id: 13,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_15_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionPresenceRequestByRegionID",
        packet_type: PacketType::RegionPresenceRequestByRegionID,
        id: 14,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_16_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionPresenceRequestByHandle",
        packet_type: PacketType::RegionPresenceRequestByHandle,
        id: 15,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_17_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionPresenceResponse",
        packet_type: PacketType::RegionPresenceResponse,
        id: 16,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_18_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateSimulator",
        packet_type: PacketType::UpdateSimulator,
        id: 17,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_19_BLOCKS,
    },
    PacketDescriptor {
        name: "LogDwellTime",
        packet_type: PacketType::LogDwellTime,
        id: 18,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_20_BLOCKS,
    },
    PacketDescriptor {
        name: "FeatureDisabled",
        packet_type: PacketType::FeatureDisabled,
        id: 19,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_21_BLOCKS,
    },
    PacketDescriptor {
        name: "LogFailedMoneyTransaction",
        packet_type: PacketType::LogFailedMoneyTransaction,
        id: 20,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_22_BLOCKS,
    },
    PacketDescriptor {
        name: "UserReportInternal",
        packet_type: PacketType::UserReportInternal,
        id: 21,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_23_BLOCKS,
    },
    PacketDescriptor {
        name: "SetSimStatusInDatabase",
        packet_type: PacketType::SetSimStatusInDatabase,
        id: 22,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_24_BLOCKS,
    },
    PacketDescriptor {
        name: "SetSimPresenceInDatabase",
        packet_type: PacketType::SetSimPresenceInDatabase,
        id: 23,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_25_BLOCKS,
    },
    PacketDescriptor {
        name: "EconomyDataRequest",
        packet_type: PacketType::EconomyDataRequest,
        id: 24,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_26_BLOCKS,
    },
    PacketDescriptor {
        name: "EconomyData",
        packet_type: PacketType::EconomyData,
        id: 25,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_27_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPickerRequest",
        packet_type: PacketType::AvatarPickerRequest,
        id: 26,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_28_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPickerRequestBackend",
        packet_type: PacketType::AvatarPickerRequestBackend,
        id: 27,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_29_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPickerReply",
        packet_type: PacketType::AvatarPickerReply,
        id: 28,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_30_BLOCKS,
    },
    PacketDescriptor {
        name: "PlacesQuery",
        packet_type: PacketType::PlacesQuery,
        id: 29,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_31_BLOCKS,
    },
    PacketDescriptor {
        name: "PlacesReply",
        packet_type: PacketType::PlacesReply,
        id: 30,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_32_BLOCKS,
    },
    PacketDescriptor {
        name: "DirFindQuery",
        packet_type: PacketType::DirFindQuery,
        id: 31,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_33_BLOCKS,
    },
    PacketDescriptor {
        name: "DirFindQueryBackend",
        packet_type: PacketType::DirFindQueryBackend,
        id: 32,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_34_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPlacesQuery",
        packet_type: PacketType::DirPlacesQuery,
        id: 33,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_35_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPlacesQueryBackend",
        packet_type: PacketType::DirPlacesQueryBackend,
        id: 34,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_36_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPlacesReply",
        packet_type: PacketType::DirPlacesReply,
        id: 35,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_37_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPeopleReply",
        packet_type: PacketType::DirPeopleReply,
        id: 36,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_38_BLOCKS,
    },
    PacketDescriptor {
        name: "DirEventsReply",
        packet_type: PacketType::DirEventsReply,
        id: 37,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_39_BLOCKS,
    },
    PacketDescriptor {
        name: "DirGroupsReply",
        packet_type: PacketType::DirGroupsReply,
        id: 38,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_40_BLOCKS,
    },
    PacketDescriptor {
        name: "DirClassifiedQuery",
        packet_type: PacketType::DirClassifiedQuery,
        id: 39,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_41_BLOCKS,
    },
    PacketDescriptor {
        name: "DirClassifiedQueryBackend",
        packet_type: PacketType::DirClassifiedQueryBackend,
        id: 40,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_42_BLOCKS,
    },
    PacketDescriptor {
        name: "DirClassifiedReply",
        packet_type: PacketType::DirClassifiedReply,
        id: 41,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_43_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarClassifiedReply",
        packet_type: PacketType::AvatarClassifiedReply,
        id: 42,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_44_BLOCKS,
    },
    PacketDescriptor {
        name: "ClassifiedInfoRequest",
        packet_type: PacketType::ClassifiedInfoRequest,
        id: 43,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_45_BLOCKS,
    },
    PacketDescriptor {
        name: "ClassifiedInfoReply",
        packet_type: PacketType::ClassifiedInfoReply,
        id: 44,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_46_BLOCKS,
    },
    PacketDescriptor {
        name: "ClassifiedInfoUpdate",
        packet_type: PacketType::ClassifiedInfoUpdate,
        id: 45,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_47_BLOCKS,
    },
    PacketDescriptor {
        name: "ClassifiedDelete",
        packet_type: PacketType::ClassifiedDelete,
        id: 46,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_48_BLOCKS,
    },
    PacketDescriptor {
        name: "ClassifiedGodDelete",
        packet_type: PacketType::ClassifiedGodDelete,
        id: 47,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_49_BLOCKS,
    },
    PacketDescriptor {
        name: "DirLandQuery",
        packet_type: PacketType::DirLandQuery,
        id: 48,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_50_BLOCKS,
    },
    PacketDescriptor {
        name: "DirLandQueryBackend",
        packet_type: PacketType::DirLandQueryBackend,
        id: 49,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_51_BLOCKS,
    },
    PacketDescriptor {
        name: "DirLandReply",
        packet_type: PacketType::DirLandReply,
        id: 50,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_52_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPopularQuery",
        packet_type: PacketType::DirPopularQuery,
        id: 51,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &["Deprecated"],
        blocks: PACKET_53_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPopularQueryBackend",
        packet_type: PacketType::DirPopularQueryBackend,
        id: 52,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["Deprecated"],
        blocks: PACKET_54_BLOCKS,
    },
    PacketDescriptor {
        name: "DirPopularReply",
        packet_type: PacketType::DirPopularReply,
        id: 53,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["Deprecated"],
        blocks: PACKET_55_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelInfoRequest",
        packet_type: PacketType::ParcelInfoRequest,
        id: 54,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_56_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelInfoReply",
        packet_type: PacketType::ParcelInfoReply,
        id: 55,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_57_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelObjectOwnersRequest",
        packet_type: PacketType::ParcelObjectOwnersRequest,
        id: 56,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_58_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelObjectOwnersReply",
        packet_type: PacketType::ParcelObjectOwnersReply,
        id: 57,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_59_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupNoticesListRequest",
        packet_type: PacketType::GroupNoticesListRequest,
        id: 58,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_60_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupNoticesListReply",
        packet_type: PacketType::GroupNoticesListReply,
        id: 59,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_61_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupNoticeRequest",
        packet_type: PacketType::GroupNoticeRequest,
        id: 60,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_62_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupNoticeAdd",
        packet_type: PacketType::GroupNoticeAdd,
        id: 61,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_63_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportRequest",
        packet_type: PacketType::TeleportRequest,
        id: 62,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_64_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportLocationRequest",
        packet_type: PacketType::TeleportLocationRequest,
        id: 63,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_65_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportLocal",
        packet_type: PacketType::TeleportLocal,
        id: 64,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_66_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportLandmarkRequest",
        packet_type: PacketType::TeleportLandmarkRequest,
        id: 65,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_67_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportProgress",
        packet_type: PacketType::TeleportProgress,
        id: 66,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_68_BLOCKS,
    },
    PacketDescriptor {
        name: "DataHomeLocationRequest",
        packet_type: PacketType::DataHomeLocationRequest,
        id: 67,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_69_BLOCKS,
    },
    PacketDescriptor {
        name: "DataHomeLocationReply",
        packet_type: PacketType::DataHomeLocationReply,
        id: 68,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_70_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportFinish",
        packet_type: PacketType::TeleportFinish,
        id: 69,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &["UDPBlackListed"],
        blocks: PACKET_71_BLOCKS,
    },
    PacketDescriptor {
        name: "StartLure",
        packet_type: PacketType::StartLure,
        id: 70,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_72_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportLureRequest",
        packet_type: PacketType::TeleportLureRequest,
        id: 71,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_73_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportCancel",
        packet_type: PacketType::TeleportCancel,
        id: 72,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_74_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportStart",
        packet_type: PacketType::TeleportStart,
        id: 73,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_75_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportFailed",
        packet_type: PacketType::TeleportFailed,
        id: 74,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_76_BLOCKS,
    },
    PacketDescriptor {
        name: "Undo",
        packet_type: PacketType::Undo,
        id: 75,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_77_BLOCKS,
    },
    PacketDescriptor {
        name: "Redo",
        packet_type: PacketType::Redo,
        id: 76,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_78_BLOCKS,
    },
    PacketDescriptor {
        name: "UndoLand",
        packet_type: PacketType::UndoLand,
        id: 77,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_79_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentPause",
        packet_type: PacketType::AgentPause,
        id: 78,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_80_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentResume",
        packet_type: PacketType::AgentResume,
        id: 79,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_81_BLOCKS,
    },
    PacketDescriptor {
        name: "ChatFromViewer",
        packet_type: PacketType::ChatFromViewer,
        id: 80,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_82_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentThrottle",
        packet_type: PacketType::AgentThrottle,
        id: 81,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_83_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentFOV",
        packet_type: PacketType::AgentFOV,
        id: 82,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_84_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentHeightWidth",
        packet_type: PacketType::AgentHeightWidth,
        id: 83,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_85_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentSetAppearance",
        packet_type: PacketType::AgentSetAppearance,
        id: 84,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_86_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentQuitCopy",
        packet_type: PacketType::AgentQuitCopy,
        id: 85,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_87_BLOCKS,
    },
    PacketDescriptor {
        name: "ImageNotInDatabase",
        packet_type: PacketType::ImageNotInDatabase,
        id: 86,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_88_BLOCKS,
    },
    PacketDescriptor {
        name: "RebakeAvatarTextures",
        packet_type: PacketType::RebakeAvatarTextures,
        id: 87,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_89_BLOCKS,
    },
    PacketDescriptor {
        name: "SetAlwaysRun",
        packet_type: PacketType::SetAlwaysRun,
        id: 88,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_90_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDelete",
        packet_type: PacketType::ObjectDelete,
        id: 89,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_91_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDuplicate",
        packet_type: PacketType::ObjectDuplicate,
        id: 90,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_92_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDuplicateOnRay",
        packet_type: PacketType::ObjectDuplicateOnRay,
        id: 91,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_93_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectScale",
        packet_type: PacketType::ObjectScale,
        id: 92,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &["Deprecated"],
        blocks: PACKET_94_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectRotation",
        packet_type: PacketType::ObjectRotation,
        id: 93,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_95_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectFlagUpdate",
        packet_type: PacketType::ObjectFlagUpdate,
        id: 94,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_96_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectClickAction",
        packet_type: PacketType::ObjectClickAction,
        id: 95,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_97_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectImage",
        packet_type: PacketType::ObjectImage,
        id: 96,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_98_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectBypassModUpdate",
        packet_type: PacketType::ObjectBypassModUpdate,
        id: 431,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_99_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectMaterial",
        packet_type: PacketType::ObjectMaterial,
        id: 97,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_100_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectShape",
        packet_type: PacketType::ObjectShape,
        id: 98,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_101_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectExtraParams",
        packet_type: PacketType::ObjectExtraParams,
        id: 99,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_102_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectOwner",
        packet_type: PacketType::ObjectOwner,
        id: 100,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_103_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectGroup",
        packet_type: PacketType::ObjectGroup,
        id: 101,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_104_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectBuy",
        packet_type: PacketType::ObjectBuy,
        id: 102,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_105_BLOCKS,
    },
    PacketDescriptor {
        name: "BuyObjectInventory",
        packet_type: PacketType::BuyObjectInventory,
        id: 103,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_106_BLOCKS,
    },
    PacketDescriptor {
        name: "DerezContainer",
        packet_type: PacketType::DerezContainer,
        id: 104,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_107_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectPermissions",
        packet_type: PacketType::ObjectPermissions,
        id: 105,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_108_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectSaleInfo",
        packet_type: PacketType::ObjectSaleInfo,
        id: 106,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_109_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectName",
        packet_type: PacketType::ObjectName,
        id: 107,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_110_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDescription",
        packet_type: PacketType::ObjectDescription,
        id: 108,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_111_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectCategory",
        packet_type: PacketType::ObjectCategory,
        id: 109,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_112_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectSelect",
        packet_type: PacketType::ObjectSelect,
        id: 110,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_113_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDeselect",
        packet_type: PacketType::ObjectDeselect,
        id: 111,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_114_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectAttach",
        packet_type: PacketType::ObjectAttach,
        id: 112,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_115_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDetach",
        packet_type: PacketType::ObjectDetach,
        id: 113,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_116_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDrop",
        packet_type: PacketType::ObjectDrop,
        id: 114,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_117_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectLink",
        packet_type: PacketType::ObjectLink,
        id: 115,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_118_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDelink",
        packet_type: PacketType::ObjectDelink,
        id: 116,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_119_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectGrab",
        packet_type: PacketType::ObjectGrab,
        id: 117,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_120_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectGrabUpdate",
        packet_type: PacketType::ObjectGrabUpdate,
        id: 118,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_121_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectDeGrab",
        packet_type: PacketType::ObjectDeGrab,
        id: 119,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_122_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectSpinStart",
        packet_type: PacketType::ObjectSpinStart,
        id: 120,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_123_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectSpinUpdate",
        packet_type: PacketType::ObjectSpinUpdate,
        id: 121,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_124_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectSpinStop",
        packet_type: PacketType::ObjectSpinStop,
        id: 122,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_125_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectExportSelected",
        packet_type: PacketType::ObjectExportSelected,
        id: 123,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_126_BLOCKS,
    },
    PacketDescriptor {
        name: "ModifyLand",
        packet_type: PacketType::ModifyLand,
        id: 124,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_127_BLOCKS,
    },
    PacketDescriptor {
        name: "VelocityInterpolateOn",
        packet_type: PacketType::VelocityInterpolateOn,
        id: 125,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_128_BLOCKS,
    },
    PacketDescriptor {
        name: "VelocityInterpolateOff",
        packet_type: PacketType::VelocityInterpolateOff,
        id: 126,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_129_BLOCKS,
    },
    PacketDescriptor {
        name: "StateSave",
        packet_type: PacketType::StateSave,
        id: 127,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_130_BLOCKS,
    },
    PacketDescriptor {
        name: "ReportAutosaveCrash",
        packet_type: PacketType::ReportAutosaveCrash,
        id: 128,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_131_BLOCKS,
    },
    PacketDescriptor {
        name: "SimWideDeletes",
        packet_type: PacketType::SimWideDeletes,
        id: 129,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_132_BLOCKS,
    },
    PacketDescriptor {
        name: "TrackAgent",
        packet_type: PacketType::TrackAgent,
        id: 130,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_133_BLOCKS,
    },
    PacketDescriptor {
        name: "ViewerStats",
        packet_type: PacketType::ViewerStats,
        id: 131,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_134_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptAnswerYes",
        packet_type: PacketType::ScriptAnswerYes,
        id: 132,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_135_BLOCKS,
    },
    PacketDescriptor {
        name: "UserReport",
        packet_type: PacketType::UserReport,
        id: 133,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_136_BLOCKS,
    },
    PacketDescriptor {
        name: "AlertMessage",
        packet_type: PacketType::AlertMessage,
        id: 134,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_137_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentAlertMessage",
        packet_type: PacketType::AgentAlertMessage,
        id: 135,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_138_BLOCKS,
    },
    PacketDescriptor {
        name: "MeanCollisionAlert",
        packet_type: PacketType::MeanCollisionAlert,
        id: 136,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_139_BLOCKS,
    },
    PacketDescriptor {
        name: "ViewerFrozenMessage",
        packet_type: PacketType::ViewerFrozenMessage,
        id: 137,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_140_BLOCKS,
    },
    PacketDescriptor {
        name: "HealthMessage",
        packet_type: PacketType::HealthMessage,
        id: 138,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_141_BLOCKS,
    },
    PacketDescriptor {
        name: "ChatFromSimulator",
        packet_type: PacketType::ChatFromSimulator,
        id: 139,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_142_BLOCKS,
    },
    PacketDescriptor {
        name: "SimStats",
        packet_type: PacketType::SimStats,
        id: 140,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_143_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestRegionInfo",
        packet_type: PacketType::RequestRegionInfo,
        id: 141,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_144_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionInfo",
        packet_type: PacketType::RegionInfo,
        id: 142,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_145_BLOCKS,
    },
    PacketDescriptor {
        name: "GodUpdateRegionInfo",
        packet_type: PacketType::GodUpdateRegionInfo,
        id: 143,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_146_BLOCKS,
    },
    PacketDescriptor {
        name: "NearestLandingRegionRequest",
        packet_type: PacketType::NearestLandingRegionRequest,
        id: 144,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_147_BLOCKS,
    },
    PacketDescriptor {
        name: "NearestLandingRegionReply",
        packet_type: PacketType::NearestLandingRegionReply,
        id: 145,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_148_BLOCKS,
    },
    PacketDescriptor {
        name: "NearestLandingRegionUpdated",
        packet_type: PacketType::NearestLandingRegionUpdated,
        id: 146,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_149_BLOCKS,
    },
    PacketDescriptor {
        name: "TeleportLandingStatusChanged",
        packet_type: PacketType::TeleportLandingStatusChanged,
        id: 147,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_150_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionHandshake",
        packet_type: PacketType::RegionHandshake,
        id: 148,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_151_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionHandshakeReply",
        packet_type: PacketType::RegionHandshakeReply,
        id: 149,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_152_BLOCKS,
    },
    PacketDescriptor {
        name: "SimulatorViewerTimeMessage",
        packet_type: PacketType::SimulatorViewerTimeMessage,
        id: 150,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_153_BLOCKS,
    },
    PacketDescriptor {
        name: "EnableSimulator",
        packet_type: PacketType::EnableSimulator,
        id: 151,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &["UDPBlackListed"],
        blocks: PACKET_154_BLOCKS,
    },
    PacketDescriptor {
        name: "DisableSimulator",
        packet_type: PacketType::DisableSimulator,
        id: 152,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_155_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferRequest",
        packet_type: PacketType::TransferRequest,
        id: 153,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_156_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferInfo",
        packet_type: PacketType::TransferInfo,
        id: 154,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_157_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferAbort",
        packet_type: PacketType::TransferAbort,
        id: 155,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_158_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestXfer",
        packet_type: PacketType::RequestXfer,
        id: 156,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_159_BLOCKS,
    },
    PacketDescriptor {
        name: "AbortXfer",
        packet_type: PacketType::AbortXfer,
        id: 157,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_160_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarAppearance",
        packet_type: PacketType::AvatarAppearance,
        id: 158,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_161_BLOCKS,
    },
    PacketDescriptor {
        name: "SetFollowCamProperties",
        packet_type: PacketType::SetFollowCamProperties,
        id: 159,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_162_BLOCKS,
    },
    PacketDescriptor {
        name: "ClearFollowCamProperties",
        packet_type: PacketType::ClearFollowCamProperties,
        id: 160,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_163_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestPayPrice",
        packet_type: PacketType::RequestPayPrice,
        id: 161,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_164_BLOCKS,
    },
    PacketDescriptor {
        name: "PayPriceReply",
        packet_type: PacketType::PayPriceReply,
        id: 162,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_165_BLOCKS,
    },
    PacketDescriptor {
        name: "KickUser",
        packet_type: PacketType::KickUser,
        id: 163,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_166_BLOCKS,
    },
    PacketDescriptor {
        name: "KickUserAck",
        packet_type: PacketType::KickUserAck,
        id: 164,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_167_BLOCKS,
    },
    PacketDescriptor {
        name: "GodKickUser",
        packet_type: PacketType::GodKickUser,
        id: 165,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_168_BLOCKS,
    },
    PacketDescriptor {
        name: "SystemKickUser",
        packet_type: PacketType::SystemKickUser,
        id: 166,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_169_BLOCKS,
    },
    PacketDescriptor {
        name: "EjectUser",
        packet_type: PacketType::EjectUser,
        id: 167,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_170_BLOCKS,
    },
    PacketDescriptor {
        name: "FreezeUser",
        packet_type: PacketType::FreezeUser,
        id: 168,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_171_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPropertiesRequest",
        packet_type: PacketType::AvatarPropertiesRequest,
        id: 169,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_172_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPropertiesRequestBackend",
        packet_type: PacketType::AvatarPropertiesRequestBackend,
        id: 170,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_173_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPropertiesReply",
        packet_type: PacketType::AvatarPropertiesReply,
        id: 171,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_174_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarInterestsReply",
        packet_type: PacketType::AvatarInterestsReply,
        id: 172,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_175_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarGroupsReply",
        packet_type: PacketType::AvatarGroupsReply,
        id: 173,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_176_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPropertiesUpdate",
        packet_type: PacketType::AvatarPropertiesUpdate,
        id: 174,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_177_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarInterestsUpdate",
        packet_type: PacketType::AvatarInterestsUpdate,
        id: 175,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_178_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarNotesReply",
        packet_type: PacketType::AvatarNotesReply,
        id: 176,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_179_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarNotesUpdate",
        packet_type: PacketType::AvatarNotesUpdate,
        id: 177,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_180_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarPicksReply",
        packet_type: PacketType::AvatarPicksReply,
        id: 178,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_181_BLOCKS,
    },
    PacketDescriptor {
        name: "EventInfoRequest",
        packet_type: PacketType::EventInfoRequest,
        id: 179,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_182_BLOCKS,
    },
    PacketDescriptor {
        name: "EventInfoReply",
        packet_type: PacketType::EventInfoReply,
        id: 180,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_183_BLOCKS,
    },
    PacketDescriptor {
        name: "EventNotificationAddRequest",
        packet_type: PacketType::EventNotificationAddRequest,
        id: 181,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_184_BLOCKS,
    },
    PacketDescriptor {
        name: "EventNotificationRemoveRequest",
        packet_type: PacketType::EventNotificationRemoveRequest,
        id: 182,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_185_BLOCKS,
    },
    PacketDescriptor {
        name: "EventGodDelete",
        packet_type: PacketType::EventGodDelete,
        id: 183,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_186_BLOCKS,
    },
    PacketDescriptor {
        name: "PickInfoReply",
        packet_type: PacketType::PickInfoReply,
        id: 184,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_187_BLOCKS,
    },
    PacketDescriptor {
        name: "PickInfoUpdate",
        packet_type: PacketType::PickInfoUpdate,
        id: 185,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_188_BLOCKS,
    },
    PacketDescriptor {
        name: "PickDelete",
        packet_type: PacketType::PickDelete,
        id: 186,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_189_BLOCKS,
    },
    PacketDescriptor {
        name: "PickGodDelete",
        packet_type: PacketType::PickGodDelete,
        id: 187,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_190_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptQuestion",
        packet_type: PacketType::ScriptQuestion,
        id: 188,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_191_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptControlChange",
        packet_type: PacketType::ScriptControlChange,
        id: 189,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_192_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptDialog",
        packet_type: PacketType::ScriptDialog,
        id: 190,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_193_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptDialogReply",
        packet_type: PacketType::ScriptDialogReply,
        id: 191,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_194_BLOCKS,
    },
    PacketDescriptor {
        name: "ForceScriptControlRelease",
        packet_type: PacketType::ForceScriptControlRelease,
        id: 192,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_195_BLOCKS,
    },
    PacketDescriptor {
        name: "RevokePermissions",
        packet_type: PacketType::RevokePermissions,
        id: 193,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_196_BLOCKS,
    },
    PacketDescriptor {
        name: "LoadURL",
        packet_type: PacketType::LoadURL,
        id: 194,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_197_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptTeleportRequest",
        packet_type: PacketType::ScriptTeleportRequest,
        id: 195,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_198_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelOverlay",
        packet_type: PacketType::ParcelOverlay,
        id: 196,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_199_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelPropertiesRequestByID",
        packet_type: PacketType::ParcelPropertiesRequestByID,
        id: 197,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_200_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelPropertiesUpdate",
        packet_type: PacketType::ParcelPropertiesUpdate,
        id: 198,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_201_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelReturnObjects",
        packet_type: PacketType::ParcelReturnObjects,
        id: 199,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_202_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelSetOtherCleanTime",
        packet_type: PacketType::ParcelSetOtherCleanTime,
        id: 200,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_203_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelDisableObjects",
        packet_type: PacketType::ParcelDisableObjects,
        id: 201,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_204_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelSelectObjects",
        packet_type: PacketType::ParcelSelectObjects,
        id: 202,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_205_BLOCKS,
    },
    PacketDescriptor {
        name: "EstateCovenantRequest",
        packet_type: PacketType::EstateCovenantRequest,
        id: 203,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_206_BLOCKS,
    },
    PacketDescriptor {
        name: "EstateCovenantReply",
        packet_type: PacketType::EstateCovenantReply,
        id: 204,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_207_BLOCKS,
    },
    PacketDescriptor {
        name: "ForceObjectSelect",
        packet_type: PacketType::ForceObjectSelect,
        id: 205,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_208_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelBuyPass",
        packet_type: PacketType::ParcelBuyPass,
        id: 206,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_209_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelDeedToGroup",
        packet_type: PacketType::ParcelDeedToGroup,
        id: 207,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_210_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelReclaim",
        packet_type: PacketType::ParcelReclaim,
        id: 208,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_211_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelClaim",
        packet_type: PacketType::ParcelClaim,
        id: 209,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_212_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelJoin",
        packet_type: PacketType::ParcelJoin,
        id: 210,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_213_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelDivide",
        packet_type: PacketType::ParcelDivide,
        id: 211,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_214_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelRelease",
        packet_type: PacketType::ParcelRelease,
        id: 212,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_215_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelBuy",
        packet_type: PacketType::ParcelBuy,
        id: 213,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_216_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelGodForceOwner",
        packet_type: PacketType::ParcelGodForceOwner,
        id: 214,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_217_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelAccessListRequest",
        packet_type: PacketType::ParcelAccessListRequest,
        id: 215,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_218_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelAccessListReply",
        packet_type: PacketType::ParcelAccessListReply,
        id: 216,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_219_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelAccessListUpdate",
        packet_type: PacketType::ParcelAccessListUpdate,
        id: 217,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_220_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelDwellRequest",
        packet_type: PacketType::ParcelDwellRequest,
        id: 218,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_221_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelDwellReply",
        packet_type: PacketType::ParcelDwellReply,
        id: 219,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_222_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestParcelTransfer",
        packet_type: PacketType::RequestParcelTransfer,
        id: 220,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_223_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateParcel",
        packet_type: PacketType::UpdateParcel,
        id: 221,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_224_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveParcel",
        packet_type: PacketType::RemoveParcel,
        id: 222,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_225_BLOCKS,
    },
    PacketDescriptor {
        name: "MergeParcel",
        packet_type: PacketType::MergeParcel,
        id: 223,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_226_BLOCKS,
    },
    PacketDescriptor {
        name: "LogParcelChanges",
        packet_type: PacketType::LogParcelChanges,
        id: 224,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_227_BLOCKS,
    },
    PacketDescriptor {
        name: "CheckParcelSales",
        packet_type: PacketType::CheckParcelSales,
        id: 225,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_228_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelSales",
        packet_type: PacketType::ParcelSales,
        id: 226,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_229_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelGodMarkAsContent",
        packet_type: PacketType::ParcelGodMarkAsContent,
        id: 227,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_230_BLOCKS,
    },
    PacketDescriptor {
        name: "ViewerStartAuction",
        packet_type: PacketType::ViewerStartAuction,
        id: 228,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_231_BLOCKS,
    },
    PacketDescriptor {
        name: "StartAuction",
        packet_type: PacketType::StartAuction,
        id: 229,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_232_BLOCKS,
    },
    PacketDescriptor {
        name: "ConfirmAuctionStart",
        packet_type: PacketType::ConfirmAuctionStart,
        id: 230,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_233_BLOCKS,
    },
    PacketDescriptor {
        name: "CompleteAuction",
        packet_type: PacketType::CompleteAuction,
        id: 231,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_234_BLOCKS,
    },
    PacketDescriptor {
        name: "CancelAuction",
        packet_type: PacketType::CancelAuction,
        id: 232,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_235_BLOCKS,
    },
    PacketDescriptor {
        name: "CheckParcelAuctions",
        packet_type: PacketType::CheckParcelAuctions,
        id: 233,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_236_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelAuctions",
        packet_type: PacketType::ParcelAuctions,
        id: 234,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_237_BLOCKS,
    },
    PacketDescriptor {
        name: "UUIDNameRequest",
        packet_type: PacketType::UUIDNameRequest,
        id: 235,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_238_BLOCKS,
    },
    PacketDescriptor {
        name: "UUIDNameReply",
        packet_type: PacketType::UUIDNameReply,
        id: 236,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_239_BLOCKS,
    },
    PacketDescriptor {
        name: "UUIDGroupNameRequest",
        packet_type: PacketType::UUIDGroupNameRequest,
        id: 237,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_240_BLOCKS,
    },
    PacketDescriptor {
        name: "UUIDGroupNameReply",
        packet_type: PacketType::UUIDGroupNameReply,
        id: 238,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_241_BLOCKS,
    },
    PacketDescriptor {
        name: "ChatPass",
        packet_type: PacketType::ChatPass,
        id: 239,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_242_BLOCKS,
    },
    PacketDescriptor {
        name: "ChildAgentDying",
        packet_type: PacketType::ChildAgentDying,
        id: 240,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_243_BLOCKS,
    },
    PacketDescriptor {
        name: "ChildAgentUnknown",
        packet_type: PacketType::ChildAgentUnknown,
        id: 241,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_244_BLOCKS,
    },
    PacketDescriptor {
        name: "KillChildAgents",
        packet_type: PacketType::KillChildAgents,
        id: 242,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_245_BLOCKS,
    },
    PacketDescriptor {
        name: "GetScriptRunning",
        packet_type: PacketType::GetScriptRunning,
        id: 243,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_246_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptRunningReply",
        packet_type: PacketType::ScriptRunningReply,
        id: 244,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_247_BLOCKS,
    },
    PacketDescriptor {
        name: "SetScriptRunning",
        packet_type: PacketType::SetScriptRunning,
        id: 245,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_248_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptReset",
        packet_type: PacketType::ScriptReset,
        id: 246,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_249_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptSensorRequest",
        packet_type: PacketType::ScriptSensorRequest,
        id: 247,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_250_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptSensorReply",
        packet_type: PacketType::ScriptSensorReply,
        id: 248,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_251_BLOCKS,
    },
    PacketDescriptor {
        name: "CompleteAgentMovement",
        packet_type: PacketType::CompleteAgentMovement,
        id: 249,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_252_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentMovementComplete",
        packet_type: PacketType::AgentMovementComplete,
        id: 250,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_253_BLOCKS,
    },
    PacketDescriptor {
        name: "DataServerLogout",
        packet_type: PacketType::DataServerLogout,
        id: 251,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_254_BLOCKS,
    },
    PacketDescriptor {
        name: "LogoutRequest",
        packet_type: PacketType::LogoutRequest,
        id: 252,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_255_BLOCKS,
    },
    PacketDescriptor {
        name: "LogoutReply",
        packet_type: PacketType::LogoutReply,
        id: 253,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_256_BLOCKS,
    },
    PacketDescriptor {
        name: "ImprovedInstantMessage",
        packet_type: PacketType::ImprovedInstantMessage,
        id: 254,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_257_BLOCKS,
    },
    PacketDescriptor {
        name: "RetrieveInstantMessages",
        packet_type: PacketType::RetrieveInstantMessages,
        id: 255,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_258_BLOCKS,
    },
    PacketDescriptor {
        name: "FindAgent",
        packet_type: PacketType::FindAgent,
        id: 256,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_259_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestGodlikePowers",
        packet_type: PacketType::RequestGodlikePowers,
        id: 257,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_260_BLOCKS,
    },
    PacketDescriptor {
        name: "GrantGodlikePowers",
        packet_type: PacketType::GrantGodlikePowers,
        id: 258,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_261_BLOCKS,
    },
    PacketDescriptor {
        name: "GodlikeMessage",
        packet_type: PacketType::GodlikeMessage,
        id: 259,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_262_BLOCKS,
    },
    PacketDescriptor {
        name: "EstateOwnerMessage",
        packet_type: PacketType::EstateOwnerMessage,
        id: 260,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_263_BLOCKS,
    },
    PacketDescriptor {
        name: "GenericMessage",
        packet_type: PacketType::GenericMessage,
        id: 261,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_264_BLOCKS,
    },
    PacketDescriptor {
        name: "LargeGenericMessage",
        packet_type: PacketType::LargeGenericMessage,
        id: 430,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_265_BLOCKS,
    },
    PacketDescriptor {
        name: "MuteListRequest",
        packet_type: PacketType::MuteListRequest,
        id: 262,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_266_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateMuteListEntry",
        packet_type: PacketType::UpdateMuteListEntry,
        id: 263,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_267_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveMuteListEntry",
        packet_type: PacketType::RemoveMuteListEntry,
        id: 264,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_268_BLOCKS,
    },
    PacketDescriptor {
        name: "CopyInventoryFromNotecard",
        packet_type: PacketType::CopyInventoryFromNotecard,
        id: 265,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_269_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateInventoryItem",
        packet_type: PacketType::UpdateInventoryItem,
        id: 266,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_270_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateCreateInventoryItem",
        packet_type: PacketType::UpdateCreateInventoryItem,
        id: 267,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_271_BLOCKS,
    },
    PacketDescriptor {
        name: "MoveInventoryItem",
        packet_type: PacketType::MoveInventoryItem,
        id: 268,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_272_BLOCKS,
    },
    PacketDescriptor {
        name: "CopyInventoryItem",
        packet_type: PacketType::CopyInventoryItem,
        id: 269,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_273_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveInventoryItem",
        packet_type: PacketType::RemoveInventoryItem,
        id: 270,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_274_BLOCKS,
    },
    PacketDescriptor {
        name: "ChangeInventoryItemFlags",
        packet_type: PacketType::ChangeInventoryItemFlags,
        id: 271,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_275_BLOCKS,
    },
    PacketDescriptor {
        name: "SaveAssetIntoInventory",
        packet_type: PacketType::SaveAssetIntoInventory,
        id: 272,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_276_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateInventoryFolder",
        packet_type: PacketType::CreateInventoryFolder,
        id: 273,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_277_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateInventoryFolder",
        packet_type: PacketType::UpdateInventoryFolder,
        id: 274,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_278_BLOCKS,
    },
    PacketDescriptor {
        name: "MoveInventoryFolder",
        packet_type: PacketType::MoveInventoryFolder,
        id: 275,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_279_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveInventoryFolder",
        packet_type: PacketType::RemoveInventoryFolder,
        id: 276,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_280_BLOCKS,
    },
    PacketDescriptor {
        name: "FetchInventoryDescendents",
        packet_type: PacketType::FetchInventoryDescendents,
        id: 277,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_281_BLOCKS,
    },
    PacketDescriptor {
        name: "InventoryDescendents",
        packet_type: PacketType::InventoryDescendents,
        id: 278,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_282_BLOCKS,
    },
    PacketDescriptor {
        name: "FetchInventory",
        packet_type: PacketType::FetchInventory,
        id: 279,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_283_BLOCKS,
    },
    PacketDescriptor {
        name: "FetchInventoryReply",
        packet_type: PacketType::FetchInventoryReply,
        id: 280,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_284_BLOCKS,
    },
    PacketDescriptor {
        name: "BulkUpdateInventory",
        packet_type: PacketType::BulkUpdateInventory,
        id: 281,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_285_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestInventoryAsset",
        packet_type: PacketType::RequestInventoryAsset,
        id: 282,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_286_BLOCKS,
    },
    PacketDescriptor {
        name: "InventoryAssetResponse",
        packet_type: PacketType::InventoryAssetResponse,
        id: 283,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_287_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveInventoryObjects",
        packet_type: PacketType::RemoveInventoryObjects,
        id: 284,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_288_BLOCKS,
    },
    PacketDescriptor {
        name: "PurgeInventoryDescendents",
        packet_type: PacketType::PurgeInventoryDescendents,
        id: 285,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_289_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateTaskInventory",
        packet_type: PacketType::UpdateTaskInventory,
        id: 286,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_290_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveTaskInventory",
        packet_type: PacketType::RemoveTaskInventory,
        id: 287,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_291_BLOCKS,
    },
    PacketDescriptor {
        name: "MoveTaskInventory",
        packet_type: PacketType::MoveTaskInventory,
        id: 288,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_292_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestTaskInventory",
        packet_type: PacketType::RequestTaskInventory,
        id: 289,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_293_BLOCKS,
    },
    PacketDescriptor {
        name: "ReplyTaskInventory",
        packet_type: PacketType::ReplyTaskInventory,
        id: 290,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_294_BLOCKS,
    },
    PacketDescriptor {
        name: "DeRezObject",
        packet_type: PacketType::DeRezObject,
        id: 291,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_295_BLOCKS,
    },
    PacketDescriptor {
        name: "DeRezAck",
        packet_type: PacketType::DeRezAck,
        id: 292,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_296_BLOCKS,
    },
    PacketDescriptor {
        name: "RezObject",
        packet_type: PacketType::RezObject,
        id: 293,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_297_BLOCKS,
    },
    PacketDescriptor {
        name: "RezObjectFromNotecard",
        packet_type: PacketType::RezObjectFromNotecard,
        id: 294,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_298_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferInventory",
        packet_type: PacketType::TransferInventory,
        id: 295,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_299_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferInventoryAck",
        packet_type: PacketType::TransferInventoryAck,
        id: 296,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_300_BLOCKS,
    },
    PacketDescriptor {
        name: "AcceptFriendship",
        packet_type: PacketType::AcceptFriendship,
        id: 297,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_301_BLOCKS,
    },
    PacketDescriptor {
        name: "DeclineFriendship",
        packet_type: PacketType::DeclineFriendship,
        id: 298,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_302_BLOCKS,
    },
    PacketDescriptor {
        name: "FormFriendship",
        packet_type: PacketType::FormFriendship,
        id: 299,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_303_BLOCKS,
    },
    PacketDescriptor {
        name: "TerminateFriendship",
        packet_type: PacketType::TerminateFriendship,
        id: 300,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_304_BLOCKS,
    },
    PacketDescriptor {
        name: "OfferCallingCard",
        packet_type: PacketType::OfferCallingCard,
        id: 301,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_305_BLOCKS,
    },
    PacketDescriptor {
        name: "AcceptCallingCard",
        packet_type: PacketType::AcceptCallingCard,
        id: 302,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_306_BLOCKS,
    },
    PacketDescriptor {
        name: "DeclineCallingCard",
        packet_type: PacketType::DeclineCallingCard,
        id: 303,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_307_BLOCKS,
    },
    PacketDescriptor {
        name: "RezScript",
        packet_type: PacketType::RezScript,
        id: 304,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_308_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateInventoryItem",
        packet_type: PacketType::CreateInventoryItem,
        id: 305,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_309_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateLandmarkForEvent",
        packet_type: PacketType::CreateLandmarkForEvent,
        id: 306,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_310_BLOCKS,
    },
    PacketDescriptor {
        name: "EventLocationRequest",
        packet_type: PacketType::EventLocationRequest,
        id: 307,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_311_BLOCKS,
    },
    PacketDescriptor {
        name: "EventLocationReply",
        packet_type: PacketType::EventLocationReply,
        id: 308,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_312_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionHandleRequest",
        packet_type: PacketType::RegionHandleRequest,
        id: 309,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_313_BLOCKS,
    },
    PacketDescriptor {
        name: "RegionIDAndHandleReply",
        packet_type: PacketType::RegionIDAndHandleReply,
        id: 310,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_314_BLOCKS,
    },
    PacketDescriptor {
        name: "MoneyTransferRequest",
        packet_type: PacketType::MoneyTransferRequest,
        id: 311,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_315_BLOCKS,
    },
    PacketDescriptor {
        name: "MoneyTransferBackend",
        packet_type: PacketType::MoneyTransferBackend,
        id: 312,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_316_BLOCKS,
    },
    PacketDescriptor {
        name: "MoneyBalanceRequest",
        packet_type: PacketType::MoneyBalanceRequest,
        id: 313,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_317_BLOCKS,
    },
    PacketDescriptor {
        name: "MoneyBalanceReply",
        packet_type: PacketType::MoneyBalanceReply,
        id: 314,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_318_BLOCKS,
    },
    PacketDescriptor {
        name: "RoutedMoneyBalanceReply",
        packet_type: PacketType::RoutedMoneyBalanceReply,
        id: 315,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_319_BLOCKS,
    },
    PacketDescriptor {
        name: "ActivateGestures",
        packet_type: PacketType::ActivateGestures,
        id: 316,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_320_BLOCKS,
    },
    PacketDescriptor {
        name: "DeactivateGestures",
        packet_type: PacketType::DeactivateGestures,
        id: 317,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_321_BLOCKS,
    },
    PacketDescriptor {
        name: "MuteListUpdate",
        packet_type: PacketType::MuteListUpdate,
        id: 318,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_322_BLOCKS,
    },
    PacketDescriptor {
        name: "UseCachedMuteList",
        packet_type: PacketType::UseCachedMuteList,
        id: 319,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_323_BLOCKS,
    },
    PacketDescriptor {
        name: "GrantUserRights",
        packet_type: PacketType::GrantUserRights,
        id: 320,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_324_BLOCKS,
    },
    PacketDescriptor {
        name: "ChangeUserRights",
        packet_type: PacketType::ChangeUserRights,
        id: 321,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_325_BLOCKS,
    },
    PacketDescriptor {
        name: "OnlineNotification",
        packet_type: PacketType::OnlineNotification,
        id: 322,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_326_BLOCKS,
    },
    PacketDescriptor {
        name: "OfflineNotification",
        packet_type: PacketType::OfflineNotification,
        id: 323,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_327_BLOCKS,
    },
    PacketDescriptor {
        name: "SetStartLocationRequest",
        packet_type: PacketType::SetStartLocationRequest,
        id: 324,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_328_BLOCKS,
    },
    PacketDescriptor {
        name: "SetStartLocation",
        packet_type: PacketType::SetStartLocation,
        id: 325,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_329_BLOCKS,
    },
    PacketDescriptor {
        name: "NetTest",
        packet_type: PacketType::NetTest,
        id: 326,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_330_BLOCKS,
    },
    PacketDescriptor {
        name: "SetCPURatio",
        packet_type: PacketType::SetCPURatio,
        id: 327,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_331_BLOCKS,
    },
    PacketDescriptor {
        name: "SimCrashed",
        packet_type: PacketType::SimCrashed,
        id: 328,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_332_BLOCKS,
    },
    PacketDescriptor {
        name: "NameValuePair",
        packet_type: PacketType::NameValuePair,
        id: 329,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_333_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveNameValuePair",
        packet_type: PacketType::RemoveNameValuePair,
        id: 330,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_334_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateAttachment",
        packet_type: PacketType::UpdateAttachment,
        id: 331,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_335_BLOCKS,
    },
    PacketDescriptor {
        name: "RemoveAttachment",
        packet_type: PacketType::RemoveAttachment,
        id: 332,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_336_BLOCKS,
    },
    PacketDescriptor {
        name: "AssetUploadRequest",
        packet_type: PacketType::AssetUploadRequest,
        id: 333,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_337_BLOCKS,
    },
    PacketDescriptor {
        name: "AssetUploadComplete",
        packet_type: PacketType::AssetUploadComplete,
        id: 334,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_338_BLOCKS,
    },
    PacketDescriptor {
        name: "EmailMessageRequest",
        packet_type: PacketType::EmailMessageRequest,
        id: 335,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_339_BLOCKS,
    },
    PacketDescriptor {
        name: "EmailMessageReply",
        packet_type: PacketType::EmailMessageReply,
        id: 336,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_340_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptDataRequest",
        packet_type: PacketType::ScriptDataRequest,
        id: 337,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_341_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptDataReply",
        packet_type: PacketType::ScriptDataReply,
        id: 338,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_342_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateGroupRequest",
        packet_type: PacketType::CreateGroupRequest,
        id: 339,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_343_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateGroupReply",
        packet_type: PacketType::CreateGroupReply,
        id: 340,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_344_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateGroupInfo",
        packet_type: PacketType::UpdateGroupInfo,
        id: 341,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_345_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleChanges",
        packet_type: PacketType::GroupRoleChanges,
        id: 342,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_346_BLOCKS,
    },
    PacketDescriptor {
        name: "JoinGroupRequest",
        packet_type: PacketType::JoinGroupRequest,
        id: 343,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_347_BLOCKS,
    },
    PacketDescriptor {
        name: "JoinGroupReply",
        packet_type: PacketType::JoinGroupReply,
        id: 344,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_348_BLOCKS,
    },
    PacketDescriptor {
        name: "EjectGroupMemberRequest",
        packet_type: PacketType::EjectGroupMemberRequest,
        id: 345,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_349_BLOCKS,
    },
    PacketDescriptor {
        name: "EjectGroupMemberReply",
        packet_type: PacketType::EjectGroupMemberReply,
        id: 346,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_350_BLOCKS,
    },
    PacketDescriptor {
        name: "LeaveGroupRequest",
        packet_type: PacketType::LeaveGroupRequest,
        id: 347,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_351_BLOCKS,
    },
    PacketDescriptor {
        name: "LeaveGroupReply",
        packet_type: PacketType::LeaveGroupReply,
        id: 348,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_352_BLOCKS,
    },
    PacketDescriptor {
        name: "InviteGroupRequest",
        packet_type: PacketType::InviteGroupRequest,
        id: 349,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_353_BLOCKS,
    },
    PacketDescriptor {
        name: "InviteGroupResponse",
        packet_type: PacketType::InviteGroupResponse,
        id: 350,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_354_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupProfileRequest",
        packet_type: PacketType::GroupProfileRequest,
        id: 351,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_355_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupProfileReply",
        packet_type: PacketType::GroupProfileReply,
        id: 352,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_356_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountSummaryRequest",
        packet_type: PacketType::GroupAccountSummaryRequest,
        id: 353,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_357_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountSummaryReply",
        packet_type: PacketType::GroupAccountSummaryReply,
        id: 354,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_358_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountDetailsRequest",
        packet_type: PacketType::GroupAccountDetailsRequest,
        id: 355,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_359_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountDetailsReply",
        packet_type: PacketType::GroupAccountDetailsReply,
        id: 356,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_360_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountTransactionsRequest",
        packet_type: PacketType::GroupAccountTransactionsRequest,
        id: 357,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_361_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupAccountTransactionsReply",
        packet_type: PacketType::GroupAccountTransactionsReply,
        id: 358,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_362_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupActiveProposalsRequest",
        packet_type: PacketType::GroupActiveProposalsRequest,
        id: 359,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_363_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupActiveProposalItemReply",
        packet_type: PacketType::GroupActiveProposalItemReply,
        id: 360,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_364_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupVoteHistoryRequest",
        packet_type: PacketType::GroupVoteHistoryRequest,
        id: 361,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_365_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupVoteHistoryItemReply",
        packet_type: PacketType::GroupVoteHistoryItemReply,
        id: 362,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_366_BLOCKS,
    },
    PacketDescriptor {
        name: "StartGroupProposal",
        packet_type: PacketType::StartGroupProposal,
        id: 363,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_367_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupProposalBallot",
        packet_type: PacketType::GroupProposalBallot,
        id: 364,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_368_BLOCKS,
    },
    PacketDescriptor {
        name: "TallyVotes",
        packet_type: PacketType::TallyVotes,
        id: 365,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_369_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupMembersRequest",
        packet_type: PacketType::GroupMembersRequest,
        id: 366,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_370_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupMembersReply",
        packet_type: PacketType::GroupMembersReply,
        id: 367,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_371_BLOCKS,
    },
    PacketDescriptor {
        name: "ActivateGroup",
        packet_type: PacketType::ActivateGroup,
        id: 368,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_372_BLOCKS,
    },
    PacketDescriptor {
        name: "SetGroupContribution",
        packet_type: PacketType::SetGroupContribution,
        id: 369,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_373_BLOCKS,
    },
    PacketDescriptor {
        name: "SetGroupAcceptNotices",
        packet_type: PacketType::SetGroupAcceptNotices,
        id: 370,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_374_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleDataRequest",
        packet_type: PacketType::GroupRoleDataRequest,
        id: 371,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_375_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleDataReply",
        packet_type: PacketType::GroupRoleDataReply,
        id: 372,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_376_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleMembersRequest",
        packet_type: PacketType::GroupRoleMembersRequest,
        id: 373,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_377_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleMembersReply",
        packet_type: PacketType::GroupRoleMembersReply,
        id: 374,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_378_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupTitlesRequest",
        packet_type: PacketType::GroupTitlesRequest,
        id: 375,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_379_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupTitlesReply",
        packet_type: PacketType::GroupTitlesReply,
        id: 376,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_380_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupTitleUpdate",
        packet_type: PacketType::GroupTitleUpdate,
        id: 377,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_381_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupRoleUpdate",
        packet_type: PacketType::GroupRoleUpdate,
        id: 378,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_382_BLOCKS,
    },
    PacketDescriptor {
        name: "LiveHelpGroupRequest",
        packet_type: PacketType::LiveHelpGroupRequest,
        id: 379,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_383_BLOCKS,
    },
    PacketDescriptor {
        name: "LiveHelpGroupReply",
        packet_type: PacketType::LiveHelpGroupReply,
        id: 380,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_384_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentWearablesRequest",
        packet_type: PacketType::AgentWearablesRequest,
        id: 381,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_385_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentWearablesUpdate",
        packet_type: PacketType::AgentWearablesUpdate,
        id: 382,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_386_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentIsNowWearing",
        packet_type: PacketType::AgentIsNowWearing,
        id: 383,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_387_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentCachedTexture",
        packet_type: PacketType::AgentCachedTexture,
        id: 384,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_388_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentCachedTextureResponse",
        packet_type: PacketType::AgentCachedTextureResponse,
        id: 385,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_389_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentDataUpdateRequest",
        packet_type: PacketType::AgentDataUpdateRequest,
        id: 386,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_390_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentDataUpdate",
        packet_type: PacketType::AgentDataUpdate,
        id: 387,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_391_BLOCKS,
    },
    PacketDescriptor {
        name: "GroupDataUpdate",
        packet_type: PacketType::GroupDataUpdate,
        id: 388,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_392_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentGroupDataUpdate",
        packet_type: PacketType::AgentGroupDataUpdate,
        id: 389,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_393_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentDropGroup",
        packet_type: PacketType::AgentDropGroup,
        id: 390,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_394_BLOCKS,
    },
    PacketDescriptor {
        name: "LogTextMessage",
        packet_type: PacketType::LogTextMessage,
        id: 391,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_395_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateTrustedCircuit",
        packet_type: PacketType::CreateTrustedCircuit,
        id: 392,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_396_BLOCKS,
    },
    PacketDescriptor {
        name: "DenyTrustedCircuit",
        packet_type: PacketType::DenyTrustedCircuit,
        id: 393,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_397_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestTrustedCircuit",
        packet_type: PacketType::RequestTrustedCircuit,
        id: 394,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_398_BLOCKS,
    },
    PacketDescriptor {
        name: "RezSingleAttachmentFromInv",
        packet_type: PacketType::RezSingleAttachmentFromInv,
        id: 395,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_399_BLOCKS,
    },
    PacketDescriptor {
        name: "RezMultipleAttachmentsFromInv",
        packet_type: PacketType::RezMultipleAttachmentsFromInv,
        id: 396,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_400_BLOCKS,
    },
    PacketDescriptor {
        name: "DetachAttachmentIntoInv",
        packet_type: PacketType::DetachAttachmentIntoInv,
        id: 397,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_401_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateNewOutfitAttachments",
        packet_type: PacketType::CreateNewOutfitAttachments,
        id: 398,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_402_BLOCKS,
    },
    PacketDescriptor {
        name: "UserInfoRequest",
        packet_type: PacketType::UserInfoRequest,
        id: 399,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_403_BLOCKS,
    },
    PacketDescriptor {
        name: "UserInfoReply",
        packet_type: PacketType::UserInfoReply,
        id: 400,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_404_BLOCKS,
    },
    PacketDescriptor {
        name: "UpdateUserInfo",
        packet_type: PacketType::UpdateUserInfo,
        id: 401,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_405_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelRename",
        packet_type: PacketType::ParcelRename,
        id: 402,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_406_BLOCKS,
    },
    PacketDescriptor {
        name: "InitiateDownload",
        packet_type: PacketType::InitiateDownload,
        id: 403,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_407_BLOCKS,
    },
    PacketDescriptor {
        name: "SystemMessage",
        packet_type: PacketType::SystemMessage,
        id: 404,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_408_BLOCKS,
    },
    PacketDescriptor {
        name: "MapLayerRequest",
        packet_type: PacketType::MapLayerRequest,
        id: 405,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_409_BLOCKS,
    },
    PacketDescriptor {
        name: "MapLayerReply",
        packet_type: PacketType::MapLayerReply,
        id: 406,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_410_BLOCKS,
    },
    PacketDescriptor {
        name: "MapBlockRequest",
        packet_type: PacketType::MapBlockRequest,
        id: 407,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_411_BLOCKS,
    },
    PacketDescriptor {
        name: "MapNameRequest",
        packet_type: PacketType::MapNameRequest,
        id: 408,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_412_BLOCKS,
    },
    PacketDescriptor {
        name: "MapBlockReply",
        packet_type: PacketType::MapBlockReply,
        id: 409,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_413_BLOCKS,
    },
    PacketDescriptor {
        name: "MapItemRequest",
        packet_type: PacketType::MapItemRequest,
        id: 410,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_414_BLOCKS,
    },
    PacketDescriptor {
        name: "MapItemReply",
        packet_type: PacketType::MapItemReply,
        id: 411,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_415_BLOCKS,
    },
    PacketDescriptor {
        name: "SendPostcard",
        packet_type: PacketType::SendPostcard,
        id: 412,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_416_BLOCKS,
    },
    PacketDescriptor {
        name: "RpcChannelRequest",
        packet_type: PacketType::RpcChannelRequest,
        id: 413,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_417_BLOCKS,
    },
    PacketDescriptor {
        name: "RpcChannelReply",
        packet_type: PacketType::RpcChannelReply,
        id: 414,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_418_BLOCKS,
    },
    PacketDescriptor {
        name: "RpcScriptRequestInbound",
        packet_type: PacketType::RpcScriptRequestInbound,
        id: 415,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_419_BLOCKS,
    },
    PacketDescriptor {
        name: "RpcScriptRequestInboundForward",
        packet_type: PacketType::RpcScriptRequestInboundForward,
        id: 416,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_420_BLOCKS,
    },
    PacketDescriptor {
        name: "RpcScriptReplyInbound",
        packet_type: PacketType::RpcScriptReplyInbound,
        id: 417,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_421_BLOCKS,
    },
    PacketDescriptor {
        name: "ScriptMailRegistration",
        packet_type: PacketType::ScriptMailRegistration,
        id: 418,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_422_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelMediaCommandMessage",
        packet_type: PacketType::ParcelMediaCommandMessage,
        id: 419,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_423_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelMediaUpdate",
        packet_type: PacketType::ParcelMediaUpdate,
        id: 420,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_424_BLOCKS,
    },
    PacketDescriptor {
        name: "LandStatRequest",
        packet_type: PacketType::LandStatRequest,
        id: 421,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_425_BLOCKS,
    },
    PacketDescriptor {
        name: "LandStatReply",
        packet_type: PacketType::LandStatReply,
        id: 422,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_426_BLOCKS,
    },
    PacketDescriptor {
        name: "Error",
        packet_type: PacketType::Error,
        id: 423,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_427_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectIncludeInSearch",
        packet_type: PacketType::ObjectIncludeInSearch,
        id: 424,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_428_BLOCKS,
    },
    PacketDescriptor {
        name: "RezRestoreToWorld",
        packet_type: PacketType::RezRestoreToWorld,
        id: 425,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: false,
        flags: &["UDPDeprecated"],
        blocks: PACKET_429_BLOCKS,
    },
    PacketDescriptor {
        name: "LinkInventoryItem",
        packet_type: PacketType::LinkInventoryItem,
        id: 426,
        frequency: crate::PacketFrequency::Low,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_430_BLOCKS,
    },
    PacketDescriptor {
        name: "RetrieveIMsExtended",
        packet_type: PacketType::RetrieveIMsExtended,
        id: 427,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_431_BLOCKS,
    },
    PacketDescriptor {
        name: "JoinGroupRequestExtended",
        packet_type: PacketType::JoinGroupRequestExtended,
        id: 428,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_432_BLOCKS,
    },
    PacketDescriptor {
        name: "CreateGroupRequestExtended",
        packet_type: PacketType::CreateGroupRequestExtended,
        id: 429,
        frequency: crate::PacketFrequency::Low,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_433_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectAdd",
        packet_type: PacketType::ObjectAdd,
        id: 1,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_434_BLOCKS,
    },
    PacketDescriptor {
        name: "MultipleObjectUpdate",
        packet_type: PacketType::MultipleObjectUpdate,
        id: 2,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_435_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestMultipleObjects",
        packet_type: PacketType::RequestMultipleObjects,
        id: 3,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_436_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectPosition",
        packet_type: PacketType::ObjectPosition,
        id: 4,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &["Deprecated"],
        blocks: PACKET_437_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestObjectPropertiesFamily",
        packet_type: PacketType::RequestObjectPropertiesFamily,
        id: 5,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_438_BLOCKS,
    },
    PacketDescriptor {
        name: "CoarseLocationUpdate",
        packet_type: PacketType::CoarseLocationUpdate,
        id: 6,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_439_BLOCKS,
    },
    PacketDescriptor {
        name: "CrossedRegion",
        packet_type: PacketType::CrossedRegion,
        id: 7,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &["UDPBlackListed"],
        blocks: PACKET_440_BLOCKS,
    },
    PacketDescriptor {
        name: "ConfirmEnableSimulator",
        packet_type: PacketType::ConfirmEnableSimulator,
        id: 8,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_441_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectProperties",
        packet_type: PacketType::ObjectProperties,
        id: 9,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_442_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectPropertiesFamily",
        packet_type: PacketType::ObjectPropertiesFamily,
        id: 10,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_443_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelPropertiesRequest",
        packet_type: PacketType::ParcelPropertiesRequest,
        id: 11,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_444_BLOCKS,
    },
    PacketDescriptor {
        name: "SimStatus",
        packet_type: PacketType::SimStatus,
        id: 12,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_445_BLOCKS,
    },
    PacketDescriptor {
        name: "AttachedSound",
        packet_type: PacketType::AttachedSound,
        id: 13,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_446_BLOCKS,
    },
    PacketDescriptor {
        name: "AttachedSoundGainChange",
        packet_type: PacketType::AttachedSoundGainChange,
        id: 14,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_447_BLOCKS,
    },
    PacketDescriptor {
        name: "PreloadSound",
        packet_type: PacketType::PreloadSound,
        id: 15,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_448_BLOCKS,
    },
    PacketDescriptor {
        name: "InternalScriptMail",
        packet_type: PacketType::InternalScriptMail,
        id: 16,
        frequency: crate::PacketFrequency::Medium,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_449_BLOCKS,
    },
    PacketDescriptor {
        name: "ViewerEffect",
        packet_type: PacketType::ViewerEffect,
        id: 17,
        frequency: crate::PacketFrequency::Medium,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_450_BLOCKS,
    },
    PacketDescriptor {
        name: "StartPingCheck",
        packet_type: PacketType::StartPingCheck,
        id: 1,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_451_BLOCKS,
    },
    PacketDescriptor {
        name: "CompletePingCheck",
        packet_type: PacketType::CompletePingCheck,
        id: 2,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_452_BLOCKS,
    },
    PacketDescriptor {
        name: "NeighborList",
        packet_type: PacketType::NeighborList,
        id: 3,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_453_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentUpdate",
        packet_type: PacketType::AgentUpdate,
        id: 4,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_454_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentAnimation",
        packet_type: PacketType::AgentAnimation,
        id: 5,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_455_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentRequestSit",
        packet_type: PacketType::AgentRequestSit,
        id: 6,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_456_BLOCKS,
    },
    PacketDescriptor {
        name: "AgentSit",
        packet_type: PacketType::AgentSit,
        id: 7,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_457_BLOCKS,
    },
    PacketDescriptor {
        name: "RequestImage",
        packet_type: PacketType::RequestImage,
        id: 8,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_458_BLOCKS,
    },
    PacketDescriptor {
        name: "ImageData",
        packet_type: PacketType::ImageData,
        id: 9,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_459_BLOCKS,
    },
    PacketDescriptor {
        name: "ImagePacket",
        packet_type: PacketType::ImagePacket,
        id: 10,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_460_BLOCKS,
    },
    PacketDescriptor {
        name: "LayerData",
        packet_type: PacketType::LayerData,
        id: 11,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_461_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectUpdate",
        packet_type: PacketType::ObjectUpdate,
        id: 12,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_462_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectUpdateCompressed",
        packet_type: PacketType::ObjectUpdateCompressed,
        id: 13,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_463_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectUpdateCached",
        packet_type: PacketType::ObjectUpdateCached,
        id: 14,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_464_BLOCKS,
    },
    PacketDescriptor {
        name: "ImprovedTerseObjectUpdate",
        packet_type: PacketType::ImprovedTerseObjectUpdate,
        id: 15,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_465_BLOCKS,
    },
    PacketDescriptor {
        name: "KillObject",
        packet_type: PacketType::KillObject,
        id: 16,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_466_BLOCKS,
    },
    PacketDescriptor {
        name: "TransferPacket",
        packet_type: PacketType::TransferPacket,
        id: 17,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_467_BLOCKS,
    },
    PacketDescriptor {
        name: "SendXferPacket",
        packet_type: PacketType::SendXferPacket,
        id: 18,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_468_BLOCKS,
    },
    PacketDescriptor {
        name: "ConfirmXferPacket",
        packet_type: PacketType::ConfirmXferPacket,
        id: 19,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_469_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarAnimation",
        packet_type: PacketType::AvatarAnimation,
        id: 20,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_470_BLOCKS,
    },
    PacketDescriptor {
        name: "AvatarSitResponse",
        packet_type: PacketType::AvatarSitResponse,
        id: 21,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_471_BLOCKS,
    },
    PacketDescriptor {
        name: "CameraConstraint",
        packet_type: PacketType::CameraConstraint,
        id: 22,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_472_BLOCKS,
    },
    PacketDescriptor {
        name: "ParcelProperties",
        packet_type: PacketType::ParcelProperties,
        id: 23,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &["UDPDeprecated"],
        blocks: PACKET_473_BLOCKS,
    },
    PacketDescriptor {
        name: "EdgeDataPacket",
        packet_type: PacketType::EdgeDataPacket,
        id: 24,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_474_BLOCKS,
    },
    PacketDescriptor {
        name: "ChildAgentUpdate",
        packet_type: PacketType::ChildAgentUpdate,
        id: 25,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_475_BLOCKS,
    },
    PacketDescriptor {
        name: "ChildAgentAlive",
        packet_type: PacketType::ChildAgentAlive,
        id: 26,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_476_BLOCKS,
    },
    PacketDescriptor {
        name: "ChildAgentPositionUpdate",
        packet_type: PacketType::ChildAgentPositionUpdate,
        id: 27,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_477_BLOCKS,
    },
    PacketDescriptor {
        name: "AtomicPassObject",
        packet_type: PacketType::AtomicPassObject,
        id: 28,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_478_BLOCKS,
    },
    PacketDescriptor {
        name: "GenericStreamingMessage",
        packet_type: PacketType::GenericStreamingMessage,
        id: 31,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_479_BLOCKS,
    },
    PacketDescriptor {
        name: "SoundTrigger",
        packet_type: PacketType::SoundTrigger,
        id: 29,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_480_BLOCKS,
    },
    PacketDescriptor {
        name: "ObjectAnimation",
        packet_type: PacketType::ObjectAnimation,
        id: 30,
        frequency: crate::PacketFrequency::High,
        trusted: true,
        zerocoded: false,
        flags: &[],
        blocks: PACKET_481_BLOCKS,
    },
    PacketDescriptor {
        name: "GameControlInput",
        packet_type: PacketType::GameControlInput,
        id: 32,
        frequency: crate::PacketFrequency::High,
        trusted: false,
        zerocoded: true,
        flags: &[],
        blocks: PACKET_482_BLOCKS,
    },
];
#[must_use]
#[allow(clippy::too_many_lines)]
pub fn packet_type(id: u16, frequency: crate::PacketFrequency) -> PacketType {
    match (frequency, id) {
        (crate::PacketFrequency::Low, 1) => PacketType::TestMessage,
        (crate::PacketFrequency::Low, 65531) => PacketType::PacketAck,
        (crate::PacketFrequency::Low, 65532) => PacketType::OpenCircuit,
        (crate::PacketFrequency::Low, 65533) => PacketType::CloseCircuit,
        (crate::PacketFrequency::Low, 2) => PacketType::AddCircuitCode,
        (crate::PacketFrequency::Low, 3) => PacketType::UseCircuitCode,
        (crate::PacketFrequency::Low, 4) => PacketType::AvatarTextureUpdate,
        (crate::PacketFrequency::Low, 5) => PacketType::SimulatorMapUpdate,
        (crate::PacketFrequency::Low, 6) => PacketType::SimulatorSetMap,
        (crate::PacketFrequency::Low, 7) => PacketType::SubscribeLoad,
        (crate::PacketFrequency::Low, 8) => PacketType::UnsubscribeLoad,
        (crate::PacketFrequency::Low, 9) => PacketType::SimulatorReady,
        (crate::PacketFrequency::Low, 10) => PacketType::TelehubInfo,
        (crate::PacketFrequency::Low, 11) => PacketType::SimulatorPresentAtLocation,
        (crate::PacketFrequency::Low, 12) => PacketType::SimulatorLoad,
        (crate::PacketFrequency::Low, 13) => PacketType::SimulatorShutdownRequest,
        (crate::PacketFrequency::Low, 14) => PacketType::RegionPresenceRequestByRegionID,
        (crate::PacketFrequency::Low, 15) => PacketType::RegionPresenceRequestByHandle,
        (crate::PacketFrequency::Low, 16) => PacketType::RegionPresenceResponse,
        (crate::PacketFrequency::Low, 17) => PacketType::UpdateSimulator,
        (crate::PacketFrequency::Low, 18) => PacketType::LogDwellTime,
        (crate::PacketFrequency::Low, 19) => PacketType::FeatureDisabled,
        (crate::PacketFrequency::Low, 20) => PacketType::LogFailedMoneyTransaction,
        (crate::PacketFrequency::Low, 21) => PacketType::UserReportInternal,
        (crate::PacketFrequency::Low, 22) => PacketType::SetSimStatusInDatabase,
        (crate::PacketFrequency::Low, 23) => PacketType::SetSimPresenceInDatabase,
        (crate::PacketFrequency::Low, 24) => PacketType::EconomyDataRequest,
        (crate::PacketFrequency::Low, 25) => PacketType::EconomyData,
        (crate::PacketFrequency::Low, 26) => PacketType::AvatarPickerRequest,
        (crate::PacketFrequency::Low, 27) => PacketType::AvatarPickerRequestBackend,
        (crate::PacketFrequency::Low, 28) => PacketType::AvatarPickerReply,
        (crate::PacketFrequency::Low, 29) => PacketType::PlacesQuery,
        (crate::PacketFrequency::Low, 30) => PacketType::PlacesReply,
        (crate::PacketFrequency::Low, 31) => PacketType::DirFindQuery,
        (crate::PacketFrequency::Low, 32) => PacketType::DirFindQueryBackend,
        (crate::PacketFrequency::Low, 33) => PacketType::DirPlacesQuery,
        (crate::PacketFrequency::Low, 34) => PacketType::DirPlacesQueryBackend,
        (crate::PacketFrequency::Low, 35) => PacketType::DirPlacesReply,
        (crate::PacketFrequency::Low, 36) => PacketType::DirPeopleReply,
        (crate::PacketFrequency::Low, 37) => PacketType::DirEventsReply,
        (crate::PacketFrequency::Low, 38) => PacketType::DirGroupsReply,
        (crate::PacketFrequency::Low, 39) => PacketType::DirClassifiedQuery,
        (crate::PacketFrequency::Low, 40) => PacketType::DirClassifiedQueryBackend,
        (crate::PacketFrequency::Low, 41) => PacketType::DirClassifiedReply,
        (crate::PacketFrequency::Low, 42) => PacketType::AvatarClassifiedReply,
        (crate::PacketFrequency::Low, 43) => PacketType::ClassifiedInfoRequest,
        (crate::PacketFrequency::Low, 44) => PacketType::ClassifiedInfoReply,
        (crate::PacketFrequency::Low, 45) => PacketType::ClassifiedInfoUpdate,
        (crate::PacketFrequency::Low, 46) => PacketType::ClassifiedDelete,
        (crate::PacketFrequency::Low, 47) => PacketType::ClassifiedGodDelete,
        (crate::PacketFrequency::Low, 48) => PacketType::DirLandQuery,
        (crate::PacketFrequency::Low, 49) => PacketType::DirLandQueryBackend,
        (crate::PacketFrequency::Low, 50) => PacketType::DirLandReply,
        (crate::PacketFrequency::Low, 51) => PacketType::DirPopularQuery,
        (crate::PacketFrequency::Low, 52) => PacketType::DirPopularQueryBackend,
        (crate::PacketFrequency::Low, 53) => PacketType::DirPopularReply,
        (crate::PacketFrequency::Low, 54) => PacketType::ParcelInfoRequest,
        (crate::PacketFrequency::Low, 55) => PacketType::ParcelInfoReply,
        (crate::PacketFrequency::Low, 56) => PacketType::ParcelObjectOwnersRequest,
        (crate::PacketFrequency::Low, 57) => PacketType::ParcelObjectOwnersReply,
        (crate::PacketFrequency::Low, 58) => PacketType::GroupNoticesListRequest,
        (crate::PacketFrequency::Low, 59) => PacketType::GroupNoticesListReply,
        (crate::PacketFrequency::Low, 60) => PacketType::GroupNoticeRequest,
        (crate::PacketFrequency::Low, 61) => PacketType::GroupNoticeAdd,
        (crate::PacketFrequency::Low, 62) => PacketType::TeleportRequest,
        (crate::PacketFrequency::Low, 63) => PacketType::TeleportLocationRequest,
        (crate::PacketFrequency::Low, 64) => PacketType::TeleportLocal,
        (crate::PacketFrequency::Low, 65) => PacketType::TeleportLandmarkRequest,
        (crate::PacketFrequency::Low, 66) => PacketType::TeleportProgress,
        (crate::PacketFrequency::Low, 67) => PacketType::DataHomeLocationRequest,
        (crate::PacketFrequency::Low, 68) => PacketType::DataHomeLocationReply,
        (crate::PacketFrequency::Low, 69) => PacketType::TeleportFinish,
        (crate::PacketFrequency::Low, 70) => PacketType::StartLure,
        (crate::PacketFrequency::Low, 71) => PacketType::TeleportLureRequest,
        (crate::PacketFrequency::Low, 72) => PacketType::TeleportCancel,
        (crate::PacketFrequency::Low, 73) => PacketType::TeleportStart,
        (crate::PacketFrequency::Low, 74) => PacketType::TeleportFailed,
        (crate::PacketFrequency::Low, 75) => PacketType::Undo,
        (crate::PacketFrequency::Low, 76) => PacketType::Redo,
        (crate::PacketFrequency::Low, 77) => PacketType::UndoLand,
        (crate::PacketFrequency::Low, 78) => PacketType::AgentPause,
        (crate::PacketFrequency::Low, 79) => PacketType::AgentResume,
        (crate::PacketFrequency::Low, 80) => PacketType::ChatFromViewer,
        (crate::PacketFrequency::Low, 81) => PacketType::AgentThrottle,
        (crate::PacketFrequency::Low, 82) => PacketType::AgentFOV,
        (crate::PacketFrequency::Low, 83) => PacketType::AgentHeightWidth,
        (crate::PacketFrequency::Low, 84) => PacketType::AgentSetAppearance,
        (crate::PacketFrequency::Low, 85) => PacketType::AgentQuitCopy,
        (crate::PacketFrequency::Low, 86) => PacketType::ImageNotInDatabase,
        (crate::PacketFrequency::Low, 87) => PacketType::RebakeAvatarTextures,
        (crate::PacketFrequency::Low, 88) => PacketType::SetAlwaysRun,
        (crate::PacketFrequency::Low, 89) => PacketType::ObjectDelete,
        (crate::PacketFrequency::Low, 90) => PacketType::ObjectDuplicate,
        (crate::PacketFrequency::Low, 91) => PacketType::ObjectDuplicateOnRay,
        (crate::PacketFrequency::Low, 92) => PacketType::ObjectScale,
        (crate::PacketFrequency::Low, 93) => PacketType::ObjectRotation,
        (crate::PacketFrequency::Low, 94) => PacketType::ObjectFlagUpdate,
        (crate::PacketFrequency::Low, 95) => PacketType::ObjectClickAction,
        (crate::PacketFrequency::Low, 96) => PacketType::ObjectImage,
        (crate::PacketFrequency::Low, 431) => PacketType::ObjectBypassModUpdate,
        (crate::PacketFrequency::Low, 97) => PacketType::ObjectMaterial,
        (crate::PacketFrequency::Low, 98) => PacketType::ObjectShape,
        (crate::PacketFrequency::Low, 99) => PacketType::ObjectExtraParams,
        (crate::PacketFrequency::Low, 100) => PacketType::ObjectOwner,
        (crate::PacketFrequency::Low, 101) => PacketType::ObjectGroup,
        (crate::PacketFrequency::Low, 102) => PacketType::ObjectBuy,
        (crate::PacketFrequency::Low, 103) => PacketType::BuyObjectInventory,
        (crate::PacketFrequency::Low, 104) => PacketType::DerezContainer,
        (crate::PacketFrequency::Low, 105) => PacketType::ObjectPermissions,
        (crate::PacketFrequency::Low, 106) => PacketType::ObjectSaleInfo,
        (crate::PacketFrequency::Low, 107) => PacketType::ObjectName,
        (crate::PacketFrequency::Low, 108) => PacketType::ObjectDescription,
        (crate::PacketFrequency::Low, 109) => PacketType::ObjectCategory,
        (crate::PacketFrequency::Low, 110) => PacketType::ObjectSelect,
        (crate::PacketFrequency::Low, 111) => PacketType::ObjectDeselect,
        (crate::PacketFrequency::Low, 112) => PacketType::ObjectAttach,
        (crate::PacketFrequency::Low, 113) => PacketType::ObjectDetach,
        (crate::PacketFrequency::Low, 114) => PacketType::ObjectDrop,
        (crate::PacketFrequency::Low, 115) => PacketType::ObjectLink,
        (crate::PacketFrequency::Low, 116) => PacketType::ObjectDelink,
        (crate::PacketFrequency::Low, 117) => PacketType::ObjectGrab,
        (crate::PacketFrequency::Low, 118) => PacketType::ObjectGrabUpdate,
        (crate::PacketFrequency::Low, 119) => PacketType::ObjectDeGrab,
        (crate::PacketFrequency::Low, 120) => PacketType::ObjectSpinStart,
        (crate::PacketFrequency::Low, 121) => PacketType::ObjectSpinUpdate,
        (crate::PacketFrequency::Low, 122) => PacketType::ObjectSpinStop,
        (crate::PacketFrequency::Low, 123) => PacketType::ObjectExportSelected,
        (crate::PacketFrequency::Low, 124) => PacketType::ModifyLand,
        (crate::PacketFrequency::Low, 125) => PacketType::VelocityInterpolateOn,
        (crate::PacketFrequency::Low, 126) => PacketType::VelocityInterpolateOff,
        (crate::PacketFrequency::Low, 127) => PacketType::StateSave,
        (crate::PacketFrequency::Low, 128) => PacketType::ReportAutosaveCrash,
        (crate::PacketFrequency::Low, 129) => PacketType::SimWideDeletes,
        (crate::PacketFrequency::Low, 130) => PacketType::TrackAgent,
        (crate::PacketFrequency::Low, 131) => PacketType::ViewerStats,
        (crate::PacketFrequency::Low, 132) => PacketType::ScriptAnswerYes,
        (crate::PacketFrequency::Low, 133) => PacketType::UserReport,
        (crate::PacketFrequency::Low, 134) => PacketType::AlertMessage,
        (crate::PacketFrequency::Low, 135) => PacketType::AgentAlertMessage,
        (crate::PacketFrequency::Low, 136) => PacketType::MeanCollisionAlert,
        (crate::PacketFrequency::Low, 137) => PacketType::ViewerFrozenMessage,
        (crate::PacketFrequency::Low, 138) => PacketType::HealthMessage,
        (crate::PacketFrequency::Low, 139) => PacketType::ChatFromSimulator,
        (crate::PacketFrequency::Low, 140) => PacketType::SimStats,
        (crate::PacketFrequency::Low, 141) => PacketType::RequestRegionInfo,
        (crate::PacketFrequency::Low, 142) => PacketType::RegionInfo,
        (crate::PacketFrequency::Low, 143) => PacketType::GodUpdateRegionInfo,
        (crate::PacketFrequency::Low, 144) => PacketType::NearestLandingRegionRequest,
        (crate::PacketFrequency::Low, 145) => PacketType::NearestLandingRegionReply,
        (crate::PacketFrequency::Low, 146) => PacketType::NearestLandingRegionUpdated,
        (crate::PacketFrequency::Low, 147) => PacketType::TeleportLandingStatusChanged,
        (crate::PacketFrequency::Low, 148) => PacketType::RegionHandshake,
        (crate::PacketFrequency::Low, 149) => PacketType::RegionHandshakeReply,
        (crate::PacketFrequency::Low, 150) => PacketType::SimulatorViewerTimeMessage,
        (crate::PacketFrequency::Low, 151) => PacketType::EnableSimulator,
        (crate::PacketFrequency::Low, 152) => PacketType::DisableSimulator,
        (crate::PacketFrequency::Low, 153) => PacketType::TransferRequest,
        (crate::PacketFrequency::Low, 154) => PacketType::TransferInfo,
        (crate::PacketFrequency::Low, 155) => PacketType::TransferAbort,
        (crate::PacketFrequency::Low, 156) => PacketType::RequestXfer,
        (crate::PacketFrequency::Low, 157) => PacketType::AbortXfer,
        (crate::PacketFrequency::Low, 158) => PacketType::AvatarAppearance,
        (crate::PacketFrequency::Low, 159) => PacketType::SetFollowCamProperties,
        (crate::PacketFrequency::Low, 160) => PacketType::ClearFollowCamProperties,
        (crate::PacketFrequency::Low, 161) => PacketType::RequestPayPrice,
        (crate::PacketFrequency::Low, 162) => PacketType::PayPriceReply,
        (crate::PacketFrequency::Low, 163) => PacketType::KickUser,
        (crate::PacketFrequency::Low, 164) => PacketType::KickUserAck,
        (crate::PacketFrequency::Low, 165) => PacketType::GodKickUser,
        (crate::PacketFrequency::Low, 166) => PacketType::SystemKickUser,
        (crate::PacketFrequency::Low, 167) => PacketType::EjectUser,
        (crate::PacketFrequency::Low, 168) => PacketType::FreezeUser,
        (crate::PacketFrequency::Low, 169) => PacketType::AvatarPropertiesRequest,
        (crate::PacketFrequency::Low, 170) => PacketType::AvatarPropertiesRequestBackend,
        (crate::PacketFrequency::Low, 171) => PacketType::AvatarPropertiesReply,
        (crate::PacketFrequency::Low, 172) => PacketType::AvatarInterestsReply,
        (crate::PacketFrequency::Low, 173) => PacketType::AvatarGroupsReply,
        (crate::PacketFrequency::Low, 174) => PacketType::AvatarPropertiesUpdate,
        (crate::PacketFrequency::Low, 175) => PacketType::AvatarInterestsUpdate,
        (crate::PacketFrequency::Low, 176) => PacketType::AvatarNotesReply,
        (crate::PacketFrequency::Low, 177) => PacketType::AvatarNotesUpdate,
        (crate::PacketFrequency::Low, 178) => PacketType::AvatarPicksReply,
        (crate::PacketFrequency::Low, 179) => PacketType::EventInfoRequest,
        (crate::PacketFrequency::Low, 180) => PacketType::EventInfoReply,
        (crate::PacketFrequency::Low, 181) => PacketType::EventNotificationAddRequest,
        (crate::PacketFrequency::Low, 182) => PacketType::EventNotificationRemoveRequest,
        (crate::PacketFrequency::Low, 183) => PacketType::EventGodDelete,
        (crate::PacketFrequency::Low, 184) => PacketType::PickInfoReply,
        (crate::PacketFrequency::Low, 185) => PacketType::PickInfoUpdate,
        (crate::PacketFrequency::Low, 186) => PacketType::PickDelete,
        (crate::PacketFrequency::Low, 187) => PacketType::PickGodDelete,
        (crate::PacketFrequency::Low, 188) => PacketType::ScriptQuestion,
        (crate::PacketFrequency::Low, 189) => PacketType::ScriptControlChange,
        (crate::PacketFrequency::Low, 190) => PacketType::ScriptDialog,
        (crate::PacketFrequency::Low, 191) => PacketType::ScriptDialogReply,
        (crate::PacketFrequency::Low, 192) => PacketType::ForceScriptControlRelease,
        (crate::PacketFrequency::Low, 193) => PacketType::RevokePermissions,
        (crate::PacketFrequency::Low, 194) => PacketType::LoadURL,
        (crate::PacketFrequency::Low, 195) => PacketType::ScriptTeleportRequest,
        (crate::PacketFrequency::Low, 196) => PacketType::ParcelOverlay,
        (crate::PacketFrequency::Low, 197) => PacketType::ParcelPropertiesRequestByID,
        (crate::PacketFrequency::Low, 198) => PacketType::ParcelPropertiesUpdate,
        (crate::PacketFrequency::Low, 199) => PacketType::ParcelReturnObjects,
        (crate::PacketFrequency::Low, 200) => PacketType::ParcelSetOtherCleanTime,
        (crate::PacketFrequency::Low, 201) => PacketType::ParcelDisableObjects,
        (crate::PacketFrequency::Low, 202) => PacketType::ParcelSelectObjects,
        (crate::PacketFrequency::Low, 203) => PacketType::EstateCovenantRequest,
        (crate::PacketFrequency::Low, 204) => PacketType::EstateCovenantReply,
        (crate::PacketFrequency::Low, 205) => PacketType::ForceObjectSelect,
        (crate::PacketFrequency::Low, 206) => PacketType::ParcelBuyPass,
        (crate::PacketFrequency::Low, 207) => PacketType::ParcelDeedToGroup,
        (crate::PacketFrequency::Low, 208) => PacketType::ParcelReclaim,
        (crate::PacketFrequency::Low, 209) => PacketType::ParcelClaim,
        (crate::PacketFrequency::Low, 210) => PacketType::ParcelJoin,
        (crate::PacketFrequency::Low, 211) => PacketType::ParcelDivide,
        (crate::PacketFrequency::Low, 212) => PacketType::ParcelRelease,
        (crate::PacketFrequency::Low, 213) => PacketType::ParcelBuy,
        (crate::PacketFrequency::Low, 214) => PacketType::ParcelGodForceOwner,
        (crate::PacketFrequency::Low, 215) => PacketType::ParcelAccessListRequest,
        (crate::PacketFrequency::Low, 216) => PacketType::ParcelAccessListReply,
        (crate::PacketFrequency::Low, 217) => PacketType::ParcelAccessListUpdate,
        (crate::PacketFrequency::Low, 218) => PacketType::ParcelDwellRequest,
        (crate::PacketFrequency::Low, 219) => PacketType::ParcelDwellReply,
        (crate::PacketFrequency::Low, 220) => PacketType::RequestParcelTransfer,
        (crate::PacketFrequency::Low, 221) => PacketType::UpdateParcel,
        (crate::PacketFrequency::Low, 222) => PacketType::RemoveParcel,
        (crate::PacketFrequency::Low, 223) => PacketType::MergeParcel,
        (crate::PacketFrequency::Low, 224) => PacketType::LogParcelChanges,
        (crate::PacketFrequency::Low, 225) => PacketType::CheckParcelSales,
        (crate::PacketFrequency::Low, 226) => PacketType::ParcelSales,
        (crate::PacketFrequency::Low, 227) => PacketType::ParcelGodMarkAsContent,
        (crate::PacketFrequency::Low, 228) => PacketType::ViewerStartAuction,
        (crate::PacketFrequency::Low, 229) => PacketType::StartAuction,
        (crate::PacketFrequency::Low, 230) => PacketType::ConfirmAuctionStart,
        (crate::PacketFrequency::Low, 231) => PacketType::CompleteAuction,
        (crate::PacketFrequency::Low, 232) => PacketType::CancelAuction,
        (crate::PacketFrequency::Low, 233) => PacketType::CheckParcelAuctions,
        (crate::PacketFrequency::Low, 234) => PacketType::ParcelAuctions,
        (crate::PacketFrequency::Low, 235) => PacketType::UUIDNameRequest,
        (crate::PacketFrequency::Low, 236) => PacketType::UUIDNameReply,
        (crate::PacketFrequency::Low, 237) => PacketType::UUIDGroupNameRequest,
        (crate::PacketFrequency::Low, 238) => PacketType::UUIDGroupNameReply,
        (crate::PacketFrequency::Low, 239) => PacketType::ChatPass,
        (crate::PacketFrequency::Low, 240) => PacketType::ChildAgentDying,
        (crate::PacketFrequency::Low, 241) => PacketType::ChildAgentUnknown,
        (crate::PacketFrequency::Low, 242) => PacketType::KillChildAgents,
        (crate::PacketFrequency::Low, 243) => PacketType::GetScriptRunning,
        (crate::PacketFrequency::Low, 244) => PacketType::ScriptRunningReply,
        (crate::PacketFrequency::Low, 245) => PacketType::SetScriptRunning,
        (crate::PacketFrequency::Low, 246) => PacketType::ScriptReset,
        (crate::PacketFrequency::Low, 247) => PacketType::ScriptSensorRequest,
        (crate::PacketFrequency::Low, 248) => PacketType::ScriptSensorReply,
        (crate::PacketFrequency::Low, 249) => PacketType::CompleteAgentMovement,
        (crate::PacketFrequency::Low, 250) => PacketType::AgentMovementComplete,
        (crate::PacketFrequency::Low, 251) => PacketType::DataServerLogout,
        (crate::PacketFrequency::Low, 252) => PacketType::LogoutRequest,
        (crate::PacketFrequency::Low, 253) => PacketType::LogoutReply,
        (crate::PacketFrequency::Low, 254) => PacketType::ImprovedInstantMessage,
        (crate::PacketFrequency::Low, 255) => PacketType::RetrieveInstantMessages,
        (crate::PacketFrequency::Low, 256) => PacketType::FindAgent,
        (crate::PacketFrequency::Low, 257) => PacketType::RequestGodlikePowers,
        (crate::PacketFrequency::Low, 258) => PacketType::GrantGodlikePowers,
        (crate::PacketFrequency::Low, 259) => PacketType::GodlikeMessage,
        (crate::PacketFrequency::Low, 260) => PacketType::EstateOwnerMessage,
        (crate::PacketFrequency::Low, 261) => PacketType::GenericMessage,
        (crate::PacketFrequency::Low, 430) => PacketType::LargeGenericMessage,
        (crate::PacketFrequency::Low, 262) => PacketType::MuteListRequest,
        (crate::PacketFrequency::Low, 263) => PacketType::UpdateMuteListEntry,
        (crate::PacketFrequency::Low, 264) => PacketType::RemoveMuteListEntry,
        (crate::PacketFrequency::Low, 265) => PacketType::CopyInventoryFromNotecard,
        (crate::PacketFrequency::Low, 266) => PacketType::UpdateInventoryItem,
        (crate::PacketFrequency::Low, 267) => PacketType::UpdateCreateInventoryItem,
        (crate::PacketFrequency::Low, 268) => PacketType::MoveInventoryItem,
        (crate::PacketFrequency::Low, 269) => PacketType::CopyInventoryItem,
        (crate::PacketFrequency::Low, 270) => PacketType::RemoveInventoryItem,
        (crate::PacketFrequency::Low, 271) => PacketType::ChangeInventoryItemFlags,
        (crate::PacketFrequency::Low, 272) => PacketType::SaveAssetIntoInventory,
        (crate::PacketFrequency::Low, 273) => PacketType::CreateInventoryFolder,
        (crate::PacketFrequency::Low, 274) => PacketType::UpdateInventoryFolder,
        (crate::PacketFrequency::Low, 275) => PacketType::MoveInventoryFolder,
        (crate::PacketFrequency::Low, 276) => PacketType::RemoveInventoryFolder,
        (crate::PacketFrequency::Low, 277) => PacketType::FetchInventoryDescendents,
        (crate::PacketFrequency::Low, 278) => PacketType::InventoryDescendents,
        (crate::PacketFrequency::Low, 279) => PacketType::FetchInventory,
        (crate::PacketFrequency::Low, 280) => PacketType::FetchInventoryReply,
        (crate::PacketFrequency::Low, 281) => PacketType::BulkUpdateInventory,
        (crate::PacketFrequency::Low, 282) => PacketType::RequestInventoryAsset,
        (crate::PacketFrequency::Low, 283) => PacketType::InventoryAssetResponse,
        (crate::PacketFrequency::Low, 284) => PacketType::RemoveInventoryObjects,
        (crate::PacketFrequency::Low, 285) => PacketType::PurgeInventoryDescendents,
        (crate::PacketFrequency::Low, 286) => PacketType::UpdateTaskInventory,
        (crate::PacketFrequency::Low, 287) => PacketType::RemoveTaskInventory,
        (crate::PacketFrequency::Low, 288) => PacketType::MoveTaskInventory,
        (crate::PacketFrequency::Low, 289) => PacketType::RequestTaskInventory,
        (crate::PacketFrequency::Low, 290) => PacketType::ReplyTaskInventory,
        (crate::PacketFrequency::Low, 291) => PacketType::DeRezObject,
        (crate::PacketFrequency::Low, 292) => PacketType::DeRezAck,
        (crate::PacketFrequency::Low, 293) => PacketType::RezObject,
        (crate::PacketFrequency::Low, 294) => PacketType::RezObjectFromNotecard,
        (crate::PacketFrequency::Low, 295) => PacketType::TransferInventory,
        (crate::PacketFrequency::Low, 296) => PacketType::TransferInventoryAck,
        (crate::PacketFrequency::Low, 297) => PacketType::AcceptFriendship,
        (crate::PacketFrequency::Low, 298) => PacketType::DeclineFriendship,
        (crate::PacketFrequency::Low, 299) => PacketType::FormFriendship,
        (crate::PacketFrequency::Low, 300) => PacketType::TerminateFriendship,
        (crate::PacketFrequency::Low, 301) => PacketType::OfferCallingCard,
        (crate::PacketFrequency::Low, 302) => PacketType::AcceptCallingCard,
        (crate::PacketFrequency::Low, 303) => PacketType::DeclineCallingCard,
        (crate::PacketFrequency::Low, 304) => PacketType::RezScript,
        (crate::PacketFrequency::Low, 305) => PacketType::CreateInventoryItem,
        (crate::PacketFrequency::Low, 306) => PacketType::CreateLandmarkForEvent,
        (crate::PacketFrequency::Low, 307) => PacketType::EventLocationRequest,
        (crate::PacketFrequency::Low, 308) => PacketType::EventLocationReply,
        (crate::PacketFrequency::Low, 309) => PacketType::RegionHandleRequest,
        (crate::PacketFrequency::Low, 310) => PacketType::RegionIDAndHandleReply,
        (crate::PacketFrequency::Low, 311) => PacketType::MoneyTransferRequest,
        (crate::PacketFrequency::Low, 312) => PacketType::MoneyTransferBackend,
        (crate::PacketFrequency::Low, 313) => PacketType::MoneyBalanceRequest,
        (crate::PacketFrequency::Low, 314) => PacketType::MoneyBalanceReply,
        (crate::PacketFrequency::Low, 315) => PacketType::RoutedMoneyBalanceReply,
        (crate::PacketFrequency::Low, 316) => PacketType::ActivateGestures,
        (crate::PacketFrequency::Low, 317) => PacketType::DeactivateGestures,
        (crate::PacketFrequency::Low, 318) => PacketType::MuteListUpdate,
        (crate::PacketFrequency::Low, 319) => PacketType::UseCachedMuteList,
        (crate::PacketFrequency::Low, 320) => PacketType::GrantUserRights,
        (crate::PacketFrequency::Low, 321) => PacketType::ChangeUserRights,
        (crate::PacketFrequency::Low, 322) => PacketType::OnlineNotification,
        (crate::PacketFrequency::Low, 323) => PacketType::OfflineNotification,
        (crate::PacketFrequency::Low, 324) => PacketType::SetStartLocationRequest,
        (crate::PacketFrequency::Low, 325) => PacketType::SetStartLocation,
        (crate::PacketFrequency::Low, 326) => PacketType::NetTest,
        (crate::PacketFrequency::Low, 327) => PacketType::SetCPURatio,
        (crate::PacketFrequency::Low, 328) => PacketType::SimCrashed,
        (crate::PacketFrequency::Low, 329) => PacketType::NameValuePair,
        (crate::PacketFrequency::Low, 330) => PacketType::RemoveNameValuePair,
        (crate::PacketFrequency::Low, 331) => PacketType::UpdateAttachment,
        (crate::PacketFrequency::Low, 332) => PacketType::RemoveAttachment,
        (crate::PacketFrequency::Low, 333) => PacketType::AssetUploadRequest,
        (crate::PacketFrequency::Low, 334) => PacketType::AssetUploadComplete,
        (crate::PacketFrequency::Low, 335) => PacketType::EmailMessageRequest,
        (crate::PacketFrequency::Low, 336) => PacketType::EmailMessageReply,
        (crate::PacketFrequency::Low, 337) => PacketType::ScriptDataRequest,
        (crate::PacketFrequency::Low, 338) => PacketType::ScriptDataReply,
        (crate::PacketFrequency::Low, 339) => PacketType::CreateGroupRequest,
        (crate::PacketFrequency::Low, 340) => PacketType::CreateGroupReply,
        (crate::PacketFrequency::Low, 341) => PacketType::UpdateGroupInfo,
        (crate::PacketFrequency::Low, 342) => PacketType::GroupRoleChanges,
        (crate::PacketFrequency::Low, 343) => PacketType::JoinGroupRequest,
        (crate::PacketFrequency::Low, 344) => PacketType::JoinGroupReply,
        (crate::PacketFrequency::Low, 345) => PacketType::EjectGroupMemberRequest,
        (crate::PacketFrequency::Low, 346) => PacketType::EjectGroupMemberReply,
        (crate::PacketFrequency::Low, 347) => PacketType::LeaveGroupRequest,
        (crate::PacketFrequency::Low, 348) => PacketType::LeaveGroupReply,
        (crate::PacketFrequency::Low, 349) => PacketType::InviteGroupRequest,
        (crate::PacketFrequency::Low, 350) => PacketType::InviteGroupResponse,
        (crate::PacketFrequency::Low, 351) => PacketType::GroupProfileRequest,
        (crate::PacketFrequency::Low, 352) => PacketType::GroupProfileReply,
        (crate::PacketFrequency::Low, 353) => PacketType::GroupAccountSummaryRequest,
        (crate::PacketFrequency::Low, 354) => PacketType::GroupAccountSummaryReply,
        (crate::PacketFrequency::Low, 355) => PacketType::GroupAccountDetailsRequest,
        (crate::PacketFrequency::Low, 356) => PacketType::GroupAccountDetailsReply,
        (crate::PacketFrequency::Low, 357) => PacketType::GroupAccountTransactionsRequest,
        (crate::PacketFrequency::Low, 358) => PacketType::GroupAccountTransactionsReply,
        (crate::PacketFrequency::Low, 359) => PacketType::GroupActiveProposalsRequest,
        (crate::PacketFrequency::Low, 360) => PacketType::GroupActiveProposalItemReply,
        (crate::PacketFrequency::Low, 361) => PacketType::GroupVoteHistoryRequest,
        (crate::PacketFrequency::Low, 362) => PacketType::GroupVoteHistoryItemReply,
        (crate::PacketFrequency::Low, 363) => PacketType::StartGroupProposal,
        (crate::PacketFrequency::Low, 364) => PacketType::GroupProposalBallot,
        (crate::PacketFrequency::Low, 365) => PacketType::TallyVotes,
        (crate::PacketFrequency::Low, 366) => PacketType::GroupMembersRequest,
        (crate::PacketFrequency::Low, 367) => PacketType::GroupMembersReply,
        (crate::PacketFrequency::Low, 368) => PacketType::ActivateGroup,
        (crate::PacketFrequency::Low, 369) => PacketType::SetGroupContribution,
        (crate::PacketFrequency::Low, 370) => PacketType::SetGroupAcceptNotices,
        (crate::PacketFrequency::Low, 371) => PacketType::GroupRoleDataRequest,
        (crate::PacketFrequency::Low, 372) => PacketType::GroupRoleDataReply,
        (crate::PacketFrequency::Low, 373) => PacketType::GroupRoleMembersRequest,
        (crate::PacketFrequency::Low, 374) => PacketType::GroupRoleMembersReply,
        (crate::PacketFrequency::Low, 375) => PacketType::GroupTitlesRequest,
        (crate::PacketFrequency::Low, 376) => PacketType::GroupTitlesReply,
        (crate::PacketFrequency::Low, 377) => PacketType::GroupTitleUpdate,
        (crate::PacketFrequency::Low, 378) => PacketType::GroupRoleUpdate,
        (crate::PacketFrequency::Low, 379) => PacketType::LiveHelpGroupRequest,
        (crate::PacketFrequency::Low, 380) => PacketType::LiveHelpGroupReply,
        (crate::PacketFrequency::Low, 381) => PacketType::AgentWearablesRequest,
        (crate::PacketFrequency::Low, 382) => PacketType::AgentWearablesUpdate,
        (crate::PacketFrequency::Low, 383) => PacketType::AgentIsNowWearing,
        (crate::PacketFrequency::Low, 384) => PacketType::AgentCachedTexture,
        (crate::PacketFrequency::Low, 385) => PacketType::AgentCachedTextureResponse,
        (crate::PacketFrequency::Low, 386) => PacketType::AgentDataUpdateRequest,
        (crate::PacketFrequency::Low, 387) => PacketType::AgentDataUpdate,
        (crate::PacketFrequency::Low, 388) => PacketType::GroupDataUpdate,
        (crate::PacketFrequency::Low, 389) => PacketType::AgentGroupDataUpdate,
        (crate::PacketFrequency::Low, 390) => PacketType::AgentDropGroup,
        (crate::PacketFrequency::Low, 391) => PacketType::LogTextMessage,
        (crate::PacketFrequency::Low, 392) => PacketType::CreateTrustedCircuit,
        (crate::PacketFrequency::Low, 393) => PacketType::DenyTrustedCircuit,
        (crate::PacketFrequency::Low, 394) => PacketType::RequestTrustedCircuit,
        (crate::PacketFrequency::Low, 395) => PacketType::RezSingleAttachmentFromInv,
        (crate::PacketFrequency::Low, 396) => PacketType::RezMultipleAttachmentsFromInv,
        (crate::PacketFrequency::Low, 397) => PacketType::DetachAttachmentIntoInv,
        (crate::PacketFrequency::Low, 398) => PacketType::CreateNewOutfitAttachments,
        (crate::PacketFrequency::Low, 399) => PacketType::UserInfoRequest,
        (crate::PacketFrequency::Low, 400) => PacketType::UserInfoReply,
        (crate::PacketFrequency::Low, 401) => PacketType::UpdateUserInfo,
        (crate::PacketFrequency::Low, 402) => PacketType::ParcelRename,
        (crate::PacketFrequency::Low, 403) => PacketType::InitiateDownload,
        (crate::PacketFrequency::Low, 404) => PacketType::SystemMessage,
        (crate::PacketFrequency::Low, 405) => PacketType::MapLayerRequest,
        (crate::PacketFrequency::Low, 406) => PacketType::MapLayerReply,
        (crate::PacketFrequency::Low, 407) => PacketType::MapBlockRequest,
        (crate::PacketFrequency::Low, 408) => PacketType::MapNameRequest,
        (crate::PacketFrequency::Low, 409) => PacketType::MapBlockReply,
        (crate::PacketFrequency::Low, 410) => PacketType::MapItemRequest,
        (crate::PacketFrequency::Low, 411) => PacketType::MapItemReply,
        (crate::PacketFrequency::Low, 412) => PacketType::SendPostcard,
        (crate::PacketFrequency::Low, 413) => PacketType::RpcChannelRequest,
        (crate::PacketFrequency::Low, 414) => PacketType::RpcChannelReply,
        (crate::PacketFrequency::Low, 415) => PacketType::RpcScriptRequestInbound,
        (crate::PacketFrequency::Low, 416) => PacketType::RpcScriptRequestInboundForward,
        (crate::PacketFrequency::Low, 417) => PacketType::RpcScriptReplyInbound,
        (crate::PacketFrequency::Low, 418) => PacketType::ScriptMailRegistration,
        (crate::PacketFrequency::Low, 419) => PacketType::ParcelMediaCommandMessage,
        (crate::PacketFrequency::Low, 420) => PacketType::ParcelMediaUpdate,
        (crate::PacketFrequency::Low, 421) => PacketType::LandStatRequest,
        (crate::PacketFrequency::Low, 422) => PacketType::LandStatReply,
        (crate::PacketFrequency::Low, 423) => PacketType::Error,
        (crate::PacketFrequency::Low, 424) => PacketType::ObjectIncludeInSearch,
        (crate::PacketFrequency::Low, 425) => PacketType::RezRestoreToWorld,
        (crate::PacketFrequency::Low, 426) => PacketType::LinkInventoryItem,
        (crate::PacketFrequency::Low, 427) => PacketType::RetrieveIMsExtended,
        (crate::PacketFrequency::Low, 428) => PacketType::JoinGroupRequestExtended,
        (crate::PacketFrequency::Low, 429) => PacketType::CreateGroupRequestExtended,
        (crate::PacketFrequency::Medium, 1) => PacketType::ObjectAdd,
        (crate::PacketFrequency::Medium, 2) => PacketType::MultipleObjectUpdate,
        (crate::PacketFrequency::Medium, 3) => PacketType::RequestMultipleObjects,
        (crate::PacketFrequency::Medium, 4) => PacketType::ObjectPosition,
        (crate::PacketFrequency::Medium, 5) => PacketType::RequestObjectPropertiesFamily,
        (crate::PacketFrequency::Medium, 6) => PacketType::CoarseLocationUpdate,
        (crate::PacketFrequency::Medium, 7) => PacketType::CrossedRegion,
        (crate::PacketFrequency::Medium, 8) => PacketType::ConfirmEnableSimulator,
        (crate::PacketFrequency::Medium, 9) => PacketType::ObjectProperties,
        (crate::PacketFrequency::Medium, 10) => PacketType::ObjectPropertiesFamily,
        (crate::PacketFrequency::Medium, 11) => PacketType::ParcelPropertiesRequest,
        (crate::PacketFrequency::Medium, 12) => PacketType::SimStatus,
        (crate::PacketFrequency::Medium, 13) => PacketType::AttachedSound,
        (crate::PacketFrequency::Medium, 14) => PacketType::AttachedSoundGainChange,
        (crate::PacketFrequency::Medium, 15) => PacketType::PreloadSound,
        (crate::PacketFrequency::Medium, 16) => PacketType::InternalScriptMail,
        (crate::PacketFrequency::Medium, 17) => PacketType::ViewerEffect,
        (crate::PacketFrequency::High, 1) => PacketType::StartPingCheck,
        (crate::PacketFrequency::High, 2) => PacketType::CompletePingCheck,
        (crate::PacketFrequency::High, 3) => PacketType::NeighborList,
        (crate::PacketFrequency::High, 4) => PacketType::AgentUpdate,
        (crate::PacketFrequency::High, 5) => PacketType::AgentAnimation,
        (crate::PacketFrequency::High, 6) => PacketType::AgentRequestSit,
        (crate::PacketFrequency::High, 7) => PacketType::AgentSit,
        (crate::PacketFrequency::High, 8) => PacketType::RequestImage,
        (crate::PacketFrequency::High, 9) => PacketType::ImageData,
        (crate::PacketFrequency::High, 10) => PacketType::ImagePacket,
        (crate::PacketFrequency::High, 11) => PacketType::LayerData,
        (crate::PacketFrequency::High, 12) => PacketType::ObjectUpdate,
        (crate::PacketFrequency::High, 13) => PacketType::ObjectUpdateCompressed,
        (crate::PacketFrequency::High, 14) => PacketType::ObjectUpdateCached,
        (crate::PacketFrequency::High, 15) => PacketType::ImprovedTerseObjectUpdate,
        (crate::PacketFrequency::High, 16) => PacketType::KillObject,
        (crate::PacketFrequency::High, 17) => PacketType::TransferPacket,
        (crate::PacketFrequency::High, 18) => PacketType::SendXferPacket,
        (crate::PacketFrequency::High, 19) => PacketType::ConfirmXferPacket,
        (crate::PacketFrequency::High, 20) => PacketType::AvatarAnimation,
        (crate::PacketFrequency::High, 21) => PacketType::AvatarSitResponse,
        (crate::PacketFrequency::High, 22) => PacketType::CameraConstraint,
        (crate::PacketFrequency::High, 23) => PacketType::ParcelProperties,
        (crate::PacketFrequency::High, 24) => PacketType::EdgeDataPacket,
        (crate::PacketFrequency::High, 25) => PacketType::ChildAgentUpdate,
        (crate::PacketFrequency::High, 26) => PacketType::ChildAgentAlive,
        (crate::PacketFrequency::High, 27) => PacketType::ChildAgentPositionUpdate,
        (crate::PacketFrequency::High, 28) => PacketType::AtomicPassObject,
        (crate::PacketFrequency::High, 31) => PacketType::GenericStreamingMessage,
        (crate::PacketFrequency::High, 29) => PacketType::SoundTrigger,
        (crate::PacketFrequency::High, 30) => PacketType::ObjectAnimation,
        (crate::PacketFrequency::High, 32) => PacketType::GameControlInput,
        _ => PacketType::Default,
    }
}
#[must_use]
#[allow(clippy::too_many_lines)]
pub fn descriptor_by_type(packet_type: PacketType) -> Option<&'static PacketDescriptor> {
    match packet_type {
        PacketType::TestMessage => Some(&PACKETS[0]),
        PacketType::PacketAck => Some(&PACKETS[1]),
        PacketType::OpenCircuit => Some(&PACKETS[2]),
        PacketType::CloseCircuit => Some(&PACKETS[3]),
        PacketType::AddCircuitCode => Some(&PACKETS[4]),
        PacketType::UseCircuitCode => Some(&PACKETS[5]),
        PacketType::AvatarTextureUpdate => Some(&PACKETS[6]),
        PacketType::SimulatorMapUpdate => Some(&PACKETS[7]),
        PacketType::SimulatorSetMap => Some(&PACKETS[8]),
        PacketType::SubscribeLoad => Some(&PACKETS[9]),
        PacketType::UnsubscribeLoad => Some(&PACKETS[10]),
        PacketType::SimulatorReady => Some(&PACKETS[11]),
        PacketType::TelehubInfo => Some(&PACKETS[12]),
        PacketType::SimulatorPresentAtLocation => Some(&PACKETS[13]),
        PacketType::SimulatorLoad => Some(&PACKETS[14]),
        PacketType::SimulatorShutdownRequest => Some(&PACKETS[15]),
        PacketType::RegionPresenceRequestByRegionID => Some(&PACKETS[16]),
        PacketType::RegionPresenceRequestByHandle => Some(&PACKETS[17]),
        PacketType::RegionPresenceResponse => Some(&PACKETS[18]),
        PacketType::UpdateSimulator => Some(&PACKETS[19]),
        PacketType::LogDwellTime => Some(&PACKETS[20]),
        PacketType::FeatureDisabled => Some(&PACKETS[21]),
        PacketType::LogFailedMoneyTransaction => Some(&PACKETS[22]),
        PacketType::UserReportInternal => Some(&PACKETS[23]),
        PacketType::SetSimStatusInDatabase => Some(&PACKETS[24]),
        PacketType::SetSimPresenceInDatabase => Some(&PACKETS[25]),
        PacketType::EconomyDataRequest => Some(&PACKETS[26]),
        PacketType::EconomyData => Some(&PACKETS[27]),
        PacketType::AvatarPickerRequest => Some(&PACKETS[28]),
        PacketType::AvatarPickerRequestBackend => Some(&PACKETS[29]),
        PacketType::AvatarPickerReply => Some(&PACKETS[30]),
        PacketType::PlacesQuery => Some(&PACKETS[31]),
        PacketType::PlacesReply => Some(&PACKETS[32]),
        PacketType::DirFindQuery => Some(&PACKETS[33]),
        PacketType::DirFindQueryBackend => Some(&PACKETS[34]),
        PacketType::DirPlacesQuery => Some(&PACKETS[35]),
        PacketType::DirPlacesQueryBackend => Some(&PACKETS[36]),
        PacketType::DirPlacesReply => Some(&PACKETS[37]),
        PacketType::DirPeopleReply => Some(&PACKETS[38]),
        PacketType::DirEventsReply => Some(&PACKETS[39]),
        PacketType::DirGroupsReply => Some(&PACKETS[40]),
        PacketType::DirClassifiedQuery => Some(&PACKETS[41]),
        PacketType::DirClassifiedQueryBackend => Some(&PACKETS[42]),
        PacketType::DirClassifiedReply => Some(&PACKETS[43]),
        PacketType::AvatarClassifiedReply => Some(&PACKETS[44]),
        PacketType::ClassifiedInfoRequest => Some(&PACKETS[45]),
        PacketType::ClassifiedInfoReply => Some(&PACKETS[46]),
        PacketType::ClassifiedInfoUpdate => Some(&PACKETS[47]),
        PacketType::ClassifiedDelete => Some(&PACKETS[48]),
        PacketType::ClassifiedGodDelete => Some(&PACKETS[49]),
        PacketType::DirLandQuery => Some(&PACKETS[50]),
        PacketType::DirLandQueryBackend => Some(&PACKETS[51]),
        PacketType::DirLandReply => Some(&PACKETS[52]),
        PacketType::DirPopularQuery => Some(&PACKETS[53]),
        PacketType::DirPopularQueryBackend => Some(&PACKETS[54]),
        PacketType::DirPopularReply => Some(&PACKETS[55]),
        PacketType::ParcelInfoRequest => Some(&PACKETS[56]),
        PacketType::ParcelInfoReply => Some(&PACKETS[57]),
        PacketType::ParcelObjectOwnersRequest => Some(&PACKETS[58]),
        PacketType::ParcelObjectOwnersReply => Some(&PACKETS[59]),
        PacketType::GroupNoticesListRequest => Some(&PACKETS[60]),
        PacketType::GroupNoticesListReply => Some(&PACKETS[61]),
        PacketType::GroupNoticeRequest => Some(&PACKETS[62]),
        PacketType::GroupNoticeAdd => Some(&PACKETS[63]),
        PacketType::TeleportRequest => Some(&PACKETS[64]),
        PacketType::TeleportLocationRequest => Some(&PACKETS[65]),
        PacketType::TeleportLocal => Some(&PACKETS[66]),
        PacketType::TeleportLandmarkRequest => Some(&PACKETS[67]),
        PacketType::TeleportProgress => Some(&PACKETS[68]),
        PacketType::DataHomeLocationRequest => Some(&PACKETS[69]),
        PacketType::DataHomeLocationReply => Some(&PACKETS[70]),
        PacketType::TeleportFinish => Some(&PACKETS[71]),
        PacketType::StartLure => Some(&PACKETS[72]),
        PacketType::TeleportLureRequest => Some(&PACKETS[73]),
        PacketType::TeleportCancel => Some(&PACKETS[74]),
        PacketType::TeleportStart => Some(&PACKETS[75]),
        PacketType::TeleportFailed => Some(&PACKETS[76]),
        PacketType::Undo => Some(&PACKETS[77]),
        PacketType::Redo => Some(&PACKETS[78]),
        PacketType::UndoLand => Some(&PACKETS[79]),
        PacketType::AgentPause => Some(&PACKETS[80]),
        PacketType::AgentResume => Some(&PACKETS[81]),
        PacketType::ChatFromViewer => Some(&PACKETS[82]),
        PacketType::AgentThrottle => Some(&PACKETS[83]),
        PacketType::AgentFOV => Some(&PACKETS[84]),
        PacketType::AgentHeightWidth => Some(&PACKETS[85]),
        PacketType::AgentSetAppearance => Some(&PACKETS[86]),
        PacketType::AgentQuitCopy => Some(&PACKETS[87]),
        PacketType::ImageNotInDatabase => Some(&PACKETS[88]),
        PacketType::RebakeAvatarTextures => Some(&PACKETS[89]),
        PacketType::SetAlwaysRun => Some(&PACKETS[90]),
        PacketType::ObjectDelete => Some(&PACKETS[91]),
        PacketType::ObjectDuplicate => Some(&PACKETS[92]),
        PacketType::ObjectDuplicateOnRay => Some(&PACKETS[93]),
        PacketType::ObjectScale => Some(&PACKETS[94]),
        PacketType::ObjectRotation => Some(&PACKETS[95]),
        PacketType::ObjectFlagUpdate => Some(&PACKETS[96]),
        PacketType::ObjectClickAction => Some(&PACKETS[97]),
        PacketType::ObjectImage => Some(&PACKETS[98]),
        PacketType::ObjectBypassModUpdate => Some(&PACKETS[99]),
        PacketType::ObjectMaterial => Some(&PACKETS[100]),
        PacketType::ObjectShape => Some(&PACKETS[101]),
        PacketType::ObjectExtraParams => Some(&PACKETS[102]),
        PacketType::ObjectOwner => Some(&PACKETS[103]),
        PacketType::ObjectGroup => Some(&PACKETS[104]),
        PacketType::ObjectBuy => Some(&PACKETS[105]),
        PacketType::BuyObjectInventory => Some(&PACKETS[106]),
        PacketType::DerezContainer => Some(&PACKETS[107]),
        PacketType::ObjectPermissions => Some(&PACKETS[108]),
        PacketType::ObjectSaleInfo => Some(&PACKETS[109]),
        PacketType::ObjectName => Some(&PACKETS[110]),
        PacketType::ObjectDescription => Some(&PACKETS[111]),
        PacketType::ObjectCategory => Some(&PACKETS[112]),
        PacketType::ObjectSelect => Some(&PACKETS[113]),
        PacketType::ObjectDeselect => Some(&PACKETS[114]),
        PacketType::ObjectAttach => Some(&PACKETS[115]),
        PacketType::ObjectDetach => Some(&PACKETS[116]),
        PacketType::ObjectDrop => Some(&PACKETS[117]),
        PacketType::ObjectLink => Some(&PACKETS[118]),
        PacketType::ObjectDelink => Some(&PACKETS[119]),
        PacketType::ObjectGrab => Some(&PACKETS[120]),
        PacketType::ObjectGrabUpdate => Some(&PACKETS[121]),
        PacketType::ObjectDeGrab => Some(&PACKETS[122]),
        PacketType::ObjectSpinStart => Some(&PACKETS[123]),
        PacketType::ObjectSpinUpdate => Some(&PACKETS[124]),
        PacketType::ObjectSpinStop => Some(&PACKETS[125]),
        PacketType::ObjectExportSelected => Some(&PACKETS[126]),
        PacketType::ModifyLand => Some(&PACKETS[127]),
        PacketType::VelocityInterpolateOn => Some(&PACKETS[128]),
        PacketType::VelocityInterpolateOff => Some(&PACKETS[129]),
        PacketType::StateSave => Some(&PACKETS[130]),
        PacketType::ReportAutosaveCrash => Some(&PACKETS[131]),
        PacketType::SimWideDeletes => Some(&PACKETS[132]),
        PacketType::TrackAgent => Some(&PACKETS[133]),
        PacketType::ViewerStats => Some(&PACKETS[134]),
        PacketType::ScriptAnswerYes => Some(&PACKETS[135]),
        PacketType::UserReport => Some(&PACKETS[136]),
        PacketType::AlertMessage => Some(&PACKETS[137]),
        PacketType::AgentAlertMessage => Some(&PACKETS[138]),
        PacketType::MeanCollisionAlert => Some(&PACKETS[139]),
        PacketType::ViewerFrozenMessage => Some(&PACKETS[140]),
        PacketType::HealthMessage => Some(&PACKETS[141]),
        PacketType::ChatFromSimulator => Some(&PACKETS[142]),
        PacketType::SimStats => Some(&PACKETS[143]),
        PacketType::RequestRegionInfo => Some(&PACKETS[144]),
        PacketType::RegionInfo => Some(&PACKETS[145]),
        PacketType::GodUpdateRegionInfo => Some(&PACKETS[146]),
        PacketType::NearestLandingRegionRequest => Some(&PACKETS[147]),
        PacketType::NearestLandingRegionReply => Some(&PACKETS[148]),
        PacketType::NearestLandingRegionUpdated => Some(&PACKETS[149]),
        PacketType::TeleportLandingStatusChanged => Some(&PACKETS[150]),
        PacketType::RegionHandshake => Some(&PACKETS[151]),
        PacketType::RegionHandshakeReply => Some(&PACKETS[152]),
        PacketType::SimulatorViewerTimeMessage => Some(&PACKETS[153]),
        PacketType::EnableSimulator => Some(&PACKETS[154]),
        PacketType::DisableSimulator => Some(&PACKETS[155]),
        PacketType::TransferRequest => Some(&PACKETS[156]),
        PacketType::TransferInfo => Some(&PACKETS[157]),
        PacketType::TransferAbort => Some(&PACKETS[158]),
        PacketType::RequestXfer => Some(&PACKETS[159]),
        PacketType::AbortXfer => Some(&PACKETS[160]),
        PacketType::AvatarAppearance => Some(&PACKETS[161]),
        PacketType::SetFollowCamProperties => Some(&PACKETS[162]),
        PacketType::ClearFollowCamProperties => Some(&PACKETS[163]),
        PacketType::RequestPayPrice => Some(&PACKETS[164]),
        PacketType::PayPriceReply => Some(&PACKETS[165]),
        PacketType::KickUser => Some(&PACKETS[166]),
        PacketType::KickUserAck => Some(&PACKETS[167]),
        PacketType::GodKickUser => Some(&PACKETS[168]),
        PacketType::SystemKickUser => Some(&PACKETS[169]),
        PacketType::EjectUser => Some(&PACKETS[170]),
        PacketType::FreezeUser => Some(&PACKETS[171]),
        PacketType::AvatarPropertiesRequest => Some(&PACKETS[172]),
        PacketType::AvatarPropertiesRequestBackend => Some(&PACKETS[173]),
        PacketType::AvatarPropertiesReply => Some(&PACKETS[174]),
        PacketType::AvatarInterestsReply => Some(&PACKETS[175]),
        PacketType::AvatarGroupsReply => Some(&PACKETS[176]),
        PacketType::AvatarPropertiesUpdate => Some(&PACKETS[177]),
        PacketType::AvatarInterestsUpdate => Some(&PACKETS[178]),
        PacketType::AvatarNotesReply => Some(&PACKETS[179]),
        PacketType::AvatarNotesUpdate => Some(&PACKETS[180]),
        PacketType::AvatarPicksReply => Some(&PACKETS[181]),
        PacketType::EventInfoRequest => Some(&PACKETS[182]),
        PacketType::EventInfoReply => Some(&PACKETS[183]),
        PacketType::EventNotificationAddRequest => Some(&PACKETS[184]),
        PacketType::EventNotificationRemoveRequest => Some(&PACKETS[185]),
        PacketType::EventGodDelete => Some(&PACKETS[186]),
        PacketType::PickInfoReply => Some(&PACKETS[187]),
        PacketType::PickInfoUpdate => Some(&PACKETS[188]),
        PacketType::PickDelete => Some(&PACKETS[189]),
        PacketType::PickGodDelete => Some(&PACKETS[190]),
        PacketType::ScriptQuestion => Some(&PACKETS[191]),
        PacketType::ScriptControlChange => Some(&PACKETS[192]),
        PacketType::ScriptDialog => Some(&PACKETS[193]),
        PacketType::ScriptDialogReply => Some(&PACKETS[194]),
        PacketType::ForceScriptControlRelease => Some(&PACKETS[195]),
        PacketType::RevokePermissions => Some(&PACKETS[196]),
        PacketType::LoadURL => Some(&PACKETS[197]),
        PacketType::ScriptTeleportRequest => Some(&PACKETS[198]),
        PacketType::ParcelOverlay => Some(&PACKETS[199]),
        PacketType::ParcelPropertiesRequestByID => Some(&PACKETS[200]),
        PacketType::ParcelPropertiesUpdate => Some(&PACKETS[201]),
        PacketType::ParcelReturnObjects => Some(&PACKETS[202]),
        PacketType::ParcelSetOtherCleanTime => Some(&PACKETS[203]),
        PacketType::ParcelDisableObjects => Some(&PACKETS[204]),
        PacketType::ParcelSelectObjects => Some(&PACKETS[205]),
        PacketType::EstateCovenantRequest => Some(&PACKETS[206]),
        PacketType::EstateCovenantReply => Some(&PACKETS[207]),
        PacketType::ForceObjectSelect => Some(&PACKETS[208]),
        PacketType::ParcelBuyPass => Some(&PACKETS[209]),
        PacketType::ParcelDeedToGroup => Some(&PACKETS[210]),
        PacketType::ParcelReclaim => Some(&PACKETS[211]),
        PacketType::ParcelClaim => Some(&PACKETS[212]),
        PacketType::ParcelJoin => Some(&PACKETS[213]),
        PacketType::ParcelDivide => Some(&PACKETS[214]),
        PacketType::ParcelRelease => Some(&PACKETS[215]),
        PacketType::ParcelBuy => Some(&PACKETS[216]),
        PacketType::ParcelGodForceOwner => Some(&PACKETS[217]),
        PacketType::ParcelAccessListRequest => Some(&PACKETS[218]),
        PacketType::ParcelAccessListReply => Some(&PACKETS[219]),
        PacketType::ParcelAccessListUpdate => Some(&PACKETS[220]),
        PacketType::ParcelDwellRequest => Some(&PACKETS[221]),
        PacketType::ParcelDwellReply => Some(&PACKETS[222]),
        PacketType::RequestParcelTransfer => Some(&PACKETS[223]),
        PacketType::UpdateParcel => Some(&PACKETS[224]),
        PacketType::RemoveParcel => Some(&PACKETS[225]),
        PacketType::MergeParcel => Some(&PACKETS[226]),
        PacketType::LogParcelChanges => Some(&PACKETS[227]),
        PacketType::CheckParcelSales => Some(&PACKETS[228]),
        PacketType::ParcelSales => Some(&PACKETS[229]),
        PacketType::ParcelGodMarkAsContent => Some(&PACKETS[230]),
        PacketType::ViewerStartAuction => Some(&PACKETS[231]),
        PacketType::StartAuction => Some(&PACKETS[232]),
        PacketType::ConfirmAuctionStart => Some(&PACKETS[233]),
        PacketType::CompleteAuction => Some(&PACKETS[234]),
        PacketType::CancelAuction => Some(&PACKETS[235]),
        PacketType::CheckParcelAuctions => Some(&PACKETS[236]),
        PacketType::ParcelAuctions => Some(&PACKETS[237]),
        PacketType::UUIDNameRequest => Some(&PACKETS[238]),
        PacketType::UUIDNameReply => Some(&PACKETS[239]),
        PacketType::UUIDGroupNameRequest => Some(&PACKETS[240]),
        PacketType::UUIDGroupNameReply => Some(&PACKETS[241]),
        PacketType::ChatPass => Some(&PACKETS[242]),
        PacketType::ChildAgentDying => Some(&PACKETS[243]),
        PacketType::ChildAgentUnknown => Some(&PACKETS[244]),
        PacketType::KillChildAgents => Some(&PACKETS[245]),
        PacketType::GetScriptRunning => Some(&PACKETS[246]),
        PacketType::ScriptRunningReply => Some(&PACKETS[247]),
        PacketType::SetScriptRunning => Some(&PACKETS[248]),
        PacketType::ScriptReset => Some(&PACKETS[249]),
        PacketType::ScriptSensorRequest => Some(&PACKETS[250]),
        PacketType::ScriptSensorReply => Some(&PACKETS[251]),
        PacketType::CompleteAgentMovement => Some(&PACKETS[252]),
        PacketType::AgentMovementComplete => Some(&PACKETS[253]),
        PacketType::DataServerLogout => Some(&PACKETS[254]),
        PacketType::LogoutRequest => Some(&PACKETS[255]),
        PacketType::LogoutReply => Some(&PACKETS[256]),
        PacketType::ImprovedInstantMessage => Some(&PACKETS[257]),
        PacketType::RetrieveInstantMessages => Some(&PACKETS[258]),
        PacketType::FindAgent => Some(&PACKETS[259]),
        PacketType::RequestGodlikePowers => Some(&PACKETS[260]),
        PacketType::GrantGodlikePowers => Some(&PACKETS[261]),
        PacketType::GodlikeMessage => Some(&PACKETS[262]),
        PacketType::EstateOwnerMessage => Some(&PACKETS[263]),
        PacketType::GenericMessage => Some(&PACKETS[264]),
        PacketType::LargeGenericMessage => Some(&PACKETS[265]),
        PacketType::MuteListRequest => Some(&PACKETS[266]),
        PacketType::UpdateMuteListEntry => Some(&PACKETS[267]),
        PacketType::RemoveMuteListEntry => Some(&PACKETS[268]),
        PacketType::CopyInventoryFromNotecard => Some(&PACKETS[269]),
        PacketType::UpdateInventoryItem => Some(&PACKETS[270]),
        PacketType::UpdateCreateInventoryItem => Some(&PACKETS[271]),
        PacketType::MoveInventoryItem => Some(&PACKETS[272]),
        PacketType::CopyInventoryItem => Some(&PACKETS[273]),
        PacketType::RemoveInventoryItem => Some(&PACKETS[274]),
        PacketType::ChangeInventoryItemFlags => Some(&PACKETS[275]),
        PacketType::SaveAssetIntoInventory => Some(&PACKETS[276]),
        PacketType::CreateInventoryFolder => Some(&PACKETS[277]),
        PacketType::UpdateInventoryFolder => Some(&PACKETS[278]),
        PacketType::MoveInventoryFolder => Some(&PACKETS[279]),
        PacketType::RemoveInventoryFolder => Some(&PACKETS[280]),
        PacketType::FetchInventoryDescendents => Some(&PACKETS[281]),
        PacketType::InventoryDescendents => Some(&PACKETS[282]),
        PacketType::FetchInventory => Some(&PACKETS[283]),
        PacketType::FetchInventoryReply => Some(&PACKETS[284]),
        PacketType::BulkUpdateInventory => Some(&PACKETS[285]),
        PacketType::RequestInventoryAsset => Some(&PACKETS[286]),
        PacketType::InventoryAssetResponse => Some(&PACKETS[287]),
        PacketType::RemoveInventoryObjects => Some(&PACKETS[288]),
        PacketType::PurgeInventoryDescendents => Some(&PACKETS[289]),
        PacketType::UpdateTaskInventory => Some(&PACKETS[290]),
        PacketType::RemoveTaskInventory => Some(&PACKETS[291]),
        PacketType::MoveTaskInventory => Some(&PACKETS[292]),
        PacketType::RequestTaskInventory => Some(&PACKETS[293]),
        PacketType::ReplyTaskInventory => Some(&PACKETS[294]),
        PacketType::DeRezObject => Some(&PACKETS[295]),
        PacketType::DeRezAck => Some(&PACKETS[296]),
        PacketType::RezObject => Some(&PACKETS[297]),
        PacketType::RezObjectFromNotecard => Some(&PACKETS[298]),
        PacketType::TransferInventory => Some(&PACKETS[299]),
        PacketType::TransferInventoryAck => Some(&PACKETS[300]),
        PacketType::AcceptFriendship => Some(&PACKETS[301]),
        PacketType::DeclineFriendship => Some(&PACKETS[302]),
        PacketType::FormFriendship => Some(&PACKETS[303]),
        PacketType::TerminateFriendship => Some(&PACKETS[304]),
        PacketType::OfferCallingCard => Some(&PACKETS[305]),
        PacketType::AcceptCallingCard => Some(&PACKETS[306]),
        PacketType::DeclineCallingCard => Some(&PACKETS[307]),
        PacketType::RezScript => Some(&PACKETS[308]),
        PacketType::CreateInventoryItem => Some(&PACKETS[309]),
        PacketType::CreateLandmarkForEvent => Some(&PACKETS[310]),
        PacketType::EventLocationRequest => Some(&PACKETS[311]),
        PacketType::EventLocationReply => Some(&PACKETS[312]),
        PacketType::RegionHandleRequest => Some(&PACKETS[313]),
        PacketType::RegionIDAndHandleReply => Some(&PACKETS[314]),
        PacketType::MoneyTransferRequest => Some(&PACKETS[315]),
        PacketType::MoneyTransferBackend => Some(&PACKETS[316]),
        PacketType::MoneyBalanceRequest => Some(&PACKETS[317]),
        PacketType::MoneyBalanceReply => Some(&PACKETS[318]),
        PacketType::RoutedMoneyBalanceReply => Some(&PACKETS[319]),
        PacketType::ActivateGestures => Some(&PACKETS[320]),
        PacketType::DeactivateGestures => Some(&PACKETS[321]),
        PacketType::MuteListUpdate => Some(&PACKETS[322]),
        PacketType::UseCachedMuteList => Some(&PACKETS[323]),
        PacketType::GrantUserRights => Some(&PACKETS[324]),
        PacketType::ChangeUserRights => Some(&PACKETS[325]),
        PacketType::OnlineNotification => Some(&PACKETS[326]),
        PacketType::OfflineNotification => Some(&PACKETS[327]),
        PacketType::SetStartLocationRequest => Some(&PACKETS[328]),
        PacketType::SetStartLocation => Some(&PACKETS[329]),
        PacketType::NetTest => Some(&PACKETS[330]),
        PacketType::SetCPURatio => Some(&PACKETS[331]),
        PacketType::SimCrashed => Some(&PACKETS[332]),
        PacketType::NameValuePair => Some(&PACKETS[333]),
        PacketType::RemoveNameValuePair => Some(&PACKETS[334]),
        PacketType::UpdateAttachment => Some(&PACKETS[335]),
        PacketType::RemoveAttachment => Some(&PACKETS[336]),
        PacketType::AssetUploadRequest => Some(&PACKETS[337]),
        PacketType::AssetUploadComplete => Some(&PACKETS[338]),
        PacketType::EmailMessageRequest => Some(&PACKETS[339]),
        PacketType::EmailMessageReply => Some(&PACKETS[340]),
        PacketType::ScriptDataRequest => Some(&PACKETS[341]),
        PacketType::ScriptDataReply => Some(&PACKETS[342]),
        PacketType::CreateGroupRequest => Some(&PACKETS[343]),
        PacketType::CreateGroupReply => Some(&PACKETS[344]),
        PacketType::UpdateGroupInfo => Some(&PACKETS[345]),
        PacketType::GroupRoleChanges => Some(&PACKETS[346]),
        PacketType::JoinGroupRequest => Some(&PACKETS[347]),
        PacketType::JoinGroupReply => Some(&PACKETS[348]),
        PacketType::EjectGroupMemberRequest => Some(&PACKETS[349]),
        PacketType::EjectGroupMemberReply => Some(&PACKETS[350]),
        PacketType::LeaveGroupRequest => Some(&PACKETS[351]),
        PacketType::LeaveGroupReply => Some(&PACKETS[352]),
        PacketType::InviteGroupRequest => Some(&PACKETS[353]),
        PacketType::InviteGroupResponse => Some(&PACKETS[354]),
        PacketType::GroupProfileRequest => Some(&PACKETS[355]),
        PacketType::GroupProfileReply => Some(&PACKETS[356]),
        PacketType::GroupAccountSummaryRequest => Some(&PACKETS[357]),
        PacketType::GroupAccountSummaryReply => Some(&PACKETS[358]),
        PacketType::GroupAccountDetailsRequest => Some(&PACKETS[359]),
        PacketType::GroupAccountDetailsReply => Some(&PACKETS[360]),
        PacketType::GroupAccountTransactionsRequest => Some(&PACKETS[361]),
        PacketType::GroupAccountTransactionsReply => Some(&PACKETS[362]),
        PacketType::GroupActiveProposalsRequest => Some(&PACKETS[363]),
        PacketType::GroupActiveProposalItemReply => Some(&PACKETS[364]),
        PacketType::GroupVoteHistoryRequest => Some(&PACKETS[365]),
        PacketType::GroupVoteHistoryItemReply => Some(&PACKETS[366]),
        PacketType::StartGroupProposal => Some(&PACKETS[367]),
        PacketType::GroupProposalBallot => Some(&PACKETS[368]),
        PacketType::TallyVotes => Some(&PACKETS[369]),
        PacketType::GroupMembersRequest => Some(&PACKETS[370]),
        PacketType::GroupMembersReply => Some(&PACKETS[371]),
        PacketType::ActivateGroup => Some(&PACKETS[372]),
        PacketType::SetGroupContribution => Some(&PACKETS[373]),
        PacketType::SetGroupAcceptNotices => Some(&PACKETS[374]),
        PacketType::GroupRoleDataRequest => Some(&PACKETS[375]),
        PacketType::GroupRoleDataReply => Some(&PACKETS[376]),
        PacketType::GroupRoleMembersRequest => Some(&PACKETS[377]),
        PacketType::GroupRoleMembersReply => Some(&PACKETS[378]),
        PacketType::GroupTitlesRequest => Some(&PACKETS[379]),
        PacketType::GroupTitlesReply => Some(&PACKETS[380]),
        PacketType::GroupTitleUpdate => Some(&PACKETS[381]),
        PacketType::GroupRoleUpdate => Some(&PACKETS[382]),
        PacketType::LiveHelpGroupRequest => Some(&PACKETS[383]),
        PacketType::LiveHelpGroupReply => Some(&PACKETS[384]),
        PacketType::AgentWearablesRequest => Some(&PACKETS[385]),
        PacketType::AgentWearablesUpdate => Some(&PACKETS[386]),
        PacketType::AgentIsNowWearing => Some(&PACKETS[387]),
        PacketType::AgentCachedTexture => Some(&PACKETS[388]),
        PacketType::AgentCachedTextureResponse => Some(&PACKETS[389]),
        PacketType::AgentDataUpdateRequest => Some(&PACKETS[390]),
        PacketType::AgentDataUpdate => Some(&PACKETS[391]),
        PacketType::GroupDataUpdate => Some(&PACKETS[392]),
        PacketType::AgentGroupDataUpdate => Some(&PACKETS[393]),
        PacketType::AgentDropGroup => Some(&PACKETS[394]),
        PacketType::LogTextMessage => Some(&PACKETS[395]),
        PacketType::CreateTrustedCircuit => Some(&PACKETS[396]),
        PacketType::DenyTrustedCircuit => Some(&PACKETS[397]),
        PacketType::RequestTrustedCircuit => Some(&PACKETS[398]),
        PacketType::RezSingleAttachmentFromInv => Some(&PACKETS[399]),
        PacketType::RezMultipleAttachmentsFromInv => Some(&PACKETS[400]),
        PacketType::DetachAttachmentIntoInv => Some(&PACKETS[401]),
        PacketType::CreateNewOutfitAttachments => Some(&PACKETS[402]),
        PacketType::UserInfoRequest => Some(&PACKETS[403]),
        PacketType::UserInfoReply => Some(&PACKETS[404]),
        PacketType::UpdateUserInfo => Some(&PACKETS[405]),
        PacketType::ParcelRename => Some(&PACKETS[406]),
        PacketType::InitiateDownload => Some(&PACKETS[407]),
        PacketType::SystemMessage => Some(&PACKETS[408]),
        PacketType::MapLayerRequest => Some(&PACKETS[409]),
        PacketType::MapLayerReply => Some(&PACKETS[410]),
        PacketType::MapBlockRequest => Some(&PACKETS[411]),
        PacketType::MapNameRequest => Some(&PACKETS[412]),
        PacketType::MapBlockReply => Some(&PACKETS[413]),
        PacketType::MapItemRequest => Some(&PACKETS[414]),
        PacketType::MapItemReply => Some(&PACKETS[415]),
        PacketType::SendPostcard => Some(&PACKETS[416]),
        PacketType::RpcChannelRequest => Some(&PACKETS[417]),
        PacketType::RpcChannelReply => Some(&PACKETS[418]),
        PacketType::RpcScriptRequestInbound => Some(&PACKETS[419]),
        PacketType::RpcScriptRequestInboundForward => Some(&PACKETS[420]),
        PacketType::RpcScriptReplyInbound => Some(&PACKETS[421]),
        PacketType::ScriptMailRegistration => Some(&PACKETS[422]),
        PacketType::ParcelMediaCommandMessage => Some(&PACKETS[423]),
        PacketType::ParcelMediaUpdate => Some(&PACKETS[424]),
        PacketType::LandStatRequest => Some(&PACKETS[425]),
        PacketType::LandStatReply => Some(&PACKETS[426]),
        PacketType::Error => Some(&PACKETS[427]),
        PacketType::ObjectIncludeInSearch => Some(&PACKETS[428]),
        PacketType::RezRestoreToWorld => Some(&PACKETS[429]),
        PacketType::LinkInventoryItem => Some(&PACKETS[430]),
        PacketType::RetrieveIMsExtended => Some(&PACKETS[431]),
        PacketType::JoinGroupRequestExtended => Some(&PACKETS[432]),
        PacketType::CreateGroupRequestExtended => Some(&PACKETS[433]),
        PacketType::ObjectAdd => Some(&PACKETS[434]),
        PacketType::MultipleObjectUpdate => Some(&PACKETS[435]),
        PacketType::RequestMultipleObjects => Some(&PACKETS[436]),
        PacketType::ObjectPosition => Some(&PACKETS[437]),
        PacketType::RequestObjectPropertiesFamily => Some(&PACKETS[438]),
        PacketType::CoarseLocationUpdate => Some(&PACKETS[439]),
        PacketType::CrossedRegion => Some(&PACKETS[440]),
        PacketType::ConfirmEnableSimulator => Some(&PACKETS[441]),
        PacketType::ObjectProperties => Some(&PACKETS[442]),
        PacketType::ObjectPropertiesFamily => Some(&PACKETS[443]),
        PacketType::ParcelPropertiesRequest => Some(&PACKETS[444]),
        PacketType::SimStatus => Some(&PACKETS[445]),
        PacketType::AttachedSound => Some(&PACKETS[446]),
        PacketType::AttachedSoundGainChange => Some(&PACKETS[447]),
        PacketType::PreloadSound => Some(&PACKETS[448]),
        PacketType::InternalScriptMail => Some(&PACKETS[449]),
        PacketType::ViewerEffect => Some(&PACKETS[450]),
        PacketType::StartPingCheck => Some(&PACKETS[451]),
        PacketType::CompletePingCheck => Some(&PACKETS[452]),
        PacketType::NeighborList => Some(&PACKETS[453]),
        PacketType::AgentUpdate => Some(&PACKETS[454]),
        PacketType::AgentAnimation => Some(&PACKETS[455]),
        PacketType::AgentRequestSit => Some(&PACKETS[456]),
        PacketType::AgentSit => Some(&PACKETS[457]),
        PacketType::RequestImage => Some(&PACKETS[458]),
        PacketType::ImageData => Some(&PACKETS[459]),
        PacketType::ImagePacket => Some(&PACKETS[460]),
        PacketType::LayerData => Some(&PACKETS[461]),
        PacketType::ObjectUpdate => Some(&PACKETS[462]),
        PacketType::ObjectUpdateCompressed => Some(&PACKETS[463]),
        PacketType::ObjectUpdateCached => Some(&PACKETS[464]),
        PacketType::ImprovedTerseObjectUpdate => Some(&PACKETS[465]),
        PacketType::KillObject => Some(&PACKETS[466]),
        PacketType::TransferPacket => Some(&PACKETS[467]),
        PacketType::SendXferPacket => Some(&PACKETS[468]),
        PacketType::ConfirmXferPacket => Some(&PACKETS[469]),
        PacketType::AvatarAnimation => Some(&PACKETS[470]),
        PacketType::AvatarSitResponse => Some(&PACKETS[471]),
        PacketType::CameraConstraint => Some(&PACKETS[472]),
        PacketType::ParcelProperties => Some(&PACKETS[473]),
        PacketType::EdgeDataPacket => Some(&PACKETS[474]),
        PacketType::ChildAgentUpdate => Some(&PACKETS[475]),
        PacketType::ChildAgentAlive => Some(&PACKETS[476]),
        PacketType::ChildAgentPositionUpdate => Some(&PACKETS[477]),
        PacketType::AtomicPassObject => Some(&PACKETS[478]),
        PacketType::GenericStreamingMessage => Some(&PACKETS[479]),
        PacketType::SoundTrigger => Some(&PACKETS[480]),
        PacketType::ObjectAnimation => Some(&PACKETS[481]),
        PacketType::GameControlInput => Some(&PACKETS[482]),
        PacketType::Default => None,
    }
}
#[must_use]
#[allow(clippy::too_many_lines)]
pub fn descriptor_by_name(name: &str) -> Option<&'static PacketDescriptor> {
    match name {
        "TestMessage" => Some(&PACKETS[0]),
        "PacketAck" => Some(&PACKETS[1]),
        "OpenCircuit" => Some(&PACKETS[2]),
        "CloseCircuit" => Some(&PACKETS[3]),
        "AddCircuitCode" => Some(&PACKETS[4]),
        "UseCircuitCode" => Some(&PACKETS[5]),
        "AvatarTextureUpdate" => Some(&PACKETS[6]),
        "SimulatorMapUpdate" => Some(&PACKETS[7]),
        "SimulatorSetMap" => Some(&PACKETS[8]),
        "SubscribeLoad" => Some(&PACKETS[9]),
        "UnsubscribeLoad" => Some(&PACKETS[10]),
        "SimulatorReady" => Some(&PACKETS[11]),
        "TelehubInfo" => Some(&PACKETS[12]),
        "SimulatorPresentAtLocation" => Some(&PACKETS[13]),
        "SimulatorLoad" => Some(&PACKETS[14]),
        "SimulatorShutdownRequest" => Some(&PACKETS[15]),
        "RegionPresenceRequestByRegionID" => Some(&PACKETS[16]),
        "RegionPresenceRequestByHandle" => Some(&PACKETS[17]),
        "RegionPresenceResponse" => Some(&PACKETS[18]),
        "UpdateSimulator" => Some(&PACKETS[19]),
        "LogDwellTime" => Some(&PACKETS[20]),
        "FeatureDisabled" => Some(&PACKETS[21]),
        "LogFailedMoneyTransaction" => Some(&PACKETS[22]),
        "UserReportInternal" => Some(&PACKETS[23]),
        "SetSimStatusInDatabase" => Some(&PACKETS[24]),
        "SetSimPresenceInDatabase" => Some(&PACKETS[25]),
        "EconomyDataRequest" => Some(&PACKETS[26]),
        "EconomyData" => Some(&PACKETS[27]),
        "AvatarPickerRequest" => Some(&PACKETS[28]),
        "AvatarPickerRequestBackend" => Some(&PACKETS[29]),
        "AvatarPickerReply" => Some(&PACKETS[30]),
        "PlacesQuery" => Some(&PACKETS[31]),
        "PlacesReply" => Some(&PACKETS[32]),
        "DirFindQuery" => Some(&PACKETS[33]),
        "DirFindQueryBackend" => Some(&PACKETS[34]),
        "DirPlacesQuery" => Some(&PACKETS[35]),
        "DirPlacesQueryBackend" => Some(&PACKETS[36]),
        "DirPlacesReply" => Some(&PACKETS[37]),
        "DirPeopleReply" => Some(&PACKETS[38]),
        "DirEventsReply" => Some(&PACKETS[39]),
        "DirGroupsReply" => Some(&PACKETS[40]),
        "DirClassifiedQuery" => Some(&PACKETS[41]),
        "DirClassifiedQueryBackend" => Some(&PACKETS[42]),
        "DirClassifiedReply" => Some(&PACKETS[43]),
        "AvatarClassifiedReply" => Some(&PACKETS[44]),
        "ClassifiedInfoRequest" => Some(&PACKETS[45]),
        "ClassifiedInfoReply" => Some(&PACKETS[46]),
        "ClassifiedInfoUpdate" => Some(&PACKETS[47]),
        "ClassifiedDelete" => Some(&PACKETS[48]),
        "ClassifiedGodDelete" => Some(&PACKETS[49]),
        "DirLandQuery" => Some(&PACKETS[50]),
        "DirLandQueryBackend" => Some(&PACKETS[51]),
        "DirLandReply" => Some(&PACKETS[52]),
        "DirPopularQuery" => Some(&PACKETS[53]),
        "DirPopularQueryBackend" => Some(&PACKETS[54]),
        "DirPopularReply" => Some(&PACKETS[55]),
        "ParcelInfoRequest" => Some(&PACKETS[56]),
        "ParcelInfoReply" => Some(&PACKETS[57]),
        "ParcelObjectOwnersRequest" => Some(&PACKETS[58]),
        "ParcelObjectOwnersReply" => Some(&PACKETS[59]),
        "GroupNoticesListRequest" => Some(&PACKETS[60]),
        "GroupNoticesListReply" => Some(&PACKETS[61]),
        "GroupNoticeRequest" => Some(&PACKETS[62]),
        "GroupNoticeAdd" => Some(&PACKETS[63]),
        "TeleportRequest" => Some(&PACKETS[64]),
        "TeleportLocationRequest" => Some(&PACKETS[65]),
        "TeleportLocal" => Some(&PACKETS[66]),
        "TeleportLandmarkRequest" => Some(&PACKETS[67]),
        "TeleportProgress" => Some(&PACKETS[68]),
        "DataHomeLocationRequest" => Some(&PACKETS[69]),
        "DataHomeLocationReply" => Some(&PACKETS[70]),
        "TeleportFinish" => Some(&PACKETS[71]),
        "StartLure" => Some(&PACKETS[72]),
        "TeleportLureRequest" => Some(&PACKETS[73]),
        "TeleportCancel" => Some(&PACKETS[74]),
        "TeleportStart" => Some(&PACKETS[75]),
        "TeleportFailed" => Some(&PACKETS[76]),
        "Undo" => Some(&PACKETS[77]),
        "Redo" => Some(&PACKETS[78]),
        "UndoLand" => Some(&PACKETS[79]),
        "AgentPause" => Some(&PACKETS[80]),
        "AgentResume" => Some(&PACKETS[81]),
        "ChatFromViewer" => Some(&PACKETS[82]),
        "AgentThrottle" => Some(&PACKETS[83]),
        "AgentFOV" => Some(&PACKETS[84]),
        "AgentHeightWidth" => Some(&PACKETS[85]),
        "AgentSetAppearance" => Some(&PACKETS[86]),
        "AgentQuitCopy" => Some(&PACKETS[87]),
        "ImageNotInDatabase" => Some(&PACKETS[88]),
        "RebakeAvatarTextures" => Some(&PACKETS[89]),
        "SetAlwaysRun" => Some(&PACKETS[90]),
        "ObjectDelete" => Some(&PACKETS[91]),
        "ObjectDuplicate" => Some(&PACKETS[92]),
        "ObjectDuplicateOnRay" => Some(&PACKETS[93]),
        "ObjectScale" => Some(&PACKETS[94]),
        "ObjectRotation" => Some(&PACKETS[95]),
        "ObjectFlagUpdate" => Some(&PACKETS[96]),
        "ObjectClickAction" => Some(&PACKETS[97]),
        "ObjectImage" => Some(&PACKETS[98]),
        "ObjectBypassModUpdate" => Some(&PACKETS[99]),
        "ObjectMaterial" => Some(&PACKETS[100]),
        "ObjectShape" => Some(&PACKETS[101]),
        "ObjectExtraParams" => Some(&PACKETS[102]),
        "ObjectOwner" => Some(&PACKETS[103]),
        "ObjectGroup" => Some(&PACKETS[104]),
        "ObjectBuy" => Some(&PACKETS[105]),
        "BuyObjectInventory" => Some(&PACKETS[106]),
        "DerezContainer" => Some(&PACKETS[107]),
        "ObjectPermissions" => Some(&PACKETS[108]),
        "ObjectSaleInfo" => Some(&PACKETS[109]),
        "ObjectName" => Some(&PACKETS[110]),
        "ObjectDescription" => Some(&PACKETS[111]),
        "ObjectCategory" => Some(&PACKETS[112]),
        "ObjectSelect" => Some(&PACKETS[113]),
        "ObjectDeselect" => Some(&PACKETS[114]),
        "ObjectAttach" => Some(&PACKETS[115]),
        "ObjectDetach" => Some(&PACKETS[116]),
        "ObjectDrop" => Some(&PACKETS[117]),
        "ObjectLink" => Some(&PACKETS[118]),
        "ObjectDelink" => Some(&PACKETS[119]),
        "ObjectGrab" => Some(&PACKETS[120]),
        "ObjectGrabUpdate" => Some(&PACKETS[121]),
        "ObjectDeGrab" => Some(&PACKETS[122]),
        "ObjectSpinStart" => Some(&PACKETS[123]),
        "ObjectSpinUpdate" => Some(&PACKETS[124]),
        "ObjectSpinStop" => Some(&PACKETS[125]),
        "ObjectExportSelected" => Some(&PACKETS[126]),
        "ModifyLand" => Some(&PACKETS[127]),
        "VelocityInterpolateOn" => Some(&PACKETS[128]),
        "VelocityInterpolateOff" => Some(&PACKETS[129]),
        "StateSave" => Some(&PACKETS[130]),
        "ReportAutosaveCrash" => Some(&PACKETS[131]),
        "SimWideDeletes" => Some(&PACKETS[132]),
        "TrackAgent" => Some(&PACKETS[133]),
        "ViewerStats" => Some(&PACKETS[134]),
        "ScriptAnswerYes" => Some(&PACKETS[135]),
        "UserReport" => Some(&PACKETS[136]),
        "AlertMessage" => Some(&PACKETS[137]),
        "AgentAlertMessage" => Some(&PACKETS[138]),
        "MeanCollisionAlert" => Some(&PACKETS[139]),
        "ViewerFrozenMessage" => Some(&PACKETS[140]),
        "HealthMessage" => Some(&PACKETS[141]),
        "ChatFromSimulator" => Some(&PACKETS[142]),
        "SimStats" => Some(&PACKETS[143]),
        "RequestRegionInfo" => Some(&PACKETS[144]),
        "RegionInfo" => Some(&PACKETS[145]),
        "GodUpdateRegionInfo" => Some(&PACKETS[146]),
        "NearestLandingRegionRequest" => Some(&PACKETS[147]),
        "NearestLandingRegionReply" => Some(&PACKETS[148]),
        "NearestLandingRegionUpdated" => Some(&PACKETS[149]),
        "TeleportLandingStatusChanged" => Some(&PACKETS[150]),
        "RegionHandshake" => Some(&PACKETS[151]),
        "RegionHandshakeReply" => Some(&PACKETS[152]),
        "SimulatorViewerTimeMessage" => Some(&PACKETS[153]),
        "EnableSimulator" => Some(&PACKETS[154]),
        "DisableSimulator" => Some(&PACKETS[155]),
        "TransferRequest" => Some(&PACKETS[156]),
        "TransferInfo" => Some(&PACKETS[157]),
        "TransferAbort" => Some(&PACKETS[158]),
        "RequestXfer" => Some(&PACKETS[159]),
        "AbortXfer" => Some(&PACKETS[160]),
        "AvatarAppearance" => Some(&PACKETS[161]),
        "SetFollowCamProperties" => Some(&PACKETS[162]),
        "ClearFollowCamProperties" => Some(&PACKETS[163]),
        "RequestPayPrice" => Some(&PACKETS[164]),
        "PayPriceReply" => Some(&PACKETS[165]),
        "KickUser" => Some(&PACKETS[166]),
        "KickUserAck" => Some(&PACKETS[167]),
        "GodKickUser" => Some(&PACKETS[168]),
        "SystemKickUser" => Some(&PACKETS[169]),
        "EjectUser" => Some(&PACKETS[170]),
        "FreezeUser" => Some(&PACKETS[171]),
        "AvatarPropertiesRequest" => Some(&PACKETS[172]),
        "AvatarPropertiesRequestBackend" => Some(&PACKETS[173]),
        "AvatarPropertiesReply" => Some(&PACKETS[174]),
        "AvatarInterestsReply" => Some(&PACKETS[175]),
        "AvatarGroupsReply" => Some(&PACKETS[176]),
        "AvatarPropertiesUpdate" => Some(&PACKETS[177]),
        "AvatarInterestsUpdate" => Some(&PACKETS[178]),
        "AvatarNotesReply" => Some(&PACKETS[179]),
        "AvatarNotesUpdate" => Some(&PACKETS[180]),
        "AvatarPicksReply" => Some(&PACKETS[181]),
        "EventInfoRequest" => Some(&PACKETS[182]),
        "EventInfoReply" => Some(&PACKETS[183]),
        "EventNotificationAddRequest" => Some(&PACKETS[184]),
        "EventNotificationRemoveRequest" => Some(&PACKETS[185]),
        "EventGodDelete" => Some(&PACKETS[186]),
        "PickInfoReply" => Some(&PACKETS[187]),
        "PickInfoUpdate" => Some(&PACKETS[188]),
        "PickDelete" => Some(&PACKETS[189]),
        "PickGodDelete" => Some(&PACKETS[190]),
        "ScriptQuestion" => Some(&PACKETS[191]),
        "ScriptControlChange" => Some(&PACKETS[192]),
        "ScriptDialog" => Some(&PACKETS[193]),
        "ScriptDialogReply" => Some(&PACKETS[194]),
        "ForceScriptControlRelease" => Some(&PACKETS[195]),
        "RevokePermissions" => Some(&PACKETS[196]),
        "LoadURL" => Some(&PACKETS[197]),
        "ScriptTeleportRequest" => Some(&PACKETS[198]),
        "ParcelOverlay" => Some(&PACKETS[199]),
        "ParcelPropertiesRequestByID" => Some(&PACKETS[200]),
        "ParcelPropertiesUpdate" => Some(&PACKETS[201]),
        "ParcelReturnObjects" => Some(&PACKETS[202]),
        "ParcelSetOtherCleanTime" => Some(&PACKETS[203]),
        "ParcelDisableObjects" => Some(&PACKETS[204]),
        "ParcelSelectObjects" => Some(&PACKETS[205]),
        "EstateCovenantRequest" => Some(&PACKETS[206]),
        "EstateCovenantReply" => Some(&PACKETS[207]),
        "ForceObjectSelect" => Some(&PACKETS[208]),
        "ParcelBuyPass" => Some(&PACKETS[209]),
        "ParcelDeedToGroup" => Some(&PACKETS[210]),
        "ParcelReclaim" => Some(&PACKETS[211]),
        "ParcelClaim" => Some(&PACKETS[212]),
        "ParcelJoin" => Some(&PACKETS[213]),
        "ParcelDivide" => Some(&PACKETS[214]),
        "ParcelRelease" => Some(&PACKETS[215]),
        "ParcelBuy" => Some(&PACKETS[216]),
        "ParcelGodForceOwner" => Some(&PACKETS[217]),
        "ParcelAccessListRequest" => Some(&PACKETS[218]),
        "ParcelAccessListReply" => Some(&PACKETS[219]),
        "ParcelAccessListUpdate" => Some(&PACKETS[220]),
        "ParcelDwellRequest" => Some(&PACKETS[221]),
        "ParcelDwellReply" => Some(&PACKETS[222]),
        "RequestParcelTransfer" => Some(&PACKETS[223]),
        "UpdateParcel" => Some(&PACKETS[224]),
        "RemoveParcel" => Some(&PACKETS[225]),
        "MergeParcel" => Some(&PACKETS[226]),
        "LogParcelChanges" => Some(&PACKETS[227]),
        "CheckParcelSales" => Some(&PACKETS[228]),
        "ParcelSales" => Some(&PACKETS[229]),
        "ParcelGodMarkAsContent" => Some(&PACKETS[230]),
        "ViewerStartAuction" => Some(&PACKETS[231]),
        "StartAuction" => Some(&PACKETS[232]),
        "ConfirmAuctionStart" => Some(&PACKETS[233]),
        "CompleteAuction" => Some(&PACKETS[234]),
        "CancelAuction" => Some(&PACKETS[235]),
        "CheckParcelAuctions" => Some(&PACKETS[236]),
        "ParcelAuctions" => Some(&PACKETS[237]),
        "UUIDNameRequest" => Some(&PACKETS[238]),
        "UUIDNameReply" => Some(&PACKETS[239]),
        "UUIDGroupNameRequest" => Some(&PACKETS[240]),
        "UUIDGroupNameReply" => Some(&PACKETS[241]),
        "ChatPass" => Some(&PACKETS[242]),
        "ChildAgentDying" => Some(&PACKETS[243]),
        "ChildAgentUnknown" => Some(&PACKETS[244]),
        "KillChildAgents" => Some(&PACKETS[245]),
        "GetScriptRunning" => Some(&PACKETS[246]),
        "ScriptRunningReply" => Some(&PACKETS[247]),
        "SetScriptRunning" => Some(&PACKETS[248]),
        "ScriptReset" => Some(&PACKETS[249]),
        "ScriptSensorRequest" => Some(&PACKETS[250]),
        "ScriptSensorReply" => Some(&PACKETS[251]),
        "CompleteAgentMovement" => Some(&PACKETS[252]),
        "AgentMovementComplete" => Some(&PACKETS[253]),
        "DataServerLogout" => Some(&PACKETS[254]),
        "LogoutRequest" => Some(&PACKETS[255]),
        "LogoutReply" => Some(&PACKETS[256]),
        "ImprovedInstantMessage" => Some(&PACKETS[257]),
        "RetrieveInstantMessages" => Some(&PACKETS[258]),
        "FindAgent" => Some(&PACKETS[259]),
        "RequestGodlikePowers" => Some(&PACKETS[260]),
        "GrantGodlikePowers" => Some(&PACKETS[261]),
        "GodlikeMessage" => Some(&PACKETS[262]),
        "EstateOwnerMessage" => Some(&PACKETS[263]),
        "GenericMessage" => Some(&PACKETS[264]),
        "LargeGenericMessage" => Some(&PACKETS[265]),
        "MuteListRequest" => Some(&PACKETS[266]),
        "UpdateMuteListEntry" => Some(&PACKETS[267]),
        "RemoveMuteListEntry" => Some(&PACKETS[268]),
        "CopyInventoryFromNotecard" => Some(&PACKETS[269]),
        "UpdateInventoryItem" => Some(&PACKETS[270]),
        "UpdateCreateInventoryItem" => Some(&PACKETS[271]),
        "MoveInventoryItem" => Some(&PACKETS[272]),
        "CopyInventoryItem" => Some(&PACKETS[273]),
        "RemoveInventoryItem" => Some(&PACKETS[274]),
        "ChangeInventoryItemFlags" => Some(&PACKETS[275]),
        "SaveAssetIntoInventory" => Some(&PACKETS[276]),
        "CreateInventoryFolder" => Some(&PACKETS[277]),
        "UpdateInventoryFolder" => Some(&PACKETS[278]),
        "MoveInventoryFolder" => Some(&PACKETS[279]),
        "RemoveInventoryFolder" => Some(&PACKETS[280]),
        "FetchInventoryDescendents" => Some(&PACKETS[281]),
        "InventoryDescendents" => Some(&PACKETS[282]),
        "FetchInventory" => Some(&PACKETS[283]),
        "FetchInventoryReply" => Some(&PACKETS[284]),
        "BulkUpdateInventory" => Some(&PACKETS[285]),
        "RequestInventoryAsset" => Some(&PACKETS[286]),
        "InventoryAssetResponse" => Some(&PACKETS[287]),
        "RemoveInventoryObjects" => Some(&PACKETS[288]),
        "PurgeInventoryDescendents" => Some(&PACKETS[289]),
        "UpdateTaskInventory" => Some(&PACKETS[290]),
        "RemoveTaskInventory" => Some(&PACKETS[291]),
        "MoveTaskInventory" => Some(&PACKETS[292]),
        "RequestTaskInventory" => Some(&PACKETS[293]),
        "ReplyTaskInventory" => Some(&PACKETS[294]),
        "DeRezObject" => Some(&PACKETS[295]),
        "DeRezAck" => Some(&PACKETS[296]),
        "RezObject" => Some(&PACKETS[297]),
        "RezObjectFromNotecard" => Some(&PACKETS[298]),
        "TransferInventory" => Some(&PACKETS[299]),
        "TransferInventoryAck" => Some(&PACKETS[300]),
        "AcceptFriendship" => Some(&PACKETS[301]),
        "DeclineFriendship" => Some(&PACKETS[302]),
        "FormFriendship" => Some(&PACKETS[303]),
        "TerminateFriendship" => Some(&PACKETS[304]),
        "OfferCallingCard" => Some(&PACKETS[305]),
        "AcceptCallingCard" => Some(&PACKETS[306]),
        "DeclineCallingCard" => Some(&PACKETS[307]),
        "RezScript" => Some(&PACKETS[308]),
        "CreateInventoryItem" => Some(&PACKETS[309]),
        "CreateLandmarkForEvent" => Some(&PACKETS[310]),
        "EventLocationRequest" => Some(&PACKETS[311]),
        "EventLocationReply" => Some(&PACKETS[312]),
        "RegionHandleRequest" => Some(&PACKETS[313]),
        "RegionIDAndHandleReply" => Some(&PACKETS[314]),
        "MoneyTransferRequest" => Some(&PACKETS[315]),
        "MoneyTransferBackend" => Some(&PACKETS[316]),
        "MoneyBalanceRequest" => Some(&PACKETS[317]),
        "MoneyBalanceReply" => Some(&PACKETS[318]),
        "RoutedMoneyBalanceReply" => Some(&PACKETS[319]),
        "ActivateGestures" => Some(&PACKETS[320]),
        "DeactivateGestures" => Some(&PACKETS[321]),
        "MuteListUpdate" => Some(&PACKETS[322]),
        "UseCachedMuteList" => Some(&PACKETS[323]),
        "GrantUserRights" => Some(&PACKETS[324]),
        "ChangeUserRights" => Some(&PACKETS[325]),
        "OnlineNotification" => Some(&PACKETS[326]),
        "OfflineNotification" => Some(&PACKETS[327]),
        "SetStartLocationRequest" => Some(&PACKETS[328]),
        "SetStartLocation" => Some(&PACKETS[329]),
        "NetTest" => Some(&PACKETS[330]),
        "SetCPURatio" => Some(&PACKETS[331]),
        "SimCrashed" => Some(&PACKETS[332]),
        "NameValuePair" => Some(&PACKETS[333]),
        "RemoveNameValuePair" => Some(&PACKETS[334]),
        "UpdateAttachment" => Some(&PACKETS[335]),
        "RemoveAttachment" => Some(&PACKETS[336]),
        "AssetUploadRequest" => Some(&PACKETS[337]),
        "AssetUploadComplete" => Some(&PACKETS[338]),
        "EmailMessageRequest" => Some(&PACKETS[339]),
        "EmailMessageReply" => Some(&PACKETS[340]),
        "ScriptDataRequest" => Some(&PACKETS[341]),
        "ScriptDataReply" => Some(&PACKETS[342]),
        "CreateGroupRequest" => Some(&PACKETS[343]),
        "CreateGroupReply" => Some(&PACKETS[344]),
        "UpdateGroupInfo" => Some(&PACKETS[345]),
        "GroupRoleChanges" => Some(&PACKETS[346]),
        "JoinGroupRequest" => Some(&PACKETS[347]),
        "JoinGroupReply" => Some(&PACKETS[348]),
        "EjectGroupMemberRequest" => Some(&PACKETS[349]),
        "EjectGroupMemberReply" => Some(&PACKETS[350]),
        "LeaveGroupRequest" => Some(&PACKETS[351]),
        "LeaveGroupReply" => Some(&PACKETS[352]),
        "InviteGroupRequest" => Some(&PACKETS[353]),
        "InviteGroupResponse" => Some(&PACKETS[354]),
        "GroupProfileRequest" => Some(&PACKETS[355]),
        "GroupProfileReply" => Some(&PACKETS[356]),
        "GroupAccountSummaryRequest" => Some(&PACKETS[357]),
        "GroupAccountSummaryReply" => Some(&PACKETS[358]),
        "GroupAccountDetailsRequest" => Some(&PACKETS[359]),
        "GroupAccountDetailsReply" => Some(&PACKETS[360]),
        "GroupAccountTransactionsRequest" => Some(&PACKETS[361]),
        "GroupAccountTransactionsReply" => Some(&PACKETS[362]),
        "GroupActiveProposalsRequest" => Some(&PACKETS[363]),
        "GroupActiveProposalItemReply" => Some(&PACKETS[364]),
        "GroupVoteHistoryRequest" => Some(&PACKETS[365]),
        "GroupVoteHistoryItemReply" => Some(&PACKETS[366]),
        "StartGroupProposal" => Some(&PACKETS[367]),
        "GroupProposalBallot" => Some(&PACKETS[368]),
        "TallyVotes" => Some(&PACKETS[369]),
        "GroupMembersRequest" => Some(&PACKETS[370]),
        "GroupMembersReply" => Some(&PACKETS[371]),
        "ActivateGroup" => Some(&PACKETS[372]),
        "SetGroupContribution" => Some(&PACKETS[373]),
        "SetGroupAcceptNotices" => Some(&PACKETS[374]),
        "GroupRoleDataRequest" => Some(&PACKETS[375]),
        "GroupRoleDataReply" => Some(&PACKETS[376]),
        "GroupRoleMembersRequest" => Some(&PACKETS[377]),
        "GroupRoleMembersReply" => Some(&PACKETS[378]),
        "GroupTitlesRequest" => Some(&PACKETS[379]),
        "GroupTitlesReply" => Some(&PACKETS[380]),
        "GroupTitleUpdate" => Some(&PACKETS[381]),
        "GroupRoleUpdate" => Some(&PACKETS[382]),
        "LiveHelpGroupRequest" => Some(&PACKETS[383]),
        "LiveHelpGroupReply" => Some(&PACKETS[384]),
        "AgentWearablesRequest" => Some(&PACKETS[385]),
        "AgentWearablesUpdate" => Some(&PACKETS[386]),
        "AgentIsNowWearing" => Some(&PACKETS[387]),
        "AgentCachedTexture" => Some(&PACKETS[388]),
        "AgentCachedTextureResponse" => Some(&PACKETS[389]),
        "AgentDataUpdateRequest" => Some(&PACKETS[390]),
        "AgentDataUpdate" => Some(&PACKETS[391]),
        "GroupDataUpdate" => Some(&PACKETS[392]),
        "AgentGroupDataUpdate" => Some(&PACKETS[393]),
        "AgentDropGroup" => Some(&PACKETS[394]),
        "LogTextMessage" => Some(&PACKETS[395]),
        "CreateTrustedCircuit" => Some(&PACKETS[396]),
        "DenyTrustedCircuit" => Some(&PACKETS[397]),
        "RequestTrustedCircuit" => Some(&PACKETS[398]),
        "RezSingleAttachmentFromInv" => Some(&PACKETS[399]),
        "RezMultipleAttachmentsFromInv" => Some(&PACKETS[400]),
        "DetachAttachmentIntoInv" => Some(&PACKETS[401]),
        "CreateNewOutfitAttachments" => Some(&PACKETS[402]),
        "UserInfoRequest" => Some(&PACKETS[403]),
        "UserInfoReply" => Some(&PACKETS[404]),
        "UpdateUserInfo" => Some(&PACKETS[405]),
        "ParcelRename" => Some(&PACKETS[406]),
        "InitiateDownload" => Some(&PACKETS[407]),
        "SystemMessage" => Some(&PACKETS[408]),
        "MapLayerRequest" => Some(&PACKETS[409]),
        "MapLayerReply" => Some(&PACKETS[410]),
        "MapBlockRequest" => Some(&PACKETS[411]),
        "MapNameRequest" => Some(&PACKETS[412]),
        "MapBlockReply" => Some(&PACKETS[413]),
        "MapItemRequest" => Some(&PACKETS[414]),
        "MapItemReply" => Some(&PACKETS[415]),
        "SendPostcard" => Some(&PACKETS[416]),
        "RpcChannelRequest" => Some(&PACKETS[417]),
        "RpcChannelReply" => Some(&PACKETS[418]),
        "RpcScriptRequestInbound" => Some(&PACKETS[419]),
        "RpcScriptRequestInboundForward" => Some(&PACKETS[420]),
        "RpcScriptReplyInbound" => Some(&PACKETS[421]),
        "ScriptMailRegistration" => Some(&PACKETS[422]),
        "ParcelMediaCommandMessage" => Some(&PACKETS[423]),
        "ParcelMediaUpdate" => Some(&PACKETS[424]),
        "LandStatRequest" => Some(&PACKETS[425]),
        "LandStatReply" => Some(&PACKETS[426]),
        "Error" => Some(&PACKETS[427]),
        "ObjectIncludeInSearch" => Some(&PACKETS[428]),
        "RezRestoreToWorld" => Some(&PACKETS[429]),
        "LinkInventoryItem" => Some(&PACKETS[430]),
        "RetrieveIMsExtended" => Some(&PACKETS[431]),
        "JoinGroupRequestExtended" => Some(&PACKETS[432]),
        "CreateGroupRequestExtended" => Some(&PACKETS[433]),
        "ObjectAdd" => Some(&PACKETS[434]),
        "MultipleObjectUpdate" => Some(&PACKETS[435]),
        "RequestMultipleObjects" => Some(&PACKETS[436]),
        "ObjectPosition" => Some(&PACKETS[437]),
        "RequestObjectPropertiesFamily" => Some(&PACKETS[438]),
        "CoarseLocationUpdate" => Some(&PACKETS[439]),
        "CrossedRegion" => Some(&PACKETS[440]),
        "ConfirmEnableSimulator" => Some(&PACKETS[441]),
        "ObjectProperties" => Some(&PACKETS[442]),
        "ObjectPropertiesFamily" => Some(&PACKETS[443]),
        "ParcelPropertiesRequest" => Some(&PACKETS[444]),
        "SimStatus" => Some(&PACKETS[445]),
        "AttachedSound" => Some(&PACKETS[446]),
        "AttachedSoundGainChange" => Some(&PACKETS[447]),
        "PreloadSound" => Some(&PACKETS[448]),
        "InternalScriptMail" => Some(&PACKETS[449]),
        "ViewerEffect" => Some(&PACKETS[450]),
        "StartPingCheck" => Some(&PACKETS[451]),
        "CompletePingCheck" => Some(&PACKETS[452]),
        "NeighborList" => Some(&PACKETS[453]),
        "AgentUpdate" => Some(&PACKETS[454]),
        "AgentAnimation" => Some(&PACKETS[455]),
        "AgentRequestSit" => Some(&PACKETS[456]),
        "AgentSit" => Some(&PACKETS[457]),
        "RequestImage" => Some(&PACKETS[458]),
        "ImageData" => Some(&PACKETS[459]),
        "ImagePacket" => Some(&PACKETS[460]),
        "LayerData" => Some(&PACKETS[461]),
        "ObjectUpdate" => Some(&PACKETS[462]),
        "ObjectUpdateCompressed" => Some(&PACKETS[463]),
        "ObjectUpdateCached" => Some(&PACKETS[464]),
        "ImprovedTerseObjectUpdate" => Some(&PACKETS[465]),
        "KillObject" => Some(&PACKETS[466]),
        "TransferPacket" => Some(&PACKETS[467]),
        "SendXferPacket" => Some(&PACKETS[468]),
        "ConfirmXferPacket" => Some(&PACKETS[469]),
        "AvatarAnimation" => Some(&PACKETS[470]),
        "AvatarSitResponse" => Some(&PACKETS[471]),
        "CameraConstraint" => Some(&PACKETS[472]),
        "ParcelProperties" => Some(&PACKETS[473]),
        "EdgeDataPacket" => Some(&PACKETS[474]),
        "ChildAgentUpdate" => Some(&PACKETS[475]),
        "ChildAgentAlive" => Some(&PACKETS[476]),
        "ChildAgentPositionUpdate" => Some(&PACKETS[477]),
        "AtomicPassObject" => Some(&PACKETS[478]),
        "GenericStreamingMessage" => Some(&PACKETS[479]),
        "SoundTrigger" => Some(&PACKETS[480]),
        "ObjectAnimation" => Some(&PACKETS[481]),
        "GameControlInput" => Some(&PACKETS[482]),
        _ => None,
    }
}
pub(crate) fn build_packet(
    packet_type: PacketType,
) -> Result<crate::packets::Packet, crate::Error> {
    let descriptor = descriptor_by_type(packet_type)
        .ok_or(crate::Error::InvalidOperation)?;
    Ok(crate::packets::Packet {
        has_variable_blocks: descriptor
            .blocks
            .iter()
            .any(|block| matches!(block.repetition, BlockRepetition::Variable)),
        header: new_header(descriptor.frequency, descriptor.id, descriptor.zerocoded),
        type_: packet_type,
    })
}
pub(crate) const fn new_header(
    frequency: crate::PacketFrequency,
    id: u16,
    zerocoded: bool,
) -> crate::packets::Header {
    crate::packets::Header {
        ack_list: None,
        appended_acks: false,
        frequency,
        id,
        reliable: true,
        resent: false,
        sequence: 0,
        zerocoded,
    }
}
fn usize_to_i32(value: usize) -> i32 {
    i32::try_from(value).unwrap_or(i32::MAX)
}
fn osd_u32(value: &libremetaverse_structured_data::OSD) -> Result<u32, crate::Error> {
    let bytes = value.as_binary()?;
    Ok(
        bytes
            .get(..4)
            .and_then(|value| value.try_into().ok())
            .map_or(0, u32::from_le_bytes),
    )
}
fn osd_u64(value: &libremetaverse_structured_data::OSD) -> Result<u64, crate::Error> {
    let bytes = value.as_binary()?;
    Ok(
        bytes
            .get(..8)
            .and_then(|value| value.try_into().ok())
            .map_or(0, u64::from_le_bytes),
    )
}
pub(crate) fn empty_packet_osd() -> Result<
    libremetaverse_structured_data::OSDMap,
    crate::Error,
> {
    libremetaverse_structured_data::OSDMap::new_with_constructor()
}
pub(crate) fn ignore_packet_osd(
    body: &libremetaverse_structured_data::OSDMap,
) -> Result<(), crate::Error> {
    let _ = body;
    Ok(())
}
pub(crate) trait GeneratedBlock: Sized {
    fn new_generated() -> Self;
    fn generated_length(&self) -> i32;
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error>;
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error>;
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error>;
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error>;
    fn new_from_bytes(bytes: &[u8], position: &mut i32) -> Result<Self, crate::Error> {
        let mut value = Self::new_generated();
        Self::decode_from_bytes(&mut value, bytes, position)?;
        Ok(value)
    }
    fn decode_from_bytes(
        &mut self,
        bytes: &[u8],
        position: &mut i32,
    ) -> Result<(), crate::Error> {
        if *position < 0 {
            return Err(crate::Error::Argument);
        }
        let start = usize::try_from(*position).map_err(|_| crate::Error::Argument)?;
        let mut reader = crate::packet_wire::WireReader::new(bytes, start, bytes.len())?;
        self.decode_payload(&mut reader)?;
        reader.commit_position(position)
    }
    fn encode_to_slice(
        &self,
        bytes: &mut [u8],
        position: &mut i32,
    ) -> Result<(), crate::Error> {
        if *position < 0 {
            return Err(crate::Error::Argument);
        }
        let start = usize::try_from(*position).map_err(|_| crate::Error::Argument)?;
        let capacity = usize::try_from(self.generated_length())
            .map_err(|_| crate::Error::Argument)?;
        let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
        self.encode_payload(&mut writer)?;
        let encoded = writer.into_inner();
        let end = start.checked_add(encoded.len()).ok_or(crate::Error::Argument)?;
        if end > bytes.len() {
            return Err(crate::Error::IndexOutOfRange);
        }
        bytes[start..end].copy_from_slice(&encoded);
        *position = i32::try_from(end).map_err(|_| crate::Error::Argument)?;
        Ok(())
    }
}
pub(crate) trait GeneratedPacket: Sized {
    const USES_BUFFER_POOLING: bool;
    fn new_generated() -> Self;
    fn generated_length(&self) -> i32;
    fn generated_header(&self) -> crate::packets::Header;
    fn store_header(&mut self, header: crate::packets::Header);
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error>;
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error>;
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error>;
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error>;
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error>;
    fn encode_packet(&self) -> Result<Vec<u8>, crate::Error> {
        let header = self.generated_header();
        let payload = usize::try_from(self.generated_length())
            .map_err(|_| crate::Error::Argument)?;
        let capacity = payload
            .checked_add(crate::packet_wire::ack_length(&header)?)
            .ok_or(crate::Error::Argument)?;
        let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
        crate::packet_wire::encode_header(&header, &mut writer)?;
        self.encode_payload(&mut writer)?;
        crate::packet_wire::encode_acks(&header, &mut writer)?;
        Ok(writer.into_inner())
    }
    fn new_from_bytes(bytes: &[u8], position: &mut i32) -> Result<Self, crate::Error> {
        let mut value = Self::new_generated();
        let mut packet_end = i32::try_from(bytes.len())
            .map_err(|_| crate::Error::Argument)?
            .checked_sub(1)
            .ok_or(crate::Error::Argument)?;
        Self::decode_from_bytes(&mut value, bytes, position, &mut packet_end, None)?;
        Ok(value)
    }
    fn new_from_header(
        header: crate::packets::Header,
        bytes: &[u8],
        position: &mut i32,
    ) -> Result<Self, crate::Error> {
        let mut value = Self::new_generated();
        let mut packet_end = i32::try_from(bytes.len())
            .map_err(|_| crate::Error::Argument)?
            .checked_sub(1)
            .ok_or(crate::Error::Argument)?;
        Self::decode_from_header(&mut value, header, bytes, position, &mut packet_end)?;
        Ok(value)
    }
    fn decode_from_header(
        &mut self,
        header: crate::packets::Header,
        bytes: &[u8],
        position: &mut i32,
        packet_end: &mut i32,
    ) -> Result<(), crate::Error> {
        if *position < 0 || *packet_end < 0 {
            return Err(crate::Error::Argument);
        }
        let start = usize::try_from(*position).map_err(|_| crate::Error::Argument)?;
        let end = usize::try_from(
                packet_end.checked_add(1).ok_or(crate::Error::Argument)?,
            )
            .map_err(|_| crate::Error::Argument)?;
        let mut reader = crate::packet_wire::WireReader::new(bytes, start, end)?;
        self.decode_payload(&mut reader)?;
        reader.finish(position)?;
        self.store_header(header);
        Ok(())
    }
    fn decode_from_bytes(
        &mut self,
        bytes: &[u8],
        position: &mut i32,
        packet_end: &mut i32,
        zero_buffer: Option<&mut [u8]>,
    ) -> Result<(), crate::Error> {
        let header = crate::packet_wire::decode_header(bytes, position, packet_end)?;
        if header.zerocoded && let Some(buffer) = zero_buffer {
            let decoded_length = crate::packet_wire::zero_decode(
                Some(bytes),
                packet_end.checked_add(1).ok_or(crate::Error::Argument)?,
                Some(buffer),
            )?;
            *packet_end = decoded_length.checked_sub(1).ok_or(crate::Error::Argument)?;
            let end = usize::try_from(decoded_length)
                .map_err(|_| crate::Error::Argument)?;
            return self.decode_from_header(header, &buffer[..end], position, packet_end);
        }
        self.decode_from_header(header, bytes, position, packet_end)
    }
}
#[allow(clippy::too_many_lines)]
pub(crate) fn validate_packet_payload(
    packet_type: PacketType,
    header: crate::packets::Header,
    bytes: &[u8],
    position: &mut i32,
    packet_end: &mut i32,
) -> Result<(), crate::Error> {
    match packet_type {
        PacketType::TestMessage => {
            let mut packet = <crate::packets::TestMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PacketAck => {
            let mut packet = <crate::packets::PacketAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::OpenCircuit => {
            let mut packet = <crate::packets::OpenCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CloseCircuit => {
            let mut packet = <crate::packets::CloseCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AddCircuitCode => {
            let mut packet = <crate::packets::AddCircuitCodePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UseCircuitCode => {
            let mut packet = <crate::packets::UseCircuitCodePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarTextureUpdate => {
            let mut packet = <crate::packets::AvatarTextureUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorMapUpdate => {
            let mut packet = <crate::packets::SimulatorMapUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorSetMap => {
            let mut packet = <crate::packets::SimulatorSetMapPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SubscribeLoad => {
            let mut packet = <crate::packets::SubscribeLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UnsubscribeLoad => {
            let mut packet = <crate::packets::UnsubscribeLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorReady => {
            let mut packet = <crate::packets::SimulatorReadyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TelehubInfo => {
            let mut packet = <crate::packets::TelehubInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorPresentAtLocation => {
            let mut packet = <crate::packets::SimulatorPresentAtLocationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorLoad => {
            let mut packet = <crate::packets::SimulatorLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorShutdownRequest => {
            let mut packet = <crate::packets::SimulatorShutdownRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionPresenceRequestByRegionID => {
            let mut packet = <crate::packets::RegionPresenceRequestByRegionIDPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionPresenceRequestByHandle => {
            let mut packet = <crate::packets::RegionPresenceRequestByHandlePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionPresenceResponse => {
            let mut packet = <crate::packets::RegionPresenceResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateSimulator => {
            let mut packet = <crate::packets::UpdateSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogDwellTime => {
            let mut packet = <crate::packets::LogDwellTimePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FeatureDisabled => {
            let mut packet = <crate::packets::FeatureDisabledPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogFailedMoneyTransaction => {
            let mut packet = <crate::packets::LogFailedMoneyTransactionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UserReportInternal => {
            let mut packet = <crate::packets::UserReportInternalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetSimStatusInDatabase => {
            let mut packet = <crate::packets::SetSimStatusInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetSimPresenceInDatabase => {
            let mut packet = <crate::packets::SetSimPresenceInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EconomyDataRequest => {
            let mut packet = <crate::packets::EconomyDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EconomyData => {
            let mut packet = <crate::packets::EconomyDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPickerRequest => {
            let mut packet = <crate::packets::AvatarPickerRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPickerRequestBackend => {
            let mut packet = <crate::packets::AvatarPickerRequestBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPickerReply => {
            let mut packet = <crate::packets::AvatarPickerReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PlacesQuery => {
            let mut packet = <crate::packets::PlacesQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PlacesReply => {
            let mut packet = <crate::packets::PlacesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirFindQuery => {
            let mut packet = <crate::packets::DirFindQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirFindQueryBackend => {
            let mut packet = <crate::packets::DirFindQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPlacesQuery => {
            let mut packet = <crate::packets::DirPlacesQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPlacesQueryBackend => {
            let mut packet = <crate::packets::DirPlacesQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPlacesReply => {
            let mut packet = <crate::packets::DirPlacesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPeopleReply => {
            let mut packet = <crate::packets::DirPeopleReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirEventsReply => {
            let mut packet = <crate::packets::DirEventsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirGroupsReply => {
            let mut packet = <crate::packets::DirGroupsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirClassifiedQuery => {
            let mut packet = <crate::packets::DirClassifiedQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirClassifiedQueryBackend => {
            let mut packet = <crate::packets::DirClassifiedQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirClassifiedReply => {
            let mut packet = <crate::packets::DirClassifiedReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarClassifiedReply => {
            let mut packet = <crate::packets::AvatarClassifiedReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClassifiedInfoRequest => {
            let mut packet = <crate::packets::ClassifiedInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClassifiedInfoReply => {
            let mut packet = <crate::packets::ClassifiedInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClassifiedInfoUpdate => {
            let mut packet = <crate::packets::ClassifiedInfoUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClassifiedDelete => {
            let mut packet = <crate::packets::ClassifiedDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClassifiedGodDelete => {
            let mut packet = <crate::packets::ClassifiedGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirLandQuery => {
            let mut packet = <crate::packets::DirLandQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirLandQueryBackend => {
            let mut packet = <crate::packets::DirLandQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirLandReply => {
            let mut packet = <crate::packets::DirLandReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPopularQuery => {
            let mut packet = <crate::packets::DirPopularQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPopularQueryBackend => {
            let mut packet = <crate::packets::DirPopularQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DirPopularReply => {
            let mut packet = <crate::packets::DirPopularReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelInfoRequest => {
            let mut packet = <crate::packets::ParcelInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelInfoReply => {
            let mut packet = <crate::packets::ParcelInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelObjectOwnersRequest => {
            let mut packet = <crate::packets::ParcelObjectOwnersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelObjectOwnersReply => {
            let mut packet = <crate::packets::ParcelObjectOwnersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupNoticesListRequest => {
            let mut packet = <crate::packets::GroupNoticesListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupNoticesListReply => {
            let mut packet = <crate::packets::GroupNoticesListReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupNoticeRequest => {
            let mut packet = <crate::packets::GroupNoticeRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupNoticeAdd => {
            let mut packet = <crate::packets::GroupNoticeAddPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportRequest => {
            let mut packet = <crate::packets::TeleportRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportLocationRequest => {
            let mut packet = <crate::packets::TeleportLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportLocal => {
            let mut packet = <crate::packets::TeleportLocalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportLandmarkRequest => {
            let mut packet = <crate::packets::TeleportLandmarkRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportProgress => {
            let mut packet = <crate::packets::TeleportProgressPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DataHomeLocationRequest => {
            let mut packet = <crate::packets::DataHomeLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DataHomeLocationReply => {
            let mut packet = <crate::packets::DataHomeLocationReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportFinish => {
            let mut packet = <crate::packets::TeleportFinishPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::StartLure => {
            let mut packet = <crate::packets::StartLurePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportLureRequest => {
            let mut packet = <crate::packets::TeleportLureRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportCancel => {
            let mut packet = <crate::packets::TeleportCancelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportStart => {
            let mut packet = <crate::packets::TeleportStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportFailed => {
            let mut packet = <crate::packets::TeleportFailedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::Undo => {
            let mut packet = <crate::packets::UndoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::Redo => {
            let mut packet = <crate::packets::RedoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UndoLand => {
            let mut packet = <crate::packets::UndoLandPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentPause => {
            let mut packet = <crate::packets::AgentPausePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentResume => {
            let mut packet = <crate::packets::AgentResumePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChatFromViewer => {
            let mut packet = <crate::packets::ChatFromViewerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentThrottle => {
            let mut packet = <crate::packets::AgentThrottlePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentFOV => {
            let mut packet = <crate::packets::AgentFOVPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentHeightWidth => {
            let mut packet = <crate::packets::AgentHeightWidthPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentSetAppearance => {
            let mut packet = <crate::packets::AgentSetAppearancePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentQuitCopy => {
            let mut packet = <crate::packets::AgentQuitCopyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ImageNotInDatabase => {
            let mut packet = <crate::packets::ImageNotInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RebakeAvatarTextures => {
            let mut packet = <crate::packets::RebakeAvatarTexturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetAlwaysRun => {
            let mut packet = <crate::packets::SetAlwaysRunPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDelete => {
            let mut packet = <crate::packets::ObjectDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDuplicate => {
            let mut packet = <crate::packets::ObjectDuplicatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDuplicateOnRay => {
            let mut packet = <crate::packets::ObjectDuplicateOnRayPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectScale => {
            let mut packet = <crate::packets::ObjectScalePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectRotation => {
            let mut packet = <crate::packets::ObjectRotationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectFlagUpdate => {
            let mut packet = <crate::packets::ObjectFlagUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectClickAction => {
            let mut packet = <crate::packets::ObjectClickActionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectImage => {
            let mut packet = <crate::packets::ObjectImagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectBypassModUpdate => {
            let mut packet = <crate::packets::ObjectBypassModUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectMaterial => {
            let mut packet = <crate::packets::ObjectMaterialPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectShape => {
            let mut packet = <crate::packets::ObjectShapePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectExtraParams => {
            let mut packet = <crate::packets::ObjectExtraParamsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectOwner => {
            let mut packet = <crate::packets::ObjectOwnerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectGroup => {
            let mut packet = <crate::packets::ObjectGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectBuy => {
            let mut packet = <crate::packets::ObjectBuyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::BuyObjectInventory => {
            let mut packet = <crate::packets::BuyObjectInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DerezContainer => {
            let mut packet = <crate::packets::DerezContainerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectPermissions => {
            let mut packet = <crate::packets::ObjectPermissionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectSaleInfo => {
            let mut packet = <crate::packets::ObjectSaleInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectName => {
            let mut packet = <crate::packets::ObjectNamePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDescription => {
            let mut packet = <crate::packets::ObjectDescriptionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectCategory => {
            let mut packet = <crate::packets::ObjectCategoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectSelect => {
            let mut packet = <crate::packets::ObjectSelectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDeselect => {
            let mut packet = <crate::packets::ObjectDeselectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectAttach => {
            let mut packet = <crate::packets::ObjectAttachPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDetach => {
            let mut packet = <crate::packets::ObjectDetachPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDrop => {
            let mut packet = <crate::packets::ObjectDropPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectLink => {
            let mut packet = <crate::packets::ObjectLinkPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDelink => {
            let mut packet = <crate::packets::ObjectDelinkPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectGrab => {
            let mut packet = <crate::packets::ObjectGrabPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectGrabUpdate => {
            let mut packet = <crate::packets::ObjectGrabUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectDeGrab => {
            let mut packet = <crate::packets::ObjectDeGrabPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectSpinStart => {
            let mut packet = <crate::packets::ObjectSpinStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectSpinUpdate => {
            let mut packet = <crate::packets::ObjectSpinUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectSpinStop => {
            let mut packet = <crate::packets::ObjectSpinStopPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectExportSelected => {
            let mut packet = <crate::packets::ObjectExportSelectedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ModifyLand => {
            let mut packet = <crate::packets::ModifyLandPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::VelocityInterpolateOn => {
            let mut packet = <crate::packets::VelocityInterpolateOnPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::VelocityInterpolateOff => {
            let mut packet = <crate::packets::VelocityInterpolateOffPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::StateSave => {
            let mut packet = <crate::packets::StateSavePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ReportAutosaveCrash => {
            let mut packet = <crate::packets::ReportAutosaveCrashPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimWideDeletes => {
            let mut packet = <crate::packets::SimWideDeletesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TrackAgent => {
            let mut packet = <crate::packets::TrackAgentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ViewerStats => {
            let mut packet = <crate::packets::ViewerStatsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptAnswerYes => {
            let mut packet = <crate::packets::ScriptAnswerYesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UserReport => {
            let mut packet = <crate::packets::UserReportPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AlertMessage => {
            let mut packet = <crate::packets::AlertMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentAlertMessage => {
            let mut packet = <crate::packets::AgentAlertMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MeanCollisionAlert => {
            let mut packet = <crate::packets::MeanCollisionAlertPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ViewerFrozenMessage => {
            let mut packet = <crate::packets::ViewerFrozenMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::HealthMessage => {
            let mut packet = <crate::packets::HealthMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChatFromSimulator => {
            let mut packet = <crate::packets::ChatFromSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimStats => {
            let mut packet = <crate::packets::SimStatsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestRegionInfo => {
            let mut packet = <crate::packets::RequestRegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionInfo => {
            let mut packet = <crate::packets::RegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GodUpdateRegionInfo => {
            let mut packet = <crate::packets::GodUpdateRegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NearestLandingRegionRequest => {
            let mut packet = <crate::packets::NearestLandingRegionRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NearestLandingRegionReply => {
            let mut packet = <crate::packets::NearestLandingRegionReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NearestLandingRegionUpdated => {
            let mut packet = <crate::packets::NearestLandingRegionUpdatedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TeleportLandingStatusChanged => {
            let mut packet = <crate::packets::TeleportLandingStatusChangedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionHandshake => {
            let mut packet = <crate::packets::RegionHandshakePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionHandshakeReply => {
            let mut packet = <crate::packets::RegionHandshakeReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimulatorViewerTimeMessage => {
            let mut packet = <crate::packets::SimulatorViewerTimeMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EnableSimulator => {
            let mut packet = <crate::packets::EnableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DisableSimulator => {
            let mut packet = <crate::packets::DisableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferRequest => {
            let mut packet = <crate::packets::TransferRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferInfo => {
            let mut packet = <crate::packets::TransferInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferAbort => {
            let mut packet = <crate::packets::TransferAbortPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestXfer => {
            let mut packet = <crate::packets::RequestXferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AbortXfer => {
            let mut packet = <crate::packets::AbortXferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarAppearance => {
            let mut packet = <crate::packets::AvatarAppearancePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetFollowCamProperties => {
            let mut packet = <crate::packets::SetFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ClearFollowCamProperties => {
            let mut packet = <crate::packets::ClearFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestPayPrice => {
            let mut packet = <crate::packets::RequestPayPricePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PayPriceReply => {
            let mut packet = <crate::packets::PayPriceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::KickUser => {
            let mut packet = <crate::packets::KickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::KickUserAck => {
            let mut packet = <crate::packets::KickUserAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GodKickUser => {
            let mut packet = <crate::packets::GodKickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SystemKickUser => {
            let mut packet = <crate::packets::SystemKickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EjectUser => {
            let mut packet = <crate::packets::EjectUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FreezeUser => {
            let mut packet = <crate::packets::FreezeUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPropertiesRequest => {
            let mut packet = <crate::packets::AvatarPropertiesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPropertiesRequestBackend => {
            let mut packet = <crate::packets::AvatarPropertiesRequestBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPropertiesReply => {
            let mut packet = <crate::packets::AvatarPropertiesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarInterestsReply => {
            let mut packet = <crate::packets::AvatarInterestsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarGroupsReply => {
            let mut packet = <crate::packets::AvatarGroupsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPropertiesUpdate => {
            let mut packet = <crate::packets::AvatarPropertiesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarInterestsUpdate => {
            let mut packet = <crate::packets::AvatarInterestsUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarNotesReply => {
            let mut packet = <crate::packets::AvatarNotesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarNotesUpdate => {
            let mut packet = <crate::packets::AvatarNotesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarPicksReply => {
            let mut packet = <crate::packets::AvatarPicksReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventInfoRequest => {
            let mut packet = <crate::packets::EventInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventInfoReply => {
            let mut packet = <crate::packets::EventInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventNotificationAddRequest => {
            let mut packet = <crate::packets::EventNotificationAddRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventNotificationRemoveRequest => {
            let mut packet = <crate::packets::EventNotificationRemoveRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventGodDelete => {
            let mut packet = <crate::packets::EventGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PickInfoReply => {
            let mut packet = <crate::packets::PickInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PickInfoUpdate => {
            let mut packet = <crate::packets::PickInfoUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PickDelete => {
            let mut packet = <crate::packets::PickDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PickGodDelete => {
            let mut packet = <crate::packets::PickGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptQuestion => {
            let mut packet = <crate::packets::ScriptQuestionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptControlChange => {
            let mut packet = <crate::packets::ScriptControlChangePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptDialog => {
            let mut packet = <crate::packets::ScriptDialogPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptDialogReply => {
            let mut packet = <crate::packets::ScriptDialogReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ForceScriptControlRelease => {
            let mut packet = <crate::packets::ForceScriptControlReleasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RevokePermissions => {
            let mut packet = <crate::packets::RevokePermissionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LoadURL => {
            let mut packet = <crate::packets::LoadURLPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptTeleportRequest => {
            let mut packet = <crate::packets::ScriptTeleportRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelOverlay => {
            let mut packet = <crate::packets::ParcelOverlayPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelPropertiesRequestByID => {
            let mut packet = <crate::packets::ParcelPropertiesRequestByIDPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelPropertiesUpdate => {
            let mut packet = <crate::packets::ParcelPropertiesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelReturnObjects => {
            let mut packet = <crate::packets::ParcelReturnObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelSetOtherCleanTime => {
            let mut packet = <crate::packets::ParcelSetOtherCleanTimePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelDisableObjects => {
            let mut packet = <crate::packets::ParcelDisableObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelSelectObjects => {
            let mut packet = <crate::packets::ParcelSelectObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EstateCovenantRequest => {
            let mut packet = <crate::packets::EstateCovenantRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EstateCovenantReply => {
            let mut packet = <crate::packets::EstateCovenantReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ForceObjectSelect => {
            let mut packet = <crate::packets::ForceObjectSelectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelBuyPass => {
            let mut packet = <crate::packets::ParcelBuyPassPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelDeedToGroup => {
            let mut packet = <crate::packets::ParcelDeedToGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelReclaim => {
            let mut packet = <crate::packets::ParcelReclaimPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelClaim => {
            let mut packet = <crate::packets::ParcelClaimPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelJoin => {
            let mut packet = <crate::packets::ParcelJoinPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelDivide => {
            let mut packet = <crate::packets::ParcelDividePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelRelease => {
            let mut packet = <crate::packets::ParcelReleasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelBuy => {
            let mut packet = <crate::packets::ParcelBuyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelGodForceOwner => {
            let mut packet = <crate::packets::ParcelGodForceOwnerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelAccessListRequest => {
            let mut packet = <crate::packets::ParcelAccessListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelAccessListReply => {
            let mut packet = <crate::packets::ParcelAccessListReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelAccessListUpdate => {
            let mut packet = <crate::packets::ParcelAccessListUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelDwellRequest => {
            let mut packet = <crate::packets::ParcelDwellRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelDwellReply => {
            let mut packet = <crate::packets::ParcelDwellReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestParcelTransfer => {
            let mut packet = <crate::packets::RequestParcelTransferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateParcel => {
            let mut packet = <crate::packets::UpdateParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveParcel => {
            let mut packet = <crate::packets::RemoveParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MergeParcel => {
            let mut packet = <crate::packets::MergeParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogParcelChanges => {
            let mut packet = <crate::packets::LogParcelChangesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CheckParcelSales => {
            let mut packet = <crate::packets::CheckParcelSalesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelSales => {
            let mut packet = <crate::packets::ParcelSalesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelGodMarkAsContent => {
            let mut packet = <crate::packets::ParcelGodMarkAsContentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ViewerStartAuction => {
            let mut packet = <crate::packets::ViewerStartAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::StartAuction => {
            let mut packet = <crate::packets::StartAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ConfirmAuctionStart => {
            let mut packet = <crate::packets::ConfirmAuctionStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CompleteAuction => {
            let mut packet = <crate::packets::CompleteAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CancelAuction => {
            let mut packet = <crate::packets::CancelAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CheckParcelAuctions => {
            let mut packet = <crate::packets::CheckParcelAuctionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelAuctions => {
            let mut packet = <crate::packets::ParcelAuctionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UUIDNameRequest => {
            let mut packet = <crate::packets::UUIDNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UUIDNameReply => {
            let mut packet = <crate::packets::UUIDNameReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UUIDGroupNameRequest => {
            let mut packet = <crate::packets::UUIDGroupNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UUIDGroupNameReply => {
            let mut packet = <crate::packets::UUIDGroupNameReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChatPass => {
            let mut packet = <crate::packets::ChatPassPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChildAgentDying => {
            let mut packet = <crate::packets::ChildAgentDyingPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChildAgentUnknown => {
            let mut packet = <crate::packets::ChildAgentUnknownPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::KillChildAgents => {
            let mut packet = <crate::packets::KillChildAgentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GetScriptRunning => {
            let mut packet = <crate::packets::GetScriptRunningPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptRunningReply => {
            let mut packet = <crate::packets::ScriptRunningReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetScriptRunning => {
            let mut packet = <crate::packets::SetScriptRunningPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptReset => {
            let mut packet = <crate::packets::ScriptResetPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptSensorRequest => {
            let mut packet = <crate::packets::ScriptSensorRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptSensorReply => {
            let mut packet = <crate::packets::ScriptSensorReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CompleteAgentMovement => {
            let mut packet = <crate::packets::CompleteAgentMovementPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentMovementComplete => {
            let mut packet = <crate::packets::AgentMovementCompletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DataServerLogout => {
            let mut packet = <crate::packets::DataServerLogoutPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogoutRequest => {
            let mut packet = <crate::packets::LogoutRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogoutReply => {
            let mut packet = <crate::packets::LogoutReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ImprovedInstantMessage => {
            let mut packet = <crate::packets::ImprovedInstantMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RetrieveInstantMessages => {
            let mut packet = <crate::packets::RetrieveInstantMessagesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FindAgent => {
            let mut packet = <crate::packets::FindAgentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestGodlikePowers => {
            let mut packet = <crate::packets::RequestGodlikePowersPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GrantGodlikePowers => {
            let mut packet = <crate::packets::GrantGodlikePowersPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GodlikeMessage => {
            let mut packet = <crate::packets::GodlikeMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EstateOwnerMessage => {
            let mut packet = <crate::packets::EstateOwnerMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GenericMessage => {
            let mut packet = <crate::packets::GenericMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LargeGenericMessage => {
            let mut packet = <crate::packets::LargeGenericMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MuteListRequest => {
            let mut packet = <crate::packets::MuteListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateMuteListEntry => {
            let mut packet = <crate::packets::UpdateMuteListEntryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveMuteListEntry => {
            let mut packet = <crate::packets::RemoveMuteListEntryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CopyInventoryFromNotecard => {
            let mut packet = <crate::packets::CopyInventoryFromNotecardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateInventoryItem => {
            let mut packet = <crate::packets::UpdateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateCreateInventoryItem => {
            let mut packet = <crate::packets::UpdateCreateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoveInventoryItem => {
            let mut packet = <crate::packets::MoveInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CopyInventoryItem => {
            let mut packet = <crate::packets::CopyInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveInventoryItem => {
            let mut packet = <crate::packets::RemoveInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChangeInventoryItemFlags => {
            let mut packet = <crate::packets::ChangeInventoryItemFlagsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SaveAssetIntoInventory => {
            let mut packet = <crate::packets::SaveAssetIntoInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateInventoryFolder => {
            let mut packet = <crate::packets::CreateInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateInventoryFolder => {
            let mut packet = <crate::packets::UpdateInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoveInventoryFolder => {
            let mut packet = <crate::packets::MoveInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveInventoryFolder => {
            let mut packet = <crate::packets::RemoveInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FetchInventoryDescendents => {
            let mut packet = <crate::packets::FetchInventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InventoryDescendents => {
            let mut packet = <crate::packets::InventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FetchInventory => {
            let mut packet = <crate::packets::FetchInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FetchInventoryReply => {
            let mut packet = <crate::packets::FetchInventoryReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::BulkUpdateInventory => {
            let mut packet = <crate::packets::BulkUpdateInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestInventoryAsset => {
            let mut packet = <crate::packets::RequestInventoryAssetPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InventoryAssetResponse => {
            let mut packet = <crate::packets::InventoryAssetResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveInventoryObjects => {
            let mut packet = <crate::packets::RemoveInventoryObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PurgeInventoryDescendents => {
            let mut packet = <crate::packets::PurgeInventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateTaskInventory => {
            let mut packet = <crate::packets::UpdateTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveTaskInventory => {
            let mut packet = <crate::packets::RemoveTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoveTaskInventory => {
            let mut packet = <crate::packets::MoveTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestTaskInventory => {
            let mut packet = <crate::packets::RequestTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ReplyTaskInventory => {
            let mut packet = <crate::packets::ReplyTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DeRezObject => {
            let mut packet = <crate::packets::DeRezObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DeRezAck => {
            let mut packet = <crate::packets::DeRezAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezObject => {
            let mut packet = <crate::packets::RezObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezObjectFromNotecard => {
            let mut packet = <crate::packets::RezObjectFromNotecardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferInventory => {
            let mut packet = <crate::packets::TransferInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferInventoryAck => {
            let mut packet = <crate::packets::TransferInventoryAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AcceptFriendship => {
            let mut packet = <crate::packets::AcceptFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DeclineFriendship => {
            let mut packet = <crate::packets::DeclineFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::FormFriendship => {
            let mut packet = <crate::packets::FormFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TerminateFriendship => {
            let mut packet = <crate::packets::TerminateFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::OfferCallingCard => {
            let mut packet = <crate::packets::OfferCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AcceptCallingCard => {
            let mut packet = <crate::packets::AcceptCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DeclineCallingCard => {
            let mut packet = <crate::packets::DeclineCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezScript => {
            let mut packet = <crate::packets::RezScriptPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateInventoryItem => {
            let mut packet = <crate::packets::CreateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateLandmarkForEvent => {
            let mut packet = <crate::packets::CreateLandmarkForEventPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventLocationRequest => {
            let mut packet = <crate::packets::EventLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EventLocationReply => {
            let mut packet = <crate::packets::EventLocationReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionHandleRequest => {
            let mut packet = <crate::packets::RegionHandleRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RegionIDAndHandleReply => {
            let mut packet = <crate::packets::RegionIDAndHandleReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoneyTransferRequest => {
            let mut packet = <crate::packets::MoneyTransferRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoneyTransferBackend => {
            let mut packet = <crate::packets::MoneyTransferBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoneyBalanceRequest => {
            let mut packet = <crate::packets::MoneyBalanceRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MoneyBalanceReply => {
            let mut packet = <crate::packets::MoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RoutedMoneyBalanceReply => {
            let mut packet = <crate::packets::RoutedMoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ActivateGestures => {
            let mut packet = <crate::packets::ActivateGesturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DeactivateGestures => {
            let mut packet = <crate::packets::DeactivateGesturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MuteListUpdate => {
            let mut packet = <crate::packets::MuteListUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UseCachedMuteList => {
            let mut packet = <crate::packets::UseCachedMuteListPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GrantUserRights => {
            let mut packet = <crate::packets::GrantUserRightsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChangeUserRights => {
            let mut packet = <crate::packets::ChangeUserRightsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::OnlineNotification => {
            let mut packet = <crate::packets::OnlineNotificationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::OfflineNotification => {
            let mut packet = <crate::packets::OfflineNotificationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetStartLocationRequest => {
            let mut packet = <crate::packets::SetStartLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetStartLocation => {
            let mut packet = <crate::packets::SetStartLocationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NetTest => {
            let mut packet = <crate::packets::NetTestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetCPURatio => {
            let mut packet = <crate::packets::SetCPURatioPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimCrashed => {
            let mut packet = <crate::packets::SimCrashedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NameValuePair => {
            let mut packet = <crate::packets::NameValuePairPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveNameValuePair => {
            let mut packet = <crate::packets::RemoveNameValuePairPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateAttachment => {
            let mut packet = <crate::packets::UpdateAttachmentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RemoveAttachment => {
            let mut packet = <crate::packets::RemoveAttachmentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AssetUploadRequest => {
            let mut packet = <crate::packets::AssetUploadRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AssetUploadComplete => {
            let mut packet = <crate::packets::AssetUploadCompletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EmailMessageRequest => {
            let mut packet = <crate::packets::EmailMessageRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EmailMessageReply => {
            let mut packet = <crate::packets::EmailMessageReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptDataRequest => {
            let mut packet = <crate::packets::ScriptDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptDataReply => {
            let mut packet = <crate::packets::ScriptDataReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateGroupRequest => {
            let mut packet = <crate::packets::CreateGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateGroupReply => {
            let mut packet = <crate::packets::CreateGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateGroupInfo => {
            let mut packet = <crate::packets::UpdateGroupInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleChanges => {
            let mut packet = <crate::packets::GroupRoleChangesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::JoinGroupRequest => {
            let mut packet = <crate::packets::JoinGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::JoinGroupReply => {
            let mut packet = <crate::packets::JoinGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EjectGroupMemberRequest => {
            let mut packet = <crate::packets::EjectGroupMemberRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EjectGroupMemberReply => {
            let mut packet = <crate::packets::EjectGroupMemberReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LeaveGroupRequest => {
            let mut packet = <crate::packets::LeaveGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LeaveGroupReply => {
            let mut packet = <crate::packets::LeaveGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InviteGroupRequest => {
            let mut packet = <crate::packets::InviteGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InviteGroupResponse => {
            let mut packet = <crate::packets::InviteGroupResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupProfileRequest => {
            let mut packet = <crate::packets::GroupProfileRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupProfileReply => {
            let mut packet = <crate::packets::GroupProfileReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountSummaryRequest => {
            let mut packet = <crate::packets::GroupAccountSummaryRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountSummaryReply => {
            let mut packet = <crate::packets::GroupAccountSummaryReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountDetailsRequest => {
            let mut packet = <crate::packets::GroupAccountDetailsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountDetailsReply => {
            let mut packet = <crate::packets::GroupAccountDetailsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountTransactionsRequest => {
            let mut packet = <crate::packets::GroupAccountTransactionsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupAccountTransactionsReply => {
            let mut packet = <crate::packets::GroupAccountTransactionsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupActiveProposalsRequest => {
            let mut packet = <crate::packets::GroupActiveProposalsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupActiveProposalItemReply => {
            let mut packet = <crate::packets::GroupActiveProposalItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupVoteHistoryRequest => {
            let mut packet = <crate::packets::GroupVoteHistoryRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupVoteHistoryItemReply => {
            let mut packet = <crate::packets::GroupVoteHistoryItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::StartGroupProposal => {
            let mut packet = <crate::packets::StartGroupProposalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupProposalBallot => {
            let mut packet = <crate::packets::GroupProposalBallotPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TallyVotes => {
            let mut packet = <crate::packets::TallyVotesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupMembersRequest => {
            let mut packet = <crate::packets::GroupMembersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupMembersReply => {
            let mut packet = <crate::packets::GroupMembersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ActivateGroup => {
            let mut packet = <crate::packets::ActivateGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetGroupContribution => {
            let mut packet = <crate::packets::SetGroupContributionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SetGroupAcceptNotices => {
            let mut packet = <crate::packets::SetGroupAcceptNoticesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleDataRequest => {
            let mut packet = <crate::packets::GroupRoleDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleDataReply => {
            let mut packet = <crate::packets::GroupRoleDataReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleMembersRequest => {
            let mut packet = <crate::packets::GroupRoleMembersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleMembersReply => {
            let mut packet = <crate::packets::GroupRoleMembersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupTitlesRequest => {
            let mut packet = <crate::packets::GroupTitlesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupTitlesReply => {
            let mut packet = <crate::packets::GroupTitlesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupTitleUpdate => {
            let mut packet = <crate::packets::GroupTitleUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupRoleUpdate => {
            let mut packet = <crate::packets::GroupRoleUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LiveHelpGroupRequest => {
            let mut packet = <crate::packets::LiveHelpGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LiveHelpGroupReply => {
            let mut packet = <crate::packets::LiveHelpGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentWearablesRequest => {
            let mut packet = <crate::packets::AgentWearablesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentWearablesUpdate => {
            let mut packet = <crate::packets::AgentWearablesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentIsNowWearing => {
            let mut packet = <crate::packets::AgentIsNowWearingPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentCachedTexture => {
            let mut packet = <crate::packets::AgentCachedTexturePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentCachedTextureResponse => {
            let mut packet = <crate::packets::AgentCachedTextureResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentDataUpdateRequest => {
            let mut packet = <crate::packets::AgentDataUpdateRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentDataUpdate => {
            let mut packet = <crate::packets::AgentDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GroupDataUpdate => {
            let mut packet = <crate::packets::GroupDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentGroupDataUpdate => {
            let mut packet = <crate::packets::AgentGroupDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentDropGroup => {
            let mut packet = <crate::packets::AgentDropGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LogTextMessage => {
            let mut packet = <crate::packets::LogTextMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateTrustedCircuit => {
            let mut packet = <crate::packets::CreateTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DenyTrustedCircuit => {
            let mut packet = <crate::packets::DenyTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestTrustedCircuit => {
            let mut packet = <crate::packets::RequestTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezSingleAttachmentFromInv => {
            let mut packet = <crate::packets::RezSingleAttachmentFromInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezMultipleAttachmentsFromInv => {
            let mut packet = <crate::packets::RezMultipleAttachmentsFromInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::DetachAttachmentIntoInv => {
            let mut packet = <crate::packets::DetachAttachmentIntoInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateNewOutfitAttachments => {
            let mut packet = <crate::packets::CreateNewOutfitAttachmentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UserInfoRequest => {
            let mut packet = <crate::packets::UserInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UserInfoReply => {
            let mut packet = <crate::packets::UserInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::UpdateUserInfo => {
            let mut packet = <crate::packets::UpdateUserInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelRename => {
            let mut packet = <crate::packets::ParcelRenamePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InitiateDownload => {
            let mut packet = <crate::packets::InitiateDownloadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SystemMessage => {
            let mut packet = <crate::packets::SystemMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapLayerRequest => {
            let mut packet = <crate::packets::MapLayerRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapLayerReply => {
            let mut packet = <crate::packets::MapLayerReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapBlockRequest => {
            let mut packet = <crate::packets::MapBlockRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapNameRequest => {
            let mut packet = <crate::packets::MapNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapBlockReply => {
            let mut packet = <crate::packets::MapBlockReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapItemRequest => {
            let mut packet = <crate::packets::MapItemRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MapItemReply => {
            let mut packet = <crate::packets::MapItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SendPostcard => {
            let mut packet = <crate::packets::SendPostcardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RpcChannelRequest => {
            let mut packet = <crate::packets::RpcChannelRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RpcChannelReply => {
            let mut packet = <crate::packets::RpcChannelReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RpcScriptRequestInbound => {
            let mut packet = <crate::packets::RpcScriptRequestInboundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RpcScriptRequestInboundForward => {
            let mut packet = <crate::packets::RpcScriptRequestInboundForwardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RpcScriptReplyInbound => {
            let mut packet = <crate::packets::RpcScriptReplyInboundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ScriptMailRegistration => {
            let mut packet = <crate::packets::ScriptMailRegistrationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelMediaCommandMessage => {
            let mut packet = <crate::packets::ParcelMediaCommandMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelMediaUpdate => {
            let mut packet = <crate::packets::ParcelMediaUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LandStatRequest => {
            let mut packet = <crate::packets::LandStatRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LandStatReply => {
            let mut packet = <crate::packets::LandStatReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::Error => {
            let mut packet = <crate::packets::ErrorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectIncludeInSearch => {
            let mut packet = <crate::packets::ObjectIncludeInSearchPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RezRestoreToWorld => {
            let mut packet = <crate::packets::RezRestoreToWorldPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LinkInventoryItem => {
            let mut packet = <crate::packets::LinkInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RetrieveIMsExtended => {
            let mut packet = <crate::packets::RetrieveIMsExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::JoinGroupRequestExtended => {
            let mut packet = <crate::packets::JoinGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CreateGroupRequestExtended => {
            let mut packet = <crate::packets::CreateGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectAdd => {
            let mut packet = <crate::packets::ObjectAddPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::MultipleObjectUpdate => {
            let mut packet = <crate::packets::MultipleObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestMultipleObjects => {
            let mut packet = <crate::packets::RequestMultipleObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectPosition => {
            let mut packet = <crate::packets::ObjectPositionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestObjectPropertiesFamily => {
            let mut packet = <crate::packets::RequestObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CoarseLocationUpdate => {
            let mut packet = <crate::packets::CoarseLocationUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CrossedRegion => {
            let mut packet = <crate::packets::CrossedRegionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ConfirmEnableSimulator => {
            let mut packet = <crate::packets::ConfirmEnableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectProperties => {
            let mut packet = <crate::packets::ObjectPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectPropertiesFamily => {
            let mut packet = <crate::packets::ObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelPropertiesRequest => {
            let mut packet = <crate::packets::ParcelPropertiesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SimStatus => {
            let mut packet = <crate::packets::SimStatusPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AttachedSound => {
            let mut packet = <crate::packets::AttachedSoundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AttachedSoundGainChange => {
            let mut packet = <crate::packets::AttachedSoundGainChangePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::PreloadSound => {
            let mut packet = <crate::packets::PreloadSoundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::InternalScriptMail => {
            let mut packet = <crate::packets::InternalScriptMailPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ViewerEffect => {
            let mut packet = <crate::packets::ViewerEffectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::StartPingCheck => {
            let mut packet = <crate::packets::StartPingCheckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CompletePingCheck => {
            let mut packet = <crate::packets::CompletePingCheckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::NeighborList => {
            let mut packet = <crate::packets::NeighborListPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentUpdate => {
            let mut packet = <crate::packets::AgentUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentAnimation => {
            let mut packet = <crate::packets::AgentAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentRequestSit => {
            let mut packet = <crate::packets::AgentRequestSitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AgentSit => {
            let mut packet = <crate::packets::AgentSitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::RequestImage => {
            let mut packet = <crate::packets::RequestImagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ImageData => {
            let mut packet = <crate::packets::ImageDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ImagePacket => {
            let mut packet = <crate::packets::ImagePacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::LayerData => {
            let mut packet = <crate::packets::LayerDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectUpdate => {
            let mut packet = <crate::packets::ObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectUpdateCompressed => {
            let mut packet = <crate::packets::ObjectUpdateCompressedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectUpdateCached => {
            let mut packet = <crate::packets::ObjectUpdateCachedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ImprovedTerseObjectUpdate => {
            let mut packet = <crate::packets::ImprovedTerseObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::KillObject => {
            let mut packet = <crate::packets::KillObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::TransferPacket => {
            let mut packet = <crate::packets::TransferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SendXferPacket => {
            let mut packet = <crate::packets::SendXferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ConfirmXferPacket => {
            let mut packet = <crate::packets::ConfirmXferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarAnimation => {
            let mut packet = <crate::packets::AvatarAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AvatarSitResponse => {
            let mut packet = <crate::packets::AvatarSitResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::CameraConstraint => {
            let mut packet = <crate::packets::CameraConstraintPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ParcelProperties => {
            let mut packet = <crate::packets::ParcelPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::EdgeDataPacket => {
            let mut packet = <crate::packets::EdgeDataPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChildAgentUpdate => {
            let mut packet = <crate::packets::ChildAgentUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChildAgentAlive => {
            let mut packet = <crate::packets::ChildAgentAlivePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ChildAgentPositionUpdate => {
            let mut packet = <crate::packets::ChildAgentPositionUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::AtomicPassObject => {
            let mut packet = <crate::packets::AtomicPassObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GenericStreamingMessage => {
            let mut packet = <crate::packets::GenericStreamingMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::SoundTrigger => {
            let mut packet = <crate::packets::SoundTriggerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::ObjectAnimation => {
            let mut packet = <crate::packets::ObjectAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::GameControlInput => {
            let mut packet = <crate::packets::GameControlInputPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::decode_from_header(
                &mut packet,
                header,
                bytes,
                position,
                packet_end,
            )
        }
        PacketType::Default => Err(crate::Error::InvalidOperation),
    }
}
#[allow(clippy::too_many_lines)]
pub(crate) fn build_packet_from_osd(
    name: &str,
    body: &libremetaverse_structured_data::OSDMap,
) -> Result<Option<crate::packets::Packet>, crate::Error> {
    let Some(descriptor) = descriptor_by_name(name) else {
        return Ok(None);
    };
    match descriptor.packet_type {
        PacketType::TestMessage => {
            let mut packet = <crate::packets::TestMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PacketAck => {
            let mut packet = <crate::packets::PacketAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::OpenCircuit => {
            let mut packet = <crate::packets::OpenCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CloseCircuit => {
            let mut packet = <crate::packets::CloseCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AddCircuitCode => {
            let mut packet = <crate::packets::AddCircuitCodePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UseCircuitCode => {
            let mut packet = <crate::packets::UseCircuitCodePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarTextureUpdate => {
            let mut packet = <crate::packets::AvatarTextureUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorMapUpdate => {
            let mut packet = <crate::packets::SimulatorMapUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorSetMap => {
            let mut packet = <crate::packets::SimulatorSetMapPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SubscribeLoad => {
            let mut packet = <crate::packets::SubscribeLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UnsubscribeLoad => {
            let mut packet = <crate::packets::UnsubscribeLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorReady => {
            let mut packet = <crate::packets::SimulatorReadyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TelehubInfo => {
            let mut packet = <crate::packets::TelehubInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorPresentAtLocation => {
            let mut packet = <crate::packets::SimulatorPresentAtLocationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorLoad => {
            let mut packet = <crate::packets::SimulatorLoadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorShutdownRequest => {
            let mut packet = <crate::packets::SimulatorShutdownRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionPresenceRequestByRegionID => {
            let mut packet = <crate::packets::RegionPresenceRequestByRegionIDPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionPresenceRequestByHandle => {
            let mut packet = <crate::packets::RegionPresenceRequestByHandlePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionPresenceResponse => {
            let mut packet = <crate::packets::RegionPresenceResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateSimulator => {
            let mut packet = <crate::packets::UpdateSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogDwellTime => {
            let mut packet = <crate::packets::LogDwellTimePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FeatureDisabled => {
            let mut packet = <crate::packets::FeatureDisabledPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogFailedMoneyTransaction => {
            let mut packet = <crate::packets::LogFailedMoneyTransactionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UserReportInternal => {
            let mut packet = <crate::packets::UserReportInternalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetSimStatusInDatabase => {
            let mut packet = <crate::packets::SetSimStatusInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetSimPresenceInDatabase => {
            let mut packet = <crate::packets::SetSimPresenceInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EconomyDataRequest => {
            let mut packet = <crate::packets::EconomyDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EconomyData => {
            let mut packet = <crate::packets::EconomyDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPickerRequest => {
            let mut packet = <crate::packets::AvatarPickerRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPickerRequestBackend => {
            let mut packet = <crate::packets::AvatarPickerRequestBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPickerReply => {
            let mut packet = <crate::packets::AvatarPickerReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PlacesQuery => {
            let mut packet = <crate::packets::PlacesQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PlacesReply => {
            let mut packet = <crate::packets::PlacesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirFindQuery => {
            let mut packet = <crate::packets::DirFindQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirFindQueryBackend => {
            let mut packet = <crate::packets::DirFindQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPlacesQuery => {
            let mut packet = <crate::packets::DirPlacesQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPlacesQueryBackend => {
            let mut packet = <crate::packets::DirPlacesQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPlacesReply => {
            let mut packet = <crate::packets::DirPlacesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPeopleReply => {
            let mut packet = <crate::packets::DirPeopleReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirEventsReply => {
            let mut packet = <crate::packets::DirEventsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirGroupsReply => {
            let mut packet = <crate::packets::DirGroupsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirClassifiedQuery => {
            let mut packet = <crate::packets::DirClassifiedQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirClassifiedQueryBackend => {
            let mut packet = <crate::packets::DirClassifiedQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirClassifiedReply => {
            let mut packet = <crate::packets::DirClassifiedReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarClassifiedReply => {
            let mut packet = <crate::packets::AvatarClassifiedReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClassifiedInfoRequest => {
            let mut packet = <crate::packets::ClassifiedInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClassifiedInfoReply => {
            let mut packet = <crate::packets::ClassifiedInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClassifiedInfoUpdate => {
            let mut packet = <crate::packets::ClassifiedInfoUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClassifiedDelete => {
            let mut packet = <crate::packets::ClassifiedDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClassifiedGodDelete => {
            let mut packet = <crate::packets::ClassifiedGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirLandQuery => {
            let mut packet = <crate::packets::DirLandQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirLandQueryBackend => {
            let mut packet = <crate::packets::DirLandQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirLandReply => {
            let mut packet = <crate::packets::DirLandReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPopularQuery => {
            let mut packet = <crate::packets::DirPopularQueryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPopularQueryBackend => {
            let mut packet = <crate::packets::DirPopularQueryBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DirPopularReply => {
            let mut packet = <crate::packets::DirPopularReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelInfoRequest => {
            let mut packet = <crate::packets::ParcelInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelInfoReply => {
            let mut packet = <crate::packets::ParcelInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelObjectOwnersRequest => {
            let mut packet = <crate::packets::ParcelObjectOwnersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelObjectOwnersReply => {
            let mut packet = <crate::packets::ParcelObjectOwnersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupNoticesListRequest => {
            let mut packet = <crate::packets::GroupNoticesListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupNoticesListReply => {
            let mut packet = <crate::packets::GroupNoticesListReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupNoticeRequest => {
            let mut packet = <crate::packets::GroupNoticeRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupNoticeAdd => {
            let mut packet = <crate::packets::GroupNoticeAddPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportRequest => {
            let mut packet = <crate::packets::TeleportRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportLocationRequest => {
            let mut packet = <crate::packets::TeleportLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportLocal => {
            let mut packet = <crate::packets::TeleportLocalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportLandmarkRequest => {
            let mut packet = <crate::packets::TeleportLandmarkRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportProgress => {
            let mut packet = <crate::packets::TeleportProgressPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DataHomeLocationRequest => {
            let mut packet = <crate::packets::DataHomeLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DataHomeLocationReply => {
            let mut packet = <crate::packets::DataHomeLocationReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportFinish => {
            let mut packet = <crate::packets::TeleportFinishPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::StartLure => {
            let mut packet = <crate::packets::StartLurePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportLureRequest => {
            let mut packet = <crate::packets::TeleportLureRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportCancel => {
            let mut packet = <crate::packets::TeleportCancelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportStart => {
            let mut packet = <crate::packets::TeleportStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportFailed => {
            let mut packet = <crate::packets::TeleportFailedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::Undo => {
            let mut packet = <crate::packets::UndoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::Redo => {
            let mut packet = <crate::packets::RedoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UndoLand => {
            let mut packet = <crate::packets::UndoLandPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentPause => {
            let mut packet = <crate::packets::AgentPausePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentResume => {
            let mut packet = <crate::packets::AgentResumePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChatFromViewer => {
            let mut packet = <crate::packets::ChatFromViewerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentThrottle => {
            let mut packet = <crate::packets::AgentThrottlePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentFOV => {
            let mut packet = <crate::packets::AgentFOVPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentHeightWidth => {
            let mut packet = <crate::packets::AgentHeightWidthPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentSetAppearance => {
            let mut packet = <crate::packets::AgentSetAppearancePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentQuitCopy => {
            let mut packet = <crate::packets::AgentQuitCopyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ImageNotInDatabase => {
            let mut packet = <crate::packets::ImageNotInDatabasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RebakeAvatarTextures => {
            let mut packet = <crate::packets::RebakeAvatarTexturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetAlwaysRun => {
            let mut packet = <crate::packets::SetAlwaysRunPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDelete => {
            let mut packet = <crate::packets::ObjectDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDuplicate => {
            let mut packet = <crate::packets::ObjectDuplicatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDuplicateOnRay => {
            let mut packet = <crate::packets::ObjectDuplicateOnRayPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectScale => {
            let mut packet = <crate::packets::ObjectScalePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectRotation => {
            let mut packet = <crate::packets::ObjectRotationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectFlagUpdate => {
            let mut packet = <crate::packets::ObjectFlagUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectClickAction => {
            let mut packet = <crate::packets::ObjectClickActionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectImage => {
            let mut packet = <crate::packets::ObjectImagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectBypassModUpdate => {
            let mut packet = <crate::packets::ObjectBypassModUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectMaterial => {
            let mut packet = <crate::packets::ObjectMaterialPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectShape => {
            let mut packet = <crate::packets::ObjectShapePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectExtraParams => {
            let mut packet = <crate::packets::ObjectExtraParamsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectOwner => {
            let mut packet = <crate::packets::ObjectOwnerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectGroup => {
            let mut packet = <crate::packets::ObjectGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectBuy => {
            let mut packet = <crate::packets::ObjectBuyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::BuyObjectInventory => {
            let mut packet = <crate::packets::BuyObjectInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DerezContainer => {
            let mut packet = <crate::packets::DerezContainerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectPermissions => {
            let mut packet = <crate::packets::ObjectPermissionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectSaleInfo => {
            let mut packet = <crate::packets::ObjectSaleInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectName => {
            let mut packet = <crate::packets::ObjectNamePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDescription => {
            let mut packet = <crate::packets::ObjectDescriptionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectCategory => {
            let mut packet = <crate::packets::ObjectCategoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectSelect => {
            let mut packet = <crate::packets::ObjectSelectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDeselect => {
            let mut packet = <crate::packets::ObjectDeselectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectAttach => {
            let mut packet = <crate::packets::ObjectAttachPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDetach => {
            let mut packet = <crate::packets::ObjectDetachPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDrop => {
            let mut packet = <crate::packets::ObjectDropPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectLink => {
            let mut packet = <crate::packets::ObjectLinkPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDelink => {
            let mut packet = <crate::packets::ObjectDelinkPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectGrab => {
            let mut packet = <crate::packets::ObjectGrabPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectGrabUpdate => {
            let mut packet = <crate::packets::ObjectGrabUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectDeGrab => {
            let mut packet = <crate::packets::ObjectDeGrabPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectSpinStart => {
            let mut packet = <crate::packets::ObjectSpinStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectSpinUpdate => {
            let mut packet = <crate::packets::ObjectSpinUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectSpinStop => {
            let mut packet = <crate::packets::ObjectSpinStopPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectExportSelected => {
            let mut packet = <crate::packets::ObjectExportSelectedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ModifyLand => {
            let mut packet = <crate::packets::ModifyLandPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::VelocityInterpolateOn => {
            let mut packet = <crate::packets::VelocityInterpolateOnPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::VelocityInterpolateOff => {
            let mut packet = <crate::packets::VelocityInterpolateOffPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::StateSave => {
            let mut packet = <crate::packets::StateSavePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ReportAutosaveCrash => {
            let mut packet = <crate::packets::ReportAutosaveCrashPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimWideDeletes => {
            let mut packet = <crate::packets::SimWideDeletesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TrackAgent => {
            let mut packet = <crate::packets::TrackAgentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ViewerStats => {
            let mut packet = <crate::packets::ViewerStatsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptAnswerYes => {
            let mut packet = <crate::packets::ScriptAnswerYesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UserReport => {
            let mut packet = <crate::packets::UserReportPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AlertMessage => {
            let mut packet = <crate::packets::AlertMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentAlertMessage => {
            let mut packet = <crate::packets::AgentAlertMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MeanCollisionAlert => {
            let mut packet = <crate::packets::MeanCollisionAlertPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ViewerFrozenMessage => {
            let mut packet = <crate::packets::ViewerFrozenMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::HealthMessage => {
            let mut packet = <crate::packets::HealthMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChatFromSimulator => {
            let mut packet = <crate::packets::ChatFromSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimStats => {
            let mut packet = <crate::packets::SimStatsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestRegionInfo => {
            let mut packet = <crate::packets::RequestRegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionInfo => {
            let mut packet = <crate::packets::RegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GodUpdateRegionInfo => {
            let mut packet = <crate::packets::GodUpdateRegionInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NearestLandingRegionRequest => {
            let mut packet = <crate::packets::NearestLandingRegionRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NearestLandingRegionReply => {
            let mut packet = <crate::packets::NearestLandingRegionReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NearestLandingRegionUpdated => {
            let mut packet = <crate::packets::NearestLandingRegionUpdatedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TeleportLandingStatusChanged => {
            let mut packet = <crate::packets::TeleportLandingStatusChangedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionHandshake => {
            let mut packet = <crate::packets::RegionHandshakePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionHandshakeReply => {
            let mut packet = <crate::packets::RegionHandshakeReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimulatorViewerTimeMessage => {
            let mut packet = <crate::packets::SimulatorViewerTimeMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EnableSimulator => {
            let mut packet = <crate::packets::EnableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DisableSimulator => {
            let mut packet = <crate::packets::DisableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferRequest => {
            let mut packet = <crate::packets::TransferRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferInfo => {
            let mut packet = <crate::packets::TransferInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferAbort => {
            let mut packet = <crate::packets::TransferAbortPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestXfer => {
            let mut packet = <crate::packets::RequestXferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AbortXfer => {
            let mut packet = <crate::packets::AbortXferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarAppearance => {
            let mut packet = <crate::packets::AvatarAppearancePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetFollowCamProperties => {
            let mut packet = <crate::packets::SetFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ClearFollowCamProperties => {
            let mut packet = <crate::packets::ClearFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestPayPrice => {
            let mut packet = <crate::packets::RequestPayPricePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PayPriceReply => {
            let mut packet = <crate::packets::PayPriceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::KickUser => {
            let mut packet = <crate::packets::KickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::KickUserAck => {
            let mut packet = <crate::packets::KickUserAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GodKickUser => {
            let mut packet = <crate::packets::GodKickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SystemKickUser => {
            let mut packet = <crate::packets::SystemKickUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EjectUser => {
            let mut packet = <crate::packets::EjectUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FreezeUser => {
            let mut packet = <crate::packets::FreezeUserPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPropertiesRequest => {
            let mut packet = <crate::packets::AvatarPropertiesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPropertiesRequestBackend => {
            let mut packet = <crate::packets::AvatarPropertiesRequestBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPropertiesReply => {
            let mut packet = <crate::packets::AvatarPropertiesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarInterestsReply => {
            let mut packet = <crate::packets::AvatarInterestsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarGroupsReply => {
            let mut packet = <crate::packets::AvatarGroupsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPropertiesUpdate => {
            let mut packet = <crate::packets::AvatarPropertiesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarInterestsUpdate => {
            let mut packet = <crate::packets::AvatarInterestsUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarNotesReply => {
            let mut packet = <crate::packets::AvatarNotesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarNotesUpdate => {
            let mut packet = <crate::packets::AvatarNotesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarPicksReply => {
            let mut packet = <crate::packets::AvatarPicksReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventInfoRequest => {
            let mut packet = <crate::packets::EventInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventInfoReply => {
            let mut packet = <crate::packets::EventInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventNotificationAddRequest => {
            let mut packet = <crate::packets::EventNotificationAddRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventNotificationRemoveRequest => {
            let mut packet = <crate::packets::EventNotificationRemoveRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventGodDelete => {
            let mut packet = <crate::packets::EventGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PickInfoReply => {
            let mut packet = <crate::packets::PickInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PickInfoUpdate => {
            let mut packet = <crate::packets::PickInfoUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PickDelete => {
            let mut packet = <crate::packets::PickDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PickGodDelete => {
            let mut packet = <crate::packets::PickGodDeletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptQuestion => {
            let mut packet = <crate::packets::ScriptQuestionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptControlChange => {
            let mut packet = <crate::packets::ScriptControlChangePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptDialog => {
            let mut packet = <crate::packets::ScriptDialogPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptDialogReply => {
            let mut packet = <crate::packets::ScriptDialogReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ForceScriptControlRelease => {
            let mut packet = <crate::packets::ForceScriptControlReleasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RevokePermissions => {
            let mut packet = <crate::packets::RevokePermissionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LoadURL => {
            let mut packet = <crate::packets::LoadURLPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptTeleportRequest => {
            let mut packet = <crate::packets::ScriptTeleportRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelOverlay => {
            let mut packet = <crate::packets::ParcelOverlayPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelPropertiesRequestByID => {
            let mut packet = <crate::packets::ParcelPropertiesRequestByIDPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelPropertiesUpdate => {
            let mut packet = <crate::packets::ParcelPropertiesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelReturnObjects => {
            let mut packet = <crate::packets::ParcelReturnObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelSetOtherCleanTime => {
            let mut packet = <crate::packets::ParcelSetOtherCleanTimePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelDisableObjects => {
            let mut packet = <crate::packets::ParcelDisableObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelSelectObjects => {
            let mut packet = <crate::packets::ParcelSelectObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EstateCovenantRequest => {
            let mut packet = <crate::packets::EstateCovenantRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EstateCovenantReply => {
            let mut packet = <crate::packets::EstateCovenantReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ForceObjectSelect => {
            let mut packet = <crate::packets::ForceObjectSelectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelBuyPass => {
            let mut packet = <crate::packets::ParcelBuyPassPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelDeedToGroup => {
            let mut packet = <crate::packets::ParcelDeedToGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelReclaim => {
            let mut packet = <crate::packets::ParcelReclaimPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelClaim => {
            let mut packet = <crate::packets::ParcelClaimPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelJoin => {
            let mut packet = <crate::packets::ParcelJoinPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelDivide => {
            let mut packet = <crate::packets::ParcelDividePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelRelease => {
            let mut packet = <crate::packets::ParcelReleasePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelBuy => {
            let mut packet = <crate::packets::ParcelBuyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelGodForceOwner => {
            let mut packet = <crate::packets::ParcelGodForceOwnerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelAccessListRequest => {
            let mut packet = <crate::packets::ParcelAccessListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelAccessListReply => {
            let mut packet = <crate::packets::ParcelAccessListReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelAccessListUpdate => {
            let mut packet = <crate::packets::ParcelAccessListUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelDwellRequest => {
            let mut packet = <crate::packets::ParcelDwellRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelDwellReply => {
            let mut packet = <crate::packets::ParcelDwellReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestParcelTransfer => {
            let mut packet = <crate::packets::RequestParcelTransferPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateParcel => {
            let mut packet = <crate::packets::UpdateParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveParcel => {
            let mut packet = <crate::packets::RemoveParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MergeParcel => {
            let mut packet = <crate::packets::MergeParcelPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogParcelChanges => {
            let mut packet = <crate::packets::LogParcelChangesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CheckParcelSales => {
            let mut packet = <crate::packets::CheckParcelSalesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelSales => {
            let mut packet = <crate::packets::ParcelSalesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelGodMarkAsContent => {
            let mut packet = <crate::packets::ParcelGodMarkAsContentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ViewerStartAuction => {
            let mut packet = <crate::packets::ViewerStartAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::StartAuction => {
            let mut packet = <crate::packets::StartAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ConfirmAuctionStart => {
            let mut packet = <crate::packets::ConfirmAuctionStartPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CompleteAuction => {
            let mut packet = <crate::packets::CompleteAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CancelAuction => {
            let mut packet = <crate::packets::CancelAuctionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CheckParcelAuctions => {
            let mut packet = <crate::packets::CheckParcelAuctionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelAuctions => {
            let mut packet = <crate::packets::ParcelAuctionsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UUIDNameRequest => {
            let mut packet = <crate::packets::UUIDNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UUIDNameReply => {
            let mut packet = <crate::packets::UUIDNameReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UUIDGroupNameRequest => {
            let mut packet = <crate::packets::UUIDGroupNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UUIDGroupNameReply => {
            let mut packet = <crate::packets::UUIDGroupNameReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChatPass => {
            let mut packet = <crate::packets::ChatPassPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChildAgentDying => {
            let mut packet = <crate::packets::ChildAgentDyingPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChildAgentUnknown => {
            let mut packet = <crate::packets::ChildAgentUnknownPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::KillChildAgents => {
            let mut packet = <crate::packets::KillChildAgentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GetScriptRunning => {
            let mut packet = <crate::packets::GetScriptRunningPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptRunningReply => {
            let mut packet = <crate::packets::ScriptRunningReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetScriptRunning => {
            let mut packet = <crate::packets::SetScriptRunningPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptReset => {
            let mut packet = <crate::packets::ScriptResetPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptSensorRequest => {
            let mut packet = <crate::packets::ScriptSensorRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptSensorReply => {
            let mut packet = <crate::packets::ScriptSensorReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CompleteAgentMovement => {
            let mut packet = <crate::packets::CompleteAgentMovementPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentMovementComplete => {
            let mut packet = <crate::packets::AgentMovementCompletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DataServerLogout => {
            let mut packet = <crate::packets::DataServerLogoutPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogoutRequest => {
            let mut packet = <crate::packets::LogoutRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogoutReply => {
            let mut packet = <crate::packets::LogoutReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ImprovedInstantMessage => {
            let mut packet = <crate::packets::ImprovedInstantMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RetrieveInstantMessages => {
            let mut packet = <crate::packets::RetrieveInstantMessagesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FindAgent => {
            let mut packet = <crate::packets::FindAgentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestGodlikePowers => {
            let mut packet = <crate::packets::RequestGodlikePowersPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GrantGodlikePowers => {
            let mut packet = <crate::packets::GrantGodlikePowersPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GodlikeMessage => {
            let mut packet = <crate::packets::GodlikeMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EstateOwnerMessage => {
            let mut packet = <crate::packets::EstateOwnerMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GenericMessage => {
            let mut packet = <crate::packets::GenericMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LargeGenericMessage => {
            let mut packet = <crate::packets::LargeGenericMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MuteListRequest => {
            let mut packet = <crate::packets::MuteListRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateMuteListEntry => {
            let mut packet = <crate::packets::UpdateMuteListEntryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveMuteListEntry => {
            let mut packet = <crate::packets::RemoveMuteListEntryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CopyInventoryFromNotecard => {
            let mut packet = <crate::packets::CopyInventoryFromNotecardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateInventoryItem => {
            let mut packet = <crate::packets::UpdateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateCreateInventoryItem => {
            let mut packet = <crate::packets::UpdateCreateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoveInventoryItem => {
            let mut packet = <crate::packets::MoveInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CopyInventoryItem => {
            let mut packet = <crate::packets::CopyInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveInventoryItem => {
            let mut packet = <crate::packets::RemoveInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChangeInventoryItemFlags => {
            let mut packet = <crate::packets::ChangeInventoryItemFlagsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SaveAssetIntoInventory => {
            let mut packet = <crate::packets::SaveAssetIntoInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateInventoryFolder => {
            let mut packet = <crate::packets::CreateInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateInventoryFolder => {
            let mut packet = <crate::packets::UpdateInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoveInventoryFolder => {
            let mut packet = <crate::packets::MoveInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveInventoryFolder => {
            let mut packet = <crate::packets::RemoveInventoryFolderPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FetchInventoryDescendents => {
            let mut packet = <crate::packets::FetchInventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InventoryDescendents => {
            let mut packet = <crate::packets::InventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FetchInventory => {
            let mut packet = <crate::packets::FetchInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FetchInventoryReply => {
            let mut packet = <crate::packets::FetchInventoryReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::BulkUpdateInventory => {
            let mut packet = <crate::packets::BulkUpdateInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestInventoryAsset => {
            let mut packet = <crate::packets::RequestInventoryAssetPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InventoryAssetResponse => {
            let mut packet = <crate::packets::InventoryAssetResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveInventoryObjects => {
            let mut packet = <crate::packets::RemoveInventoryObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PurgeInventoryDescendents => {
            let mut packet = <crate::packets::PurgeInventoryDescendentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateTaskInventory => {
            let mut packet = <crate::packets::UpdateTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveTaskInventory => {
            let mut packet = <crate::packets::RemoveTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoveTaskInventory => {
            let mut packet = <crate::packets::MoveTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestTaskInventory => {
            let mut packet = <crate::packets::RequestTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ReplyTaskInventory => {
            let mut packet = <crate::packets::ReplyTaskInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DeRezObject => {
            let mut packet = <crate::packets::DeRezObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DeRezAck => {
            let mut packet = <crate::packets::DeRezAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezObject => {
            let mut packet = <crate::packets::RezObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezObjectFromNotecard => {
            let mut packet = <crate::packets::RezObjectFromNotecardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferInventory => {
            let mut packet = <crate::packets::TransferInventoryPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferInventoryAck => {
            let mut packet = <crate::packets::TransferInventoryAckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AcceptFriendship => {
            let mut packet = <crate::packets::AcceptFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DeclineFriendship => {
            let mut packet = <crate::packets::DeclineFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::FormFriendship => {
            let mut packet = <crate::packets::FormFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TerminateFriendship => {
            let mut packet = <crate::packets::TerminateFriendshipPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::OfferCallingCard => {
            let mut packet = <crate::packets::OfferCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AcceptCallingCard => {
            let mut packet = <crate::packets::AcceptCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DeclineCallingCard => {
            let mut packet = <crate::packets::DeclineCallingCardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezScript => {
            let mut packet = <crate::packets::RezScriptPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateInventoryItem => {
            let mut packet = <crate::packets::CreateInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateLandmarkForEvent => {
            let mut packet = <crate::packets::CreateLandmarkForEventPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventLocationRequest => {
            let mut packet = <crate::packets::EventLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EventLocationReply => {
            let mut packet = <crate::packets::EventLocationReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionHandleRequest => {
            let mut packet = <crate::packets::RegionHandleRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RegionIDAndHandleReply => {
            let mut packet = <crate::packets::RegionIDAndHandleReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoneyTransferRequest => {
            let mut packet = <crate::packets::MoneyTransferRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoneyTransferBackend => {
            let mut packet = <crate::packets::MoneyTransferBackendPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoneyBalanceRequest => {
            let mut packet = <crate::packets::MoneyBalanceRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MoneyBalanceReply => {
            let mut packet = <crate::packets::MoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RoutedMoneyBalanceReply => {
            let mut packet = <crate::packets::RoutedMoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ActivateGestures => {
            let mut packet = <crate::packets::ActivateGesturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DeactivateGestures => {
            let mut packet = <crate::packets::DeactivateGesturesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MuteListUpdate => {
            let mut packet = <crate::packets::MuteListUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UseCachedMuteList => {
            let mut packet = <crate::packets::UseCachedMuteListPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GrantUserRights => {
            let mut packet = <crate::packets::GrantUserRightsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChangeUserRights => {
            let mut packet = <crate::packets::ChangeUserRightsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::OnlineNotification => {
            let mut packet = <crate::packets::OnlineNotificationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::OfflineNotification => {
            let mut packet = <crate::packets::OfflineNotificationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetStartLocationRequest => {
            let mut packet = <crate::packets::SetStartLocationRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetStartLocation => {
            let mut packet = <crate::packets::SetStartLocationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NetTest => {
            let mut packet = <crate::packets::NetTestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetCPURatio => {
            let mut packet = <crate::packets::SetCPURatioPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimCrashed => {
            let mut packet = <crate::packets::SimCrashedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NameValuePair => {
            let mut packet = <crate::packets::NameValuePairPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveNameValuePair => {
            let mut packet = <crate::packets::RemoveNameValuePairPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateAttachment => {
            let mut packet = <crate::packets::UpdateAttachmentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RemoveAttachment => {
            let mut packet = <crate::packets::RemoveAttachmentPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AssetUploadRequest => {
            let mut packet = <crate::packets::AssetUploadRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AssetUploadComplete => {
            let mut packet = <crate::packets::AssetUploadCompletePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EmailMessageRequest => {
            let mut packet = <crate::packets::EmailMessageRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EmailMessageReply => {
            let mut packet = <crate::packets::EmailMessageReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptDataRequest => {
            let mut packet = <crate::packets::ScriptDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptDataReply => {
            let mut packet = <crate::packets::ScriptDataReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateGroupRequest => {
            let mut packet = <crate::packets::CreateGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateGroupReply => {
            let mut packet = <crate::packets::CreateGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateGroupInfo => {
            let mut packet = <crate::packets::UpdateGroupInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleChanges => {
            let mut packet = <crate::packets::GroupRoleChangesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::JoinGroupRequest => {
            let mut packet = <crate::packets::JoinGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::JoinGroupReply => {
            let mut packet = <crate::packets::JoinGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EjectGroupMemberRequest => {
            let mut packet = <crate::packets::EjectGroupMemberRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EjectGroupMemberReply => {
            let mut packet = <crate::packets::EjectGroupMemberReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LeaveGroupRequest => {
            let mut packet = <crate::packets::LeaveGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LeaveGroupReply => {
            let mut packet = <crate::packets::LeaveGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InviteGroupRequest => {
            let mut packet = <crate::packets::InviteGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InviteGroupResponse => {
            let mut packet = <crate::packets::InviteGroupResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupProfileRequest => {
            let mut packet = <crate::packets::GroupProfileRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupProfileReply => {
            let mut packet = <crate::packets::GroupProfileReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountSummaryRequest => {
            let mut packet = <crate::packets::GroupAccountSummaryRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountSummaryReply => {
            let mut packet = <crate::packets::GroupAccountSummaryReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountDetailsRequest => {
            let mut packet = <crate::packets::GroupAccountDetailsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountDetailsReply => {
            let mut packet = <crate::packets::GroupAccountDetailsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountTransactionsRequest => {
            let mut packet = <crate::packets::GroupAccountTransactionsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupAccountTransactionsReply => {
            let mut packet = <crate::packets::GroupAccountTransactionsReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupActiveProposalsRequest => {
            let mut packet = <crate::packets::GroupActiveProposalsRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupActiveProposalItemReply => {
            let mut packet = <crate::packets::GroupActiveProposalItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupVoteHistoryRequest => {
            let mut packet = <crate::packets::GroupVoteHistoryRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupVoteHistoryItemReply => {
            let mut packet = <crate::packets::GroupVoteHistoryItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::StartGroupProposal => {
            let mut packet = <crate::packets::StartGroupProposalPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupProposalBallot => {
            let mut packet = <crate::packets::GroupProposalBallotPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TallyVotes => {
            let mut packet = <crate::packets::TallyVotesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupMembersRequest => {
            let mut packet = <crate::packets::GroupMembersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupMembersReply => {
            let mut packet = <crate::packets::GroupMembersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ActivateGroup => {
            let mut packet = <crate::packets::ActivateGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetGroupContribution => {
            let mut packet = <crate::packets::SetGroupContributionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SetGroupAcceptNotices => {
            let mut packet = <crate::packets::SetGroupAcceptNoticesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleDataRequest => {
            let mut packet = <crate::packets::GroupRoleDataRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleDataReply => {
            let mut packet = <crate::packets::GroupRoleDataReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleMembersRequest => {
            let mut packet = <crate::packets::GroupRoleMembersRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleMembersReply => {
            let mut packet = <crate::packets::GroupRoleMembersReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupTitlesRequest => {
            let mut packet = <crate::packets::GroupTitlesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupTitlesReply => {
            let mut packet = <crate::packets::GroupTitlesReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupTitleUpdate => {
            let mut packet = <crate::packets::GroupTitleUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupRoleUpdate => {
            let mut packet = <crate::packets::GroupRoleUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LiveHelpGroupRequest => {
            let mut packet = <crate::packets::LiveHelpGroupRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LiveHelpGroupReply => {
            let mut packet = <crate::packets::LiveHelpGroupReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentWearablesRequest => {
            let mut packet = <crate::packets::AgentWearablesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentWearablesUpdate => {
            let mut packet = <crate::packets::AgentWearablesUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentIsNowWearing => {
            let mut packet = <crate::packets::AgentIsNowWearingPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentCachedTexture => {
            let mut packet = <crate::packets::AgentCachedTexturePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentCachedTextureResponse => {
            let mut packet = <crate::packets::AgentCachedTextureResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentDataUpdateRequest => {
            let mut packet = <crate::packets::AgentDataUpdateRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentDataUpdate => {
            let mut packet = <crate::packets::AgentDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GroupDataUpdate => {
            let mut packet = <crate::packets::GroupDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentGroupDataUpdate => {
            let mut packet = <crate::packets::AgentGroupDataUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentDropGroup => {
            let mut packet = <crate::packets::AgentDropGroupPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LogTextMessage => {
            let mut packet = <crate::packets::LogTextMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateTrustedCircuit => {
            let mut packet = <crate::packets::CreateTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DenyTrustedCircuit => {
            let mut packet = <crate::packets::DenyTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestTrustedCircuit => {
            let mut packet = <crate::packets::RequestTrustedCircuitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezSingleAttachmentFromInv => {
            let mut packet = <crate::packets::RezSingleAttachmentFromInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezMultipleAttachmentsFromInv => {
            let mut packet = <crate::packets::RezMultipleAttachmentsFromInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::DetachAttachmentIntoInv => {
            let mut packet = <crate::packets::DetachAttachmentIntoInvPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateNewOutfitAttachments => {
            let mut packet = <crate::packets::CreateNewOutfitAttachmentsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UserInfoRequest => {
            let mut packet = <crate::packets::UserInfoRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UserInfoReply => {
            let mut packet = <crate::packets::UserInfoReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::UpdateUserInfo => {
            let mut packet = <crate::packets::UpdateUserInfoPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelRename => {
            let mut packet = <crate::packets::ParcelRenamePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InitiateDownload => {
            let mut packet = <crate::packets::InitiateDownloadPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SystemMessage => {
            let mut packet = <crate::packets::SystemMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapLayerRequest => {
            let mut packet = <crate::packets::MapLayerRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapLayerReply => {
            let mut packet = <crate::packets::MapLayerReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapBlockRequest => {
            let mut packet = <crate::packets::MapBlockRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapNameRequest => {
            let mut packet = <crate::packets::MapNameRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapBlockReply => {
            let mut packet = <crate::packets::MapBlockReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapItemRequest => {
            let mut packet = <crate::packets::MapItemRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MapItemReply => {
            let mut packet = <crate::packets::MapItemReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SendPostcard => {
            let mut packet = <crate::packets::SendPostcardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RpcChannelRequest => {
            let mut packet = <crate::packets::RpcChannelRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RpcChannelReply => {
            let mut packet = <crate::packets::RpcChannelReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RpcScriptRequestInbound => {
            let mut packet = <crate::packets::RpcScriptRequestInboundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RpcScriptRequestInboundForward => {
            let mut packet = <crate::packets::RpcScriptRequestInboundForwardPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RpcScriptReplyInbound => {
            let mut packet = <crate::packets::RpcScriptReplyInboundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ScriptMailRegistration => {
            let mut packet = <crate::packets::ScriptMailRegistrationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelMediaCommandMessage => {
            let mut packet = <crate::packets::ParcelMediaCommandMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelMediaUpdate => {
            let mut packet = <crate::packets::ParcelMediaUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LandStatRequest => {
            let mut packet = <crate::packets::LandStatRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LandStatReply => {
            let mut packet = <crate::packets::LandStatReplyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::Error => {
            let mut packet = <crate::packets::ErrorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectIncludeInSearch => {
            let mut packet = <crate::packets::ObjectIncludeInSearchPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RezRestoreToWorld => {
            let mut packet = <crate::packets::RezRestoreToWorldPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LinkInventoryItem => {
            let mut packet = <crate::packets::LinkInventoryItemPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RetrieveIMsExtended => {
            let mut packet = <crate::packets::RetrieveIMsExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::JoinGroupRequestExtended => {
            let mut packet = <crate::packets::JoinGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CreateGroupRequestExtended => {
            let mut packet = <crate::packets::CreateGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectAdd => {
            let mut packet = <crate::packets::ObjectAddPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::MultipleObjectUpdate => {
            let mut packet = <crate::packets::MultipleObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestMultipleObjects => {
            let mut packet = <crate::packets::RequestMultipleObjectsPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectPosition => {
            let mut packet = <crate::packets::ObjectPositionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestObjectPropertiesFamily => {
            let mut packet = <crate::packets::RequestObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CoarseLocationUpdate => {
            let mut packet = <crate::packets::CoarseLocationUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CrossedRegion => {
            let mut packet = <crate::packets::CrossedRegionPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ConfirmEnableSimulator => {
            let mut packet = <crate::packets::ConfirmEnableSimulatorPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectProperties => {
            let mut packet = <crate::packets::ObjectPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectPropertiesFamily => {
            let mut packet = <crate::packets::ObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelPropertiesRequest => {
            let mut packet = <crate::packets::ParcelPropertiesRequestPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SimStatus => {
            let mut packet = <crate::packets::SimStatusPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AttachedSound => {
            let mut packet = <crate::packets::AttachedSoundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AttachedSoundGainChange => {
            let mut packet = <crate::packets::AttachedSoundGainChangePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::PreloadSound => {
            let mut packet = <crate::packets::PreloadSoundPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::InternalScriptMail => {
            let mut packet = <crate::packets::InternalScriptMailPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ViewerEffect => {
            let mut packet = <crate::packets::ViewerEffectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::StartPingCheck => {
            let mut packet = <crate::packets::StartPingCheckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CompletePingCheck => {
            let mut packet = <crate::packets::CompletePingCheckPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::NeighborList => {
            let mut packet = <crate::packets::NeighborListPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentUpdate => {
            let mut packet = <crate::packets::AgentUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentAnimation => {
            let mut packet = <crate::packets::AgentAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentRequestSit => {
            let mut packet = <crate::packets::AgentRequestSitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AgentSit => {
            let mut packet = <crate::packets::AgentSitPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::RequestImage => {
            let mut packet = <crate::packets::RequestImagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ImageData => {
            let mut packet = <crate::packets::ImageDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ImagePacket => {
            let mut packet = <crate::packets::ImagePacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::LayerData => {
            let mut packet = <crate::packets::LayerDataPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectUpdate => {
            let mut packet = <crate::packets::ObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectUpdateCompressed => {
            let mut packet = <crate::packets::ObjectUpdateCompressedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectUpdateCached => {
            let mut packet = <crate::packets::ObjectUpdateCachedPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ImprovedTerseObjectUpdate => {
            let mut packet = <crate::packets::ImprovedTerseObjectUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::KillObject => {
            let mut packet = <crate::packets::KillObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::TransferPacket => {
            let mut packet = <crate::packets::TransferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SendXferPacket => {
            let mut packet = <crate::packets::SendXferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ConfirmXferPacket => {
            let mut packet = <crate::packets::ConfirmXferPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarAnimation => {
            let mut packet = <crate::packets::AvatarAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AvatarSitResponse => {
            let mut packet = <crate::packets::AvatarSitResponsePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::CameraConstraint => {
            let mut packet = <crate::packets::CameraConstraintPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ParcelProperties => {
            let mut packet = <crate::packets::ParcelPropertiesPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::EdgeDataPacket => {
            let mut packet = <crate::packets::EdgeDataPacketPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChildAgentUpdate => {
            let mut packet = <crate::packets::ChildAgentUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChildAgentAlive => {
            let mut packet = <crate::packets::ChildAgentAlivePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ChildAgentPositionUpdate => {
            let mut packet = <crate::packets::ChildAgentPositionUpdatePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::AtomicPassObject => {
            let mut packet = <crate::packets::AtomicPassObjectPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GenericStreamingMessage => {
            let mut packet = <crate::packets::GenericStreamingMessagePacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::SoundTrigger => {
            let mut packet = <crate::packets::SoundTriggerPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::ObjectAnimation => {
            let mut packet = <crate::packets::ObjectAnimationPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::GameControlInput => {
            let mut packet = <crate::packets::GameControlInputPacket as GeneratedPacket>::new_generated();
            GeneratedPacket::packet_from_osd(&mut packet, body)?;
        }
        PacketType::Default => return Ok(None),
    }
    build_packet(descriptor.packet_type).map(Some)
}
impl GeneratedBlock for crate::packets::TestMessagePacketTestBlock1Block {
    fn new_generated() -> Self {
        Self { test1: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.test1 = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.test1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Test1".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.test1.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Test1") {
            self.test1 = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TestMessagePacketNeighborBlockBlock {
    fn new_generated() -> Self {
        Self {
            test0: 0,
            test1: 0,
            test2: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.test0 = reader.read_u32_le()?;
        self.test1 = reader.read_u32_le()?;
        self.test2 = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.test0)?;
        writer.write_u32_le(self.test1)?;
        writer.write_u32_le(self.test2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Test0".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.test0.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Test1".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.test1.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Test2".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.test2.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Test0") {
            self.test0 = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Test1") {
            self.test1 = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Test2") {
            self.test2 = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PacketAckPacketPacketsBlock {
    fn new_generated() -> Self {
        Self { id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::OpenCircuitPacketCircuitInfoBlock {
    fn new_generated() -> Self {
        Self { ip: 0, port: 0 }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ip = reader.read_u32_le()?;
        self.port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.ip)?;
        writer.write_u16_be(self.port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "IP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ip.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("IP") {
            self.ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AddCircuitCodePacketCircuitCodeBlock {
    fn new_generated() -> Self {
        Self {
            code: 0,
            session_id: libremetaverse_types::UUID::zero(),
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.code = reader.read_u32_le()?;
        self.session_id = reader.read_uuid()?;
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.code)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Code".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.code.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Code") {
            self.code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UseCircuitCodePacketCircuitCodeBlock {
    fn new_generated() -> Self {
        Self {
            code: 0,
            session_id: libremetaverse_types::UUID::zero(),
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.code = reader.read_u32_le()?;
        self.session_id = reader.read_uuid()?;
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.code)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Code".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.code.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Code") {
            self.code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarTextureUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            textures_changed: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.textures_changed = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u8(u8::from(self.textures_changed))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TexturesChanged".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.textures_changed),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TexturesChanged") {
            self.textures_changed = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarTextureUpdatePacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            cache_id: libremetaverse_types::UUID::zero(),
            texture_index: 0,
            host_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 17_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.host_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.cache_id = reader.read_uuid()?;
        self.texture_index = reader.read_u8()?;
        self.host_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.cache_id)?;
        writer.write_u8(self.texture_index)?;
        writer.write_variable(&self.host_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CacheID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.cache_id),
        )?;
        map.add_with_string_osd(
            "TextureIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.texture_index)),
        )?;
        map.add_with_string_osd(
            "HostName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.host_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CacheID") {
            self.cache_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TextureIndex") {
            self.texture_index = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("HostName") {
            self.host_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarTextureUpdatePacketTextureDataBlock {
    fn new_generated() -> Self {
        Self {
            texture_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.texture_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.texture_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TextureID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.texture_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TextureID") {
            self.texture_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorMapUpdatePacketMapDataBlock {
    fn new_generated() -> Self {
        Self { flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorSetMapPacketMapDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            type_: 0,
            map_image: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        28_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.type_ = reader.read_i32_le()?;
        self.map_image = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_i32_le(self.type_)?;
        writer.write_uuid(&self.map_image)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.type_),
        )?;
        map.add_with_string_osd(
            "MapImage".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.map_image),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()?;
        }
        if let Some(value) = map.get("MapImage") {
            self.map_image = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorReadyPacketSimulatorBlockBlock {
    fn new_generated() -> Self {
        Self {
            sim_name: Vec::new(),
            sim_access: 0,
            region_flags: 0,
            region_id: libremetaverse_types::UUID::zero(),
            estate_id: 0,
            parent_estate_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_name = reader.read_variable(1)?;
        self.sim_access = reader.read_u8()?;
        self.region_flags = reader.read_u32_le()?;
        self.region_id = reader.read_uuid()?;
        self.estate_id = reader.read_u32_le()?;
        self.parent_estate_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u8(self.sim_access)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u32_le(self.parent_estate_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParentEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParentEstateID") {
            self.parent_estate_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorReadyPacketTelehubBlockBlock {
    fn new_generated() -> Self {
        Self {
            has_telehub: false,
            telehub_pos: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        13_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.has_telehub = reader.read_u8()? != 0;
        self.telehub_pos = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.has_telehub))?;
        writer.write_vector3(&self.telehub_pos)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "HasTelehub".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.has_telehub),
        )?;
        map.add_with_string_osd(
            "TelehubPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.telehub_pos)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("HasTelehub") {
            self.has_telehub = value.as_boolean()?;
        }
        if let Some(value) = map.get("TelehubPos") {
            self.telehub_pos = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TelehubInfoPacketTelehubBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            object_name: Vec::new(),
            telehub_pos: libremetaverse_types::Vector3::zero(),
            telehub_rot: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 40_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.object_name = reader.read_variable(1)?;
        self.telehub_pos = reader.read_vector3()?;
        self.telehub_rot = reader.read_quaternion()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_variable(&self.object_name, 1)?;
        writer.write_vector3(&self.telehub_pos)?;
        writer.write_quaternion(&self.telehub_rot)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ObjectName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_name.clone()),
        )?;
        map.add_with_string_osd(
            "TelehubPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.telehub_pos)?,
        )?;
        map.add_with_string_osd(
            "TelehubRot".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.telehub_rot)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectName") {
            self.object_name = value.as_binary()?;
        }
        if let Some(value) = map.get("TelehubPos") {
            self.telehub_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("TelehubRot") {
            self.telehub_rot = value.as_quaternion()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TelehubInfoPacketSpawnPointBlockBlock {
    fn new_generated() -> Self {
        Self {
            spawn_point_pos: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.spawn_point_pos = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.spawn_point_pos)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SpawnPointPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.spawn_point_pos)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SpawnPointPos") {
            self.spawn_point_pos = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::SimulatorPresentAtLocationPacketSimulatorPublicHostBlockBlock {
    fn new_generated() -> Self {
        Self {
            port: 0,
            simulator_ip: 0,
            grid_x: 0,
            grid_y: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        14_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.port = reader.read_u16_be()?;
        self.simulator_ip = reader.read_u32_le()?;
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_be(self.port)?;
        writer.write_u32_le(self.simulator_ip)?;
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        map.add_with_string_osd(
            "SimulatorIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.simulator_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("SimulatorIP") {
            self.simulator_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::SimulatorPresentAtLocationPacketNeighborBlockBlock {
    fn new_generated() -> Self {
        Self { ip: 0, port: 0 }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ip = reader.read_u32_le()?;
        self.port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.ip)?;
        writer.write_u16_be(self.port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "IP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ip.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("IP") {
            self.ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::SimulatorPresentAtLocationPacketSimulatorBlockBlock {
    fn new_generated() -> Self {
        Self {
            sim_name: Vec::new(),
            sim_access: 0,
            region_flags: 0,
            region_id: libremetaverse_types::UUID::zero(),
            estate_id: 0,
            parent_estate_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_name = reader.read_variable(1)?;
        self.sim_access = reader.read_u8()?;
        self.region_flags = reader.read_u32_le()?;
        self.region_id = reader.read_uuid()?;
        self.estate_id = reader.read_u32_le()?;
        self.parent_estate_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u8(self.sim_access)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u32_le(self.parent_estate_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParentEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParentEstateID") {
            self.parent_estate_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::SimulatorPresentAtLocationPacketTelehubBlockBlock {
    fn new_generated() -> Self {
        Self {
            has_telehub: false,
            telehub_pos: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        13_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.has_telehub = reader.read_u8()? != 0;
        self.telehub_pos = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.has_telehub))?;
        writer.write_vector3(&self.telehub_pos)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "HasTelehub".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.has_telehub),
        )?;
        map.add_with_string_osd(
            "TelehubPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.telehub_pos)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("HasTelehub") {
            self.has_telehub = value.as_boolean()?;
        }
        if let Some(value) = map.get("TelehubPos") {
            self.telehub_pos = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorLoadPacketSimulatorLoadBlock {
    fn new_generated() -> Self {
        Self {
            time_dilation: 0.0_f32,
            agent_count: 0,
            can_accept_agents: false,
        }
    }
    fn generated_length(&self) -> i32 {
        9_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.time_dilation = reader.read_f32_le()?;
        self.agent_count = reader.read_i32_le()?;
        self.can_accept_agents = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.time_dilation)?;
        writer.write_i32_le(self.agent_count)?;
        writer.write_u8(u8::from(self.can_accept_agents))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TimeDilation".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.time_dilation)),
        )?;
        map.add_with_string_osd(
            "AgentCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.agent_count),
        )?;
        map.add_with_string_osd(
            "CanAcceptAgents".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.can_accept_agents),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TimeDilation") {
            self.time_dilation = value.as_real()? as f32;
        }
        if let Some(value) = map.get("AgentCount") {
            self.agent_count = value.as_integer()?;
        }
        if let Some(value) = map.get("CanAcceptAgents") {
            self.can_accept_agents = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorLoadPacketAgentListBlock {
    fn new_generated() -> Self {
        Self {
            circuit_code: 0,
            x: 0,
            y: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.circuit_code = reader.read_u32_le()?;
        self.x = reader.read_u8()?;
        self.y = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.circuit_code)?;
        writer.write_u8(self.x)?;
        writer.write_u8(self.y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "X".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.x)),
        )?;
        map.add_with_string_osd(
            "Y".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.y)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CircuitCode") {
            self.circuit_code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("X") {
            self.x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Y") {
            self.y = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RegionPresenceRequestByRegionIDPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RegionPresenceRequestByHandlePacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionPresenceResponsePacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            region_handle: 0,
            internal_region_ip: 0,
            external_region_ip: 0,
            region_port: 0,
            valid_until: 0.0_f64,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 42_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.region_handle = reader.read_u64_le()?;
        self.internal_region_ip = reader.read_u32_le()?;
        self.external_region_ip = reader.read_u32_le()?;
        self.region_port = reader.read_u16_be()?;
        self.valid_until = reader.read_f64_le()?;
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_u32_le(self.internal_region_ip)?;
        writer.write_u32_le(self.external_region_ip)?;
        writer.write_u16_be(self.region_port)?;
        writer.write_f64_le(self.valid_until)?;
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "InternalRegionIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.internal_region_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ExternalRegionIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.external_region_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.region_port)),
        )?;
        map.add_with_string_osd(
            "ValidUntil".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.valid_until),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("InternalRegionIP") {
            self.internal_region_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ExternalRegionIP") {
            self.external_region_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionPort") {
            self.region_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ValidUntil") {
            self.valid_until = value.as_real()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateSimulatorPacketSimulatorInfoBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            sim_name: Vec::new(),
            estate_id: 0,
            sim_access: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 21_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.sim_name = reader.read_variable(1)?;
        self.estate_id = reader.read_u32_le()?;
        self.sim_access = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(self.sim_access)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogDwellTimePacketDwellInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            duration: 0.0_f32,
            sim_name: Vec::new(),
            region_x: 0,
            region_y: 0,
            avg_agents_in_view: 0,
            avg_viewer_fps: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 46_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.duration = reader.read_f32_le()?;
        self.sim_name = reader.read_variable(1)?;
        self.region_x = reader.read_u32_le()?;
        self.region_y = reader.read_u32_le()?;
        self.avg_agents_in_view = reader.read_u8()?;
        self.avg_viewer_fps = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_f32_le(self.duration)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.region_x)?;
        writer.write_u32_le(self.region_y)?;
        writer.write_u8(self.avg_agents_in_view)?;
        writer.write_u8(self.avg_viewer_fps)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Duration".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.duration)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "RegionX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AvgAgentsInView".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.avg_agents_in_view),
            ),
        )?;
        map.add_with_string_osd(
            "AvgViewerFPS".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.avg_viewer_fps)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Duration") {
            self.duration = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("RegionX") {
            self.region_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionY") {
            self.region_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("AvgAgentsInView") {
            self.avg_agents_in_view = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AvgViewerFPS") {
            self.avg_viewer_fps = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FeatureDisabledPacketFailureInfoBlock {
    fn new_generated() -> Self {
        Self {
            error_message: Vec::new(),
            agent_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.error_message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.error_message = reader.read_variable(1)?;
        self.agent_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.error_message, 1)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ErrorMessage".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.error_message.clone()),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ErrorMessage") {
            self.error_message = value.as_binary()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::LogFailedMoneyTransactionPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            transaction_time: 0,
            transaction_type: 0,
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            amount: 0,
            simulator_ip: 0,
            grid_x: 0,
            grid_y: 0,
            failure_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        74_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.transaction_time = reader.read_u32_le()?;
        self.transaction_type = reader.read_i32_le()?;
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        self.flags = reader.read_u8()?;
        self.amount = reader.read_i32_le()?;
        self.simulator_ip = reader.read_u32_le()?;
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        self.failure_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.transaction_time)?;
        writer.write_i32_le(self.transaction_type)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_u8(self.flags)?;
        writer.write_i32_le(self.amount)?;
        writer.write_u32_le(self.simulator_ip)?;
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        writer.write_u8(self.failure_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TransactionTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.transaction_time.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "SimulatorIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.simulator_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FailureType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.failure_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionTime") {
            self.transaction_time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("SimulatorIP") {
            self.simulator_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FailureType") {
            self.failure_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserReportInternalPacketReportDataBlock {
    fn new_generated() -> Self {
        Self {
            report_type: 0,
            category: 0,
            reporter_id: libremetaverse_types::UUID::zero(),
            viewer_position: libremetaverse_types::Vector3::zero(),
            agent_position: libremetaverse_types::Vector3::zero(),
            screenshot_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            last_owner_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            region_id: libremetaverse_types::UUID::zero(),
            abuser_id: libremetaverse_types::UUID::zero(),
            abuse_region_name: Vec::new(),
            abuse_region_id: libremetaverse_types::UUID::zero(),
            summary: Vec::new(),
            details: Vec::new(),
            version_string: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 170_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.abuse_region_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.summary.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.details.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.version_string.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.report_type = reader.read_u8()?;
        self.category = reader.read_u8()?;
        self.reporter_id = reader.read_uuid()?;
        self.viewer_position = reader.read_vector3()?;
        self.agent_position = reader.read_vector3()?;
        self.screenshot_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.last_owner_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.region_id = reader.read_uuid()?;
        self.abuser_id = reader.read_uuid()?;
        self.abuse_region_name = reader.read_variable(1)?;
        self.abuse_region_id = reader.read_uuid()?;
        self.summary = reader.read_variable(1)?;
        self.details = reader.read_variable(2)?;
        self.version_string = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.report_type)?;
        writer.write_u8(self.category)?;
        writer.write_uuid(&self.reporter_id)?;
        writer.write_vector3(&self.viewer_position)?;
        writer.write_vector3(&self.agent_position)?;
        writer.write_uuid(&self.screenshot_id)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.last_owner_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_uuid(&self.abuser_id)?;
        writer.write_variable(&self.abuse_region_name, 1)?;
        writer.write_uuid(&self.abuse_region_id)?;
        writer.write_variable(&self.summary, 1)?;
        writer.write_variable(&self.details, 2)?;
        writer.write_variable(&self.version_string, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ReportType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.report_type)),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "ReporterID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.reporter_id),
        )?;
        map.add_with_string_osd(
            "ViewerPosition".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.viewer_position)?,
        )?;
        map.add_with_string_osd(
            "AgentPosition".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.agent_position)?,
        )?;
        map.add_with_string_osd(
            "ScreenshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.screenshot_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "LastOwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.last_owner_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "AbuserID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.abuser_id),
        )?;
        map.add_with_string_osd(
            "AbuseRegionName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.abuse_region_name.clone()),
        )?;
        map.add_with_string_osd(
            "AbuseRegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.abuse_region_id),
        )?;
        map.add_with_string_osd(
            "Summary".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.summary.clone()),
        )?;
        map.add_with_string_osd(
            "Details".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.details.clone()),
        )?;
        map.add_with_string_osd(
            "VersionString".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.version_string.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ReportType") {
            self.report_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ReporterID") {
            self.reporter_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ViewerPosition") {
            self.viewer_position = value.as_vector3()?;
        }
        if let Some(value) = map.get("AgentPosition") {
            self.agent_position = value.as_vector3()?;
        }
        if let Some(value) = map.get("ScreenshotID") {
            self.screenshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LastOwnerID") {
            self.last_owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AbuserID") {
            self.abuser_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AbuseRegionName") {
            self.abuse_region_name = value.as_binary()?;
        }
        if let Some(value) = map.get("AbuseRegionID") {
            self.abuse_region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Summary") {
            self.summary = value.as_binary()?;
        }
        if let Some(value) = map.get("Details") {
            self.details = value.as_binary()?;
        }
        if let Some(value) = map.get("VersionString") {
            self.version_string = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetSimStatusInDatabasePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            host_name: Vec::new(),
            x: 0,
            y: 0,
            pid: 0,
            agent_count: 0,
            time_to_live: 0,
            status: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.host_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.status.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.host_name = reader.read_variable(1)?;
        self.x = reader.read_i32_le()?;
        self.y = reader.read_i32_le()?;
        self.pid = reader.read_i32_le()?;
        self.agent_count = reader.read_i32_le()?;
        self.time_to_live = reader.read_i32_le()?;
        self.status = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_variable(&self.host_name, 1)?;
        writer.write_i32_le(self.x)?;
        writer.write_i32_le(self.y)?;
        writer.write_i32_le(self.pid)?;
        writer.write_i32_le(self.agent_count)?;
        writer.write_i32_le(self.time_to_live)?;
        writer.write_variable(&self.status, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "HostName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.host_name.clone()),
        )?;
        map.add_with_string_osd(
            "X".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.x),
        )?;
        map.add_with_string_osd(
            "Y".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.y),
        )?;
        map.add_with_string_osd(
            "PID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pid),
        )?;
        map.add_with_string_osd(
            "AgentCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.agent_count),
        )?;
        map.add_with_string_osd(
            "TimeToLive".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.time_to_live),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.status.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("HostName") {
            self.host_name = value.as_binary()?;
        }
        if let Some(value) = map.get("X") {
            self.x = value.as_integer()?;
        }
        if let Some(value) = map.get("Y") {
            self.y = value.as_integer()?;
        }
        if let Some(value) = map.get("PID") {
            self.pid = value.as_integer()?;
        }
        if let Some(value) = map.get("AgentCount") {
            self.agent_count = value.as_integer()?;
        }
        if let Some(value) = map.get("TimeToLive") {
            self.time_to_live = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetSimPresenceInDatabasePacketSimDataBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            host_name: Vec::new(),
            grid_x: 0,
            grid_y: 0,
            pid: 0,
            agent_count: 0,
            time_to_live: 0,
            status: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.host_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.status.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.host_name = reader.read_variable(1)?;
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        self.pid = reader.read_i32_le()?;
        self.agent_count = reader.read_i32_le()?;
        self.time_to_live = reader.read_i32_le()?;
        self.status = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_variable(&self.host_name, 1)?;
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        writer.write_i32_le(self.pid)?;
        writer.write_i32_le(self.agent_count)?;
        writer.write_i32_le(self.time_to_live)?;
        writer.write_variable(&self.status, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "HostName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.host_name.clone()),
        )?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pid),
        )?;
        map.add_with_string_osd(
            "AgentCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.agent_count),
        )?;
        map.add_with_string_osd(
            "TimeToLive".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.time_to_live),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.status.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("HostName") {
            self.host_name = value.as_binary()?;
        }
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PID") {
            self.pid = value.as_integer()?;
        }
        if let Some(value) = map.get("AgentCount") {
            self.agent_count = value.as_integer()?;
        }
        if let Some(value) = map.get("TimeToLive") {
            self.time_to_live = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EconomyDataPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            object_capacity: 0,
            object_count: 0,
            price_energy_unit: 0,
            price_object_claim: 0,
            price_public_object_decay: 0,
            price_public_object_delete: 0,
            price_parcel_claim: 0,
            price_parcel_claim_factor: 0.0_f32,
            price_upload: 0,
            price_rent_light: 0,
            teleport_min_price: 0,
            teleport_price_exponent: 0.0_f32,
            energy_efficiency: 0.0_f32,
            price_object_rent: 0.0_f32,
            price_object_scale_factor: 0.0_f32,
            price_parcel_rent: 0,
            price_group_create: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        68_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_capacity = reader.read_i32_le()?;
        self.object_count = reader.read_i32_le()?;
        self.price_energy_unit = reader.read_i32_le()?;
        self.price_object_claim = reader.read_i32_le()?;
        self.price_public_object_decay = reader.read_i32_le()?;
        self.price_public_object_delete = reader.read_i32_le()?;
        self.price_parcel_claim = reader.read_i32_le()?;
        self.price_parcel_claim_factor = reader.read_f32_le()?;
        self.price_upload = reader.read_i32_le()?;
        self.price_rent_light = reader.read_i32_le()?;
        self.teleport_min_price = reader.read_i32_le()?;
        self.teleport_price_exponent = reader.read_f32_le()?;
        self.energy_efficiency = reader.read_f32_le()?;
        self.price_object_rent = reader.read_f32_le()?;
        self.price_object_scale_factor = reader.read_f32_le()?;
        self.price_parcel_rent = reader.read_i32_le()?;
        self.price_group_create = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.object_capacity)?;
        writer.write_i32_le(self.object_count)?;
        writer.write_i32_le(self.price_energy_unit)?;
        writer.write_i32_le(self.price_object_claim)?;
        writer.write_i32_le(self.price_public_object_decay)?;
        writer.write_i32_le(self.price_public_object_delete)?;
        writer.write_i32_le(self.price_parcel_claim)?;
        writer.write_f32_le(self.price_parcel_claim_factor)?;
        writer.write_i32_le(self.price_upload)?;
        writer.write_i32_le(self.price_rent_light)?;
        writer.write_i32_le(self.teleport_min_price)?;
        writer.write_f32_le(self.teleport_price_exponent)?;
        writer.write_f32_le(self.energy_efficiency)?;
        writer.write_f32_le(self.price_object_rent)?;
        writer.write_f32_le(self.price_object_scale_factor)?;
        writer.write_i32_le(self.price_parcel_rent)?;
        writer.write_i32_le(self.price_group_create)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectCapacity".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.object_capacity),
        )?;
        map.add_with_string_osd(
            "ObjectCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.object_count),
        )?;
        map.add_with_string_osd(
            "PriceEnergyUnit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_energy_unit),
        )?;
        map.add_with_string_osd(
            "PriceObjectClaim".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_object_claim),
        )?;
        map.add_with_string_osd(
            "PricePublicObjectDecay".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_public_object_decay),
        )?;
        map.add_with_string_osd(
            "PricePublicObjectDelete".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_public_object_delete),
        )?;
        map.add_with_string_osd(
            "PriceParcelClaim".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_parcel_claim),
        )?;
        map.add_with_string_osd(
            "PriceParcelClaimFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.price_parcel_claim_factor),
            ),
        )?;
        map.add_with_string_osd(
            "PriceUpload".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_upload),
        )?;
        map.add_with_string_osd(
            "PriceRentLight".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_rent_light),
        )?;
        map.add_with_string_osd(
            "TeleportMinPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.teleport_min_price),
        )?;
        map.add_with_string_osd(
            "TeleportPriceExponent".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.teleport_price_exponent),
            ),
        )?;
        map.add_with_string_osd(
            "EnergyEfficiency".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.energy_efficiency)),
        )?;
        map.add_with_string_osd(
            "PriceObjectRent".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.price_object_rent)),
        )?;
        map.add_with_string_osd(
            "PriceObjectScaleFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.price_object_scale_factor),
            ),
        )?;
        map.add_with_string_osd(
            "PriceParcelRent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_parcel_rent),
        )?;
        map.add_with_string_osd(
            "PriceGroupCreate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_group_create),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectCapacity") {
            self.object_capacity = value.as_integer()?;
        }
        if let Some(value) = map.get("ObjectCount") {
            self.object_count = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceEnergyUnit") {
            self.price_energy_unit = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceObjectClaim") {
            self.price_object_claim = value.as_integer()?;
        }
        if let Some(value) = map.get("PricePublicObjectDecay") {
            self.price_public_object_decay = value.as_integer()?;
        }
        if let Some(value) = map.get("PricePublicObjectDelete") {
            self.price_public_object_delete = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceParcelClaim") {
            self.price_parcel_claim = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceParcelClaimFactor") {
            self.price_parcel_claim_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PriceUpload") {
            self.price_upload = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceRentLight") {
            self.price_rent_light = value.as_integer()?;
        }
        if let Some(value) = map.get("TeleportMinPrice") {
            self.teleport_min_price = value.as_integer()?;
        }
        if let Some(value) = map.get("TeleportPriceExponent") {
            self.teleport_price_exponent = value.as_real()? as f32;
        }
        if let Some(value) = map.get("EnergyEfficiency") {
            self.energy_efficiency = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PriceObjectRent") {
            self.price_object_rent = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PriceObjectScaleFactor") {
            self.price_object_scale_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PriceParcelRent") {
            self.price_parcel_rent = value.as_integer()?;
        }
        if let Some(value) = map.get("PriceGroupCreate") {
            self.price_group_create = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self { name: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerRequestBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
            god_level: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        49_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        self.god_level = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.query_id)?;
        writer.write_u8(self.god_level)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "GodLevel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.god_level)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GodLevel") {
            self.god_level = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerRequestBackendPacketDataBlock {
    fn new_generated() -> Self {
        Self { name: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPickerReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            avatar_id: libremetaverse_types::UUID::zero(),
            first_name: Vec::new(),
            last_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.first_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.avatar_id = reader.read_uuid()?;
        self.first_name = reader.read_variable(1)?;
        self.last_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.avatar_id)?;
        writer.write_variable(&self.first_name, 1)?;
        writer.write_variable(&self.last_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        map.add_with_string_osd(
            "FirstName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.first_name.clone()),
        )?;
        map.add_with_string_osd(
            "LastName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FirstName") {
            self.first_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LastName") {
            self.last_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesQueryPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_text: Vec::new(),
            query_flags: 0,
            category: 0,
            sim_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 5_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.category = reader.read_i8()?;
        self.sim_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i8(self.category)?;
        writer.write_variable(&self.sim_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesReplyPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PlacesReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            desc: Vec::new(),
            actual_area: 0,
            billable_area: 0,
            flags: 0,
            global_x: 0.0_f32,
            global_y: 0.0_f32,
            global_z: 0.0_f32,
            sim_name: Vec::new(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            dwell: 0.0_f32,
            price: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 61_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.desc.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(1)?;
        self.actual_area = reader.read_i32_le()?;
        self.billable_area = reader.read_i32_le()?;
        self.flags = reader.read_u8()?;
        self.global_x = reader.read_f32_le()?;
        self.global_y = reader.read_f32_le()?;
        self.global_z = reader.read_f32_le()?;
        self.sim_name = reader.read_variable(1)?;
        self.snapshot_id = reader.read_uuid()?;
        self.dwell = reader.read_f32_le()?;
        self.price = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 1)?;
        writer.write_i32_le(self.actual_area)?;
        writer.write_i32_le(self.billable_area)?;
        writer.write_u8(self.flags)?;
        writer.write_f32_le(self.global_x)?;
        writer.write_f32_le(self.global_y)?;
        writer.write_f32_le(self.global_z)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_f32_le(self.dwell)?;
        writer.write_i32_le(self.price)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        map.add_with_string_osd(
            "BillableArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.billable_area),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "GlobalX".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_x)),
        )?;
        map.add_with_string_osd(
            "GlobalY".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_y)),
        )?;
        map.add_with_string_osd(
            "GlobalZ".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_z)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "Dwell".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.dwell)),
        )?;
        map.add_with_string_osd(
            "Price".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        if let Some(value) = map.get("BillableArea") {
            self.billable_area = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("GlobalX") {
            self.global_x = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GlobalY") {
            self.global_y = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GlobalZ") {
            self.global_z = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Dwell") {
            self.dwell = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Price") {
            self.price = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirFindQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirFindQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirFindQueryBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirFindQueryBackendPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            query_start: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.query_start = reader.read_i32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i32_le(self.query_start)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            category: 0,
            sim_name: Vec::new(),
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 25_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.category = reader.read_i8()?;
        self.sim_name = reader.read_variable(1)?;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i8(self.category)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesQueryBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesQueryBackendPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            category: 0,
            sim_name: Vec::new(),
            estate_id: 0,
            godlike: false,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 30_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.category = reader.read_i8()?;
        self.sim_name = reader.read_variable(1)?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i8(self.category)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            for_sale: false,
            auction: false,
            dwell: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 22_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.for_sale = reader.read_u8()? != 0;
        self.auction = reader.read_u8()? != 0;
        self.dwell = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(u8::from(self.for_sale))?;
        writer.write_u8(u8::from(self.auction))?;
        writer.write_f32_le(self.dwell)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "ForSale".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.for_sale),
        )?;
        map.add_with_string_osd(
            "Auction".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.auction),
        )?;
        map.add_with_string_osd(
            "Dwell".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.dwell)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("ForSale") {
            self.for_sale = value.as_boolean()?;
        }
        if let Some(value) = map.get("Auction") {
            self.auction = value.as_boolean()?;
        }
        if let Some(value) = map.get("Dwell") {
            self.dwell = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPlacesReplyPacketStatusDataBlock {
    fn new_generated() -> Self {
        Self { status: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.status = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.status)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.status.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Status") {
            self.status = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPeopleReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPeopleReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPeopleReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            first_name: Vec::new(),
            last_name: Vec::new(),
            group: Vec::new(),
            online: false,
            reputation: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 21_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.first_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.group.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.first_name = reader.read_variable(1)?;
        self.last_name = reader.read_variable(1)?;
        self.group = reader.read_variable(1)?;
        self.online = reader.read_u8()? != 0;
        self.reputation = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_variable(&self.first_name, 1)?;
        writer.write_variable(&self.last_name, 1)?;
        writer.write_variable(&self.group, 1)?;
        writer.write_u8(u8::from(self.online))?;
        writer.write_i32_le(self.reputation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "FirstName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.first_name.clone()),
        )?;
        map.add_with_string_osd(
            "LastName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_name.clone()),
        )?;
        map.add_with_string_osd(
            "Group".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group.clone()),
        )?;
        map.add_with_string_osd(
            "Online".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.online),
        )?;
        map.add_with_string_osd(
            "Reputation".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.reputation),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FirstName") {
            self.first_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LastName") {
            self.last_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Group") {
            self.group = value.as_binary()?;
        }
        if let Some(value) = map.get("Online") {
            self.online = value.as_boolean()?;
        }
        if let Some(value) = map.get("Reputation") {
            self.reputation = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirEventsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirEventsReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirEventsReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            event_id: 0,
            date: Vec::new(),
            unix_time: 0,
            event_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.date.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.event_id = reader.read_u32_le()?;
        self.date = reader.read_variable(1)?;
        self.unix_time = reader.read_u32_le()?;
        self.event_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u32_le(self.event_id)?;
        writer.write_variable(&self.date, 1)?;
        writer.write_u32_le(self.unix_time)?;
        writer.write_u32_le(self.event_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Date".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.date.clone()),
        )?;
        map.add_with_string_osd(
            "UnixTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.unix_time.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EventFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Date") {
            self.date = value.as_binary()?;
        }
        if let Some(value) = map.get("UnixTime") {
            self.unix_time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EventFlags") {
            self.event_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirEventsReplyPacketStatusDataBlock {
    fn new_generated() -> Self {
        Self { status: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.status = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.status)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.status.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Status") {
            self.status = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirGroupsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirGroupsReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirGroupsReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            group_name: Vec::new(),
            members: 0,
            search_order: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.group_name = reader.read_variable(1)?;
        self.members = reader.read_i32_le()?;
        self.search_order = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.group_name, 1)?;
        writer.write_i32_le(self.members)?;
        writer.write_f32_le(self.search_order)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "GroupName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_name.clone()),
        )?;
        map.add_with_string_osd(
            "Members".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.members),
        )?;
        map.add_with_string_osd(
            "SearchOrder".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.search_order)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupName") {
            self.group_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Members") {
            self.members = value.as_integer()?;
        }
        if let Some(value) = map.get("SearchOrder") {
            self.search_order = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            category: 0,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.category = reader.read_u32_le()?;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_u32_le(self.category)?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedQueryBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedQueryBackendPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            category: 0,
            estate_id: 0,
            godlike: false,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.category = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_u32_le(self.category)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            classified_flags: 0,
            creation_date: 0,
            expiration_date: 0,
            price_for_listing: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.classified_flags = reader.read_u8()?;
        self.creation_date = reader.read_u32_le()?;
        self.expiration_date = reader.read_u32_le()?;
        self.price_for_listing = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(self.classified_flags)?;
        writer.write_u32_le(self.creation_date)?;
        writer.write_u32_le(self.expiration_date)?;
        writer.write_i32_le(self.price_for_listing)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "ClassifiedFlags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.classified_flags),
            ),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.creation_date.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ExpirationDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.expiration_date.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PriceForListing".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_for_listing),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("ClassifiedFlags") {
            self.classified_flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ExpirationDate") {
            self.expiration_date = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PriceForListing") {
            self.price_for_listing = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirClassifiedReplyPacketStatusDataBlock {
    fn new_generated() -> Self {
        Self { status: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.status = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.status)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.status.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Status") {
            self.status = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarClassifiedReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            target_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.target_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.target_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarClassifiedReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            creation_date: 0,
            expiration_date: 0,
            category: 0,
            name: Vec::new(),
            desc: Vec::new(),
            parcel_id: libremetaverse_types::UUID::zero(),
            parent_estate: 0,
            snapshot_id: libremetaverse_types::UUID::zero(),
            sim_name: Vec::new(),
            pos_global: libremetaverse_types::Vector3d::zero(),
            parcel_name: Vec::new(),
            classified_flags: 0,
            price_for_listing: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 109_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.desc.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.parcel_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.creation_date = reader.read_u32_le()?;
        self.expiration_date = reader.read_u32_le()?;
        self.category = reader.read_u32_le()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(2)?;
        self.parcel_id = reader.read_uuid()?;
        self.parent_estate = reader.read_u32_le()?;
        self.snapshot_id = reader.read_uuid()?;
        self.sim_name = reader.read_variable(1)?;
        self.pos_global = reader.read_vector3d()?;
        self.parcel_name = reader.read_variable(1)?;
        self.classified_flags = reader.read_u8()?;
        self.price_for_listing = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_u32_le(self.creation_date)?;
        writer.write_u32_le(self.expiration_date)?;
        writer.write_u32_le(self.category)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 2)?;
        writer.write_uuid(&self.parcel_id)?;
        writer.write_u32_le(self.parent_estate)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_vector3d(&self.pos_global)?;
        writer.write_variable(&self.parcel_name, 1)?;
        writer.write_u8(self.classified_flags)?;
        writer.write_i32_le(self.price_for_listing)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.creation_date.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ExpirationDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.expiration_date.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "ParentEstate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "PosGlobal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.pos_global)?,
        )?;
        map.add_with_string_osd(
            "ParcelName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parcel_name.clone()),
        )?;
        map.add_with_string_osd(
            "ClassifiedFlags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.classified_flags),
            ),
        )?;
        map.add_with_string_osd(
            "PriceForListing".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_for_listing),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ExpirationDate") {
            self.expiration_date = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentEstate") {
            self.parent_estate = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("PosGlobal") {
            self.pos_global = value.as_vector3d()?;
        }
        if let Some(value) = map.get("ParcelName") {
            self.parcel_name = value.as_binary()?;
        }
        if let Some(value) = map.get("ClassifiedFlags") {
            self.classified_flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PriceForListing") {
            self.price_for_listing = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedInfoUpdatePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
            category: 0,
            name: Vec::new(),
            desc: Vec::new(),
            parcel_id: libremetaverse_types::UUID::zero(),
            parent_estate: 0,
            snapshot_id: libremetaverse_types::UUID::zero(),
            pos_global: libremetaverse_types::Vector3d::zero(),
            classified_flags: 0,
            price_for_listing: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 85_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.desc.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        self.category = reader.read_u32_le()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(2)?;
        self.parcel_id = reader.read_uuid()?;
        self.parent_estate = reader.read_u32_le()?;
        self.snapshot_id = reader.read_uuid()?;
        self.pos_global = reader.read_vector3d()?;
        self.classified_flags = reader.read_u8()?;
        self.price_for_listing = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        writer.write_u32_le(self.category)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 2)?;
        writer.write_uuid(&self.parcel_id)?;
        writer.write_u32_le(self.parent_estate)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_vector3d(&self.pos_global)?;
        writer.write_u8(self.classified_flags)?;
        writer.write_i32_le(self.price_for_listing)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "ParentEstate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "PosGlobal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.pos_global)?,
        )?;
        map.add_with_string_osd(
            "ClassifiedFlags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.classified_flags),
            ),
        )?;
        map.add_with_string_osd(
            "PriceForListing".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_for_listing),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentEstate") {
            self.parent_estate = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PosGlobal") {
            self.pos_global = value.as_vector3d()?;
        }
        if let Some(value) = map.get("ClassifiedFlags") {
            self.classified_flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PriceForListing") {
            self.price_for_listing = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedDeletePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedGodDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClassifiedGodDeletePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            classified_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.classified_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.classified_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ClassifiedID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.classified_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ClassifiedID") {
            self.classified_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_flags: 0,
            search_type: 0,
            price: 0,
            area: 0,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_flags = reader.read_u32_le()?;
        self.search_type = reader.read_u32_le()?;
        self.price = reader.read_i32_le()?;
        self.area = reader.read_i32_le()?;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_u32_le(self.search_type)?;
        writer.write_i32_le(self.price)?;
        writer.write_i32_le(self.area)?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SearchType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.search_type.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Price".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price),
        )?;
        map.add_with_string_osd(
            "Area".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.area),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SearchType") {
            self.search_type = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Price") {
            self.price = value.as_integer()?;
        }
        if let Some(value) = map.get("Area") {
            self.area = value.as_integer()?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandQueryBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandQueryBackendPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_flags: 0,
            search_type: 0,
            price: 0,
            area: 0,
            query_start: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_flags = reader.read_u32_le()?;
        self.search_type = reader.read_u32_le()?;
        self.price = reader.read_i32_le()?;
        self.area = reader.read_i32_le()?;
        self.query_start = reader.read_i32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_u32_le(self.search_type)?;
        writer.write_i32_le(self.price)?;
        writer.write_i32_le(self.area)?;
        writer.write_i32_le(self.query_start)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SearchType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.search_type.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Price".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price),
        )?;
        map.add_with_string_osd(
            "Area".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.area),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SearchType") {
            self.search_type = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Price") {
            self.price = value.as_integer()?;
        }
        if let Some(value) = map.get("Area") {
            self.area = value.as_integer()?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirLandReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            auction: false,
            for_sale: false,
            sale_price: 0,
            actual_area: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 26_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.auction = reader.read_u8()? != 0;
        self.for_sale = reader.read_u8()? != 0;
        self.sale_price = reader.read_i32_le()?;
        self.actual_area = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(u8::from(self.auction))?;
        writer.write_u8(u8::from(self.for_sale))?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_i32_le(self.actual_area)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Auction".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.auction),
        )?;
        map.add_with_string_osd(
            "ForSale".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.for_sale),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Auction") {
            self.auction = value.as_boolean()?;
        }
        if let Some(value) = map.get("ForSale") {
            self.for_sale = value.as_boolean()?;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularQueryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularQueryPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_u32_le(self.query_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularQueryBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularQueryBackendPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_flags: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        25_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_flags = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DirPopularReplyPacketQueryRepliesBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            dwell: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 20_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.dwell = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_f32_le(self.dwell)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Dwell".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.dwell)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Dwell") {
            self.dwell = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelInfoRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelInfoRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelInfoReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelInfoReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            desc: Vec::new(),
            actual_area: 0,
            billable_area: 0,
            flags: 0,
            global_x: 0.0_f32,
            global_y: 0.0_f32,
            global_z: 0.0_f32,
            sim_name: Vec::new(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            dwell: 0.0_f32,
            sale_price: 0,
            auction_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 81_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.desc.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(1)?;
        self.actual_area = reader.read_i32_le()?;
        self.billable_area = reader.read_i32_le()?;
        self.flags = reader.read_u8()?;
        self.global_x = reader.read_f32_le()?;
        self.global_y = reader.read_f32_le()?;
        self.global_z = reader.read_f32_le()?;
        self.sim_name = reader.read_variable(1)?;
        self.snapshot_id = reader.read_uuid()?;
        self.dwell = reader.read_f32_le()?;
        self.sale_price = reader.read_i32_le()?;
        self.auction_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 1)?;
        writer.write_i32_le(self.actual_area)?;
        writer.write_i32_le(self.billable_area)?;
        writer.write_u8(self.flags)?;
        writer.write_f32_le(self.global_x)?;
        writer.write_f32_le(self.global_y)?;
        writer.write_f32_le(self.global_z)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_f32_le(self.dwell)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_i32_le(self.auction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        map.add_with_string_osd(
            "BillableArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.billable_area),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "GlobalX".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_x)),
        )?;
        map.add_with_string_osd(
            "GlobalY".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_y)),
        )?;
        map.add_with_string_osd(
            "GlobalZ".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.global_z)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "Dwell".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.dwell)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "AuctionID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.auction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        if let Some(value) = map.get("BillableArea") {
            self.billable_area = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("GlobalX") {
            self.global_x = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GlobalY") {
            self.global_y = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GlobalZ") {
            self.global_z = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Dwell") {
            self.dwell = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("AuctionID") {
            self.auction_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelObjectOwnersRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelObjectOwnersRequestPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelObjectOwnersReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
            is_group_owned: false,
            count: 0,
            online_status: false,
        }
    }
    fn generated_length(&self) -> i32 {
        22_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        self.is_group_owned = reader.read_u8()? != 0;
        self.count = reader.read_i32_le()?;
        self.online_status = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(u8::from(self.is_group_owned))?;
        writer.write_i32_le(self.count)?;
        writer.write_u8(u8::from(self.online_status))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "IsGroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_group_owned),
        )?;
        map.add_with_string_osd(
            "Count".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.count),
        )?;
        map.add_with_string_osd(
            "OnlineStatus".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.online_status),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsGroupOwned") {
            self.is_group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("Count") {
            self.count = value.as_integer()?;
        }
        if let Some(value) = map.get("OnlineStatus") {
            self.online_status = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticesListRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticesListRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticesListReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticesListReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            notice_id: libremetaverse_types::UUID::zero(),
            timestamp: 0,
            from_name: Vec::new(),
            subject: Vec::new(),
            has_attachment: false,
            asset_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 22_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.from_name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.subject.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.notice_id = reader.read_uuid()?;
        self.timestamp = reader.read_u32_le()?;
        self.from_name = reader.read_variable(2)?;
        self.subject = reader.read_variable(2)?;
        self.has_attachment = reader.read_u8()? != 0;
        self.asset_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.notice_id)?;
        writer.write_u32_le(self.timestamp)?;
        writer.write_variable(&self.from_name, 2)?;
        writer.write_variable(&self.subject, 2)?;
        writer.write_u8(u8::from(self.has_attachment))?;
        writer.write_u8(self.asset_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NoticeID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.notice_id),
        )?;
        map.add_with_string_osd(
            "Timestamp".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.timestamp.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FromName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_name.clone()),
        )?;
        map.add_with_string_osd(
            "Subject".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.subject.clone()),
        )?;
        map.add_with_string_osd(
            "HasAttachment".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.has_attachment),
        )?;
        map.add_with_string_osd(
            "AssetType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.asset_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NoticeID") {
            self.notice_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Timestamp") {
            self.timestamp = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FromName") {
            self.from_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Subject") {
            self.subject = value.as_binary()?;
        }
        if let Some(value) = map.get("HasAttachment") {
            self.has_attachment = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetType") {
            self.asset_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticeRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticeRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_notice_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_notice_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_notice_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupNoticeID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_notice_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupNoticeID") {
            self.group_notice_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticeAddPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupNoticeAddPacketMessageBlockBlock {
    fn new_generated() -> Self {
        Self {
            to_group_id: libremetaverse_types::UUID::zero(),
            id: libremetaverse_types::UUID::zero(),
            dialog: 0,
            from_agent_name: Vec::new(),
            message: Vec::new(),
            binary_bucket: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.from_agent_name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.binary_bucket.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.to_group_id = reader.read_uuid()?;
        self.id = reader.read_uuid()?;
        self.dialog = reader.read_u8()?;
        self.from_agent_name = reader.read_variable(1)?;
        self.message = reader.read_variable(2)?;
        self.binary_bucket = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.to_group_id)?;
        writer.write_uuid(&self.id)?;
        writer.write_u8(self.dialog)?;
        writer.write_variable(&self.from_agent_name, 1)?;
        writer.write_variable(&self.message, 2)?;
        writer.write_variable(&self.binary_bucket, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ToGroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.to_group_id),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Dialog".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.dialog)),
        )?;
        map.add_with_string_osd(
            "FromAgentName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_agent_name.clone()),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "BinaryBucket".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.binary_bucket.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ToGroupID") {
            self.to_group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Dialog") {
            self.dialog = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("FromAgentName") {
            self.from_agent_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("BinaryBucket") {
            self.binary_bucket = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportRequestPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        40_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportLocationRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportLocationRequestPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportLocalPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            location_id: 0,
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
            teleport_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.location_id = reader.read_u32_le()?;
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        self.teleport_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.location_id)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        writer.write_u32_le(self.teleport_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "LocationID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.location_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        map.add_with_string_osd(
            "TeleportFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.teleport_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocationID") {
            self.location_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        if let Some(value) = map.get("TeleportFlags") {
            self.teleport_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportLandmarkRequestPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            landmark_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.landmark_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.landmark_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "LandmarkID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.landmark_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LandmarkID") {
            self.landmark_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportProgressPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportProgressPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            teleport_flags: 0,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.teleport_flags = reader.read_u32_le()?;
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.teleport_flags)?;
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TeleportFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.teleport_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TeleportFlags") {
            self.teleport_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DataHomeLocationRequestPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            kicked_from_estate_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.kicked_from_estate_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.kicked_from_estate_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "KickedFromEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.kicked_from_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("KickedFromEstateID") {
            self.kicked_from_estate_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DataHomeLocationRequestPacketAgentInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_effective_maturity: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_effective_maturity = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.agent_effective_maturity)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentEffectiveMaturity".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.agent_effective_maturity.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentEffectiveMaturity") {
            self.agent_effective_maturity = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DataHomeLocationReplyPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            region_handle: 0,
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.region_handle = reader.read_u64_le()?;
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportFinishPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            location_id: 0,
            sim_ip: 0,
            sim_port: 0,
            region_handle: 0,
            seed_capability: Vec::new(),
            sim_access: 0,
            teleport_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 39_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.seed_capability.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.location_id = reader.read_u32_le()?;
        self.sim_ip = reader.read_u32_le()?;
        self.sim_port = reader.read_u16_be()?;
        self.region_handle = reader.read_u64_le()?;
        self.seed_capability = reader.read_variable(2)?;
        self.sim_access = reader.read_u8()?;
        self.teleport_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.location_id)?;
        writer.write_u32_le(self.sim_ip)?;
        writer.write_u16_be(self.sim_port)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_variable(&self.seed_capability, 2)?;
        writer.write_u8(self.sim_access)?;
        writer.write_u32_le(self.teleport_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "LocationID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.location_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.sim_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_port)),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SeedCapability".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.seed_capability.clone()),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "TeleportFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.teleport_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocationID") {
            self.location_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimIP") {
            self.sim_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimPort") {
            self.sim_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("SeedCapability") {
            self.seed_capability = value.as_binary()?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("TeleportFlags") {
            self.teleport_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartLurePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartLurePacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            lure_type: 0,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 1_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.lure_type = reader.read_u8()?;
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.lure_type)?;
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LureType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.lure_type)),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LureType") {
            self.lure_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartLurePacketTargetDataBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportLureRequestPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            lure_id: libremetaverse_types::UUID::zero(),
            teleport_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        52_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.lure_id = reader.read_uuid()?;
        self.teleport_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.lure_id)?;
        writer.write_u32_le(self.teleport_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "LureID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.lure_id),
        )?;
        map.add_with_string_osd(
            "TeleportFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.teleport_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LureID") {
            self.lure_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TeleportFlags") {
            self.teleport_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportCancelPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportStartPacketInfoBlock {
    fn new_generated() -> Self {
        Self { teleport_flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.teleport_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.teleport_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TeleportFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.teleport_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TeleportFlags") {
            self.teleport_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportFailedPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            reason: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.reason.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.reason = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_variable(&self.reason, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Reason".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.reason.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Reason") {
            self.reason = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TeleportFailedPacketAlertInfoBlock {
    fn new_generated() -> Self {
        Self {
            message: Vec::new(),
            extra_params: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.extra_params.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.message = reader.read_variable(1)?;
        self.extra_params = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.message, 1)?;
        writer.write_variable(&self.extra_params, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "ExtraParams".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.extra_params.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("ExtraParams") {
            self.extra_params = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UndoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UndoPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RedoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RedoPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UndoLandPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentPausePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.serial_num)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.serial_num.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentResumePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.serial_num)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.serial_num.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChatFromViewerPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChatFromViewerPacketChatDataBlock {
    fn new_generated() -> Self {
        Self {
            message: Vec::new(),
            type_: 0,
            channel: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 5_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.message = reader.read_variable(2)?;
        self.type_ = reader.read_u8()?;
        self.channel = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.message, 2)?;
        writer.write_u8(self.type_)?;
        writer.write_i32_le(self.channel)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Channel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Channel") {
            self.channel = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentThrottlePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            circuit_code: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.circuit_code = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.circuit_code)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CircuitCode") {
            self.circuit_code = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentThrottlePacketThrottleBlock {
    fn new_generated() -> Self {
        Self {
            gen_counter: 0,
            throttles: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.throttles.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.gen_counter = reader.read_u32_le()?;
        self.throttles = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.gen_counter)?;
        writer.write_variable(&self.throttles, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GenCounter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.gen_counter.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Throttles".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.throttles.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GenCounter") {
            self.gen_counter = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Throttles") {
            self.throttles = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentFOVPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            circuit_code: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.circuit_code = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.circuit_code)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CircuitCode") {
            self.circuit_code = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentFOVPacketFOVBlockBlock {
    fn new_generated() -> Self {
        Self {
            gen_counter: 0,
            vertical_angle: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.gen_counter = reader.read_u32_le()?;
        self.vertical_angle = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.gen_counter)?;
        writer.write_f32_le(self.vertical_angle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GenCounter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.gen_counter.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "VerticalAngle".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.vertical_angle)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GenCounter") {
            self.gen_counter = osd_u32(&value)?;
        }
        if let Some(value) = map.get("VerticalAngle") {
            self.vertical_angle = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentHeightWidthPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            circuit_code: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.circuit_code = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.circuit_code)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CircuitCode") {
            self.circuit_code = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentHeightWidthPacketHeightWidthBlockBlock {
    fn new_generated() -> Self {
        Self {
            gen_counter: 0,
            height: 0,
            width: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.gen_counter = reader.read_u32_le()?;
        self.height = reader.read_u16_le()?;
        self.width = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.gen_counter)?;
        writer.write_u16_le(self.height)?;
        writer.write_u16_le(self.width)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GenCounter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.gen_counter.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Height".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.height)),
        )?;
        map.add_with_string_osd(
            "Width".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.width)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GenCounter") {
            self.gen_counter = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Height") {
            self.height = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("Width") {
            self.width = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentSetAppearancePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
            size: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_u32_le()?;
        self.size = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.serial_num)?;
        writer.write_vector3(&self.size)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.serial_num.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.size)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Size") {
            self.size = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentSetAppearancePacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            cache_id: libremetaverse_types::UUID::zero(),
            texture_index: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.cache_id = reader.read_uuid()?;
        self.texture_index = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.cache_id)?;
        writer.write_u8(self.texture_index)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CacheID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.cache_id),
        )?;
        map.add_with_string_osd(
            "TextureIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.texture_index)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CacheID") {
            self.cache_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TextureIndex") {
            self.texture_index = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentSetAppearancePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { texture_entry: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.texture_entry.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.texture_entry = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.texture_entry, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TextureEntry".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_entry.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TextureEntry") {
            self.texture_entry = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentSetAppearancePacketVisualParamBlock {
    fn new_generated() -> Self {
        Self { param_value: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.param_value = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.param_value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParamValue".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.param_value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParamValue") {
            self.param_value = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentQuitCopyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentQuitCopyPacketFuseBlockBlock {
    fn new_generated() -> Self {
        Self { viewer_circuit_code: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.viewer_circuit_code = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.viewer_circuit_code)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ViewerCircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.viewer_circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ViewerCircuitCode") {
            self.viewer_circuit_code = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImageNotInDatabasePacketImageIDBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RebakeAvatarTexturesPacketTextureDataBlock {
    fn new_generated() -> Self {
        Self {
            texture_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.texture_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.texture_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TextureID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.texture_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TextureID") {
            self.texture_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetAlwaysRunPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            always_run: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.always_run = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(u8::from(self.always_run))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AlwaysRun".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.always_run),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AlwaysRun") {
            self.always_run = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            force: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.force = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(u8::from(self.force))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Force".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.force),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Force") {
            self.force = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeletePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDuplicatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDuplicatePacketSharedDataBlock {
    fn new_generated() -> Self {
        Self {
            offset: libremetaverse_types::Vector3::zero(),
            duplicate_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.offset = reader.read_vector3()?;
        self.duplicate_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.offset)?;
        writer.write_u32_le(self.duplicate_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Offset".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.offset)?,
        )?;
        map.add_with_string_osd(
            "DuplicateFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.duplicate_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Offset") {
            self.offset = value.as_vector3()?;
        }
        if let Some(value) = map.get("DuplicateFlags") {
            self.duplicate_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDuplicatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDuplicateOnRayPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            ray_start: libremetaverse_types::Vector3::zero(),
            ray_end: libremetaverse_types::Vector3::zero(),
            bypass_raycast: false,
            ray_end_is_intersection: false,
            copy_centers: false,
            copy_rotates: false,
            ray_target_id: libremetaverse_types::UUID::zero(),
            duplicate_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        96_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.ray_start = reader.read_vector3()?;
        self.ray_end = reader.read_vector3()?;
        self.bypass_raycast = reader.read_u8()? != 0;
        self.ray_end_is_intersection = reader.read_u8()? != 0;
        self.copy_centers = reader.read_u8()? != 0;
        self.copy_rotates = reader.read_u8()? != 0;
        self.ray_target_id = reader.read_uuid()?;
        self.duplicate_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_vector3(&self.ray_start)?;
        writer.write_vector3(&self.ray_end)?;
        writer.write_u8(u8::from(self.bypass_raycast))?;
        writer.write_u8(u8::from(self.ray_end_is_intersection))?;
        writer.write_u8(u8::from(self.copy_centers))?;
        writer.write_u8(u8::from(self.copy_rotates))?;
        writer.write_uuid(&self.ray_target_id)?;
        writer.write_u32_le(self.duplicate_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RayStart".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_start)?,
        )?;
        map.add_with_string_osd(
            "RayEnd".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_end)?,
        )?;
        map.add_with_string_osd(
            "BypassRaycast".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.bypass_raycast),
        )?;
        map.add_with_string_osd(
            "RayEndIsIntersection".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.ray_end_is_intersection),
        )?;
        map.add_with_string_osd(
            "CopyCenters".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.copy_centers),
        )?;
        map.add_with_string_osd(
            "CopyRotates".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.copy_rotates),
        )?;
        map.add_with_string_osd(
            "RayTargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.ray_target_id),
        )?;
        map.add_with_string_osd(
            "DuplicateFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.duplicate_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RayStart") {
            self.ray_start = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayEnd") {
            self.ray_end = value.as_vector3()?;
        }
        if let Some(value) = map.get("BypassRaycast") {
            self.bypass_raycast = value.as_boolean()?;
        }
        if let Some(value) = map.get("RayEndIsIntersection") {
            self.ray_end_is_intersection = value.as_boolean()?;
        }
        if let Some(value) = map.get("CopyCenters") {
            self.copy_centers = value.as_boolean()?;
        }
        if let Some(value) = map.get("CopyRotates") {
            self.copy_rotates = value.as_boolean()?;
        }
        if let Some(value) = map.get("RayTargetID") {
            self.ray_target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DuplicateFlags") {
            self.duplicate_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDuplicateOnRayPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectScalePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectScalePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            scale: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.scale = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_vector3(&self.scale)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Scale".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.scale)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Scale") {
            self.scale = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectRotationPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectRotationPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.rotation = reader.read_quaternion()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_quaternion(&self.rotation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Rotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.rotation)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Rotation") {
            self.rotation = value.as_quaternion()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectFlagUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            object_local_id: 0,
            use_physics: false,
            is_temporary: false,
            is_phantom: false,
            casts_shadows: false,
        }
    }
    fn generated_length(&self) -> i32 {
        40_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.object_local_id = reader.read_u32_le()?;
        self.use_physics = reader.read_u8()? != 0;
        self.is_temporary = reader.read_u8()? != 0;
        self.is_phantom = reader.read_u8()? != 0;
        self.casts_shadows = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(u8::from(self.use_physics))?;
        writer.write_u8(u8::from(self.is_temporary))?;
        writer.write_u8(u8::from(self.is_phantom))?;
        writer.write_u8(u8::from(self.casts_shadows))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "UsePhysics".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.use_physics),
        )?;
        map.add_with_string_osd(
            "IsTemporary".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_temporary),
        )?;
        map.add_with_string_osd(
            "IsPhantom".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_phantom),
        )?;
        map.add_with_string_osd(
            "CastsShadows".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.casts_shadows),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("UsePhysics") {
            self.use_physics = value.as_boolean()?;
        }
        if let Some(value) = map.get("IsTemporary") {
            self.is_temporary = value.as_boolean()?;
        }
        if let Some(value) = map.get("IsPhantom") {
            self.is_phantom = value.as_boolean()?;
        }
        if let Some(value) = map.get("CastsShadows") {
            self.casts_shadows = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectFlagUpdatePacketExtraPhysicsBlock {
    fn new_generated() -> Self {
        Self {
            physics_shape_type: 0,
            density: 0.0_f32,
            friction: 0.0_f32,
            restitution: 0.0_f32,
            gravity_multiplier: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.physics_shape_type = reader.read_u8()?;
        self.density = reader.read_f32_le()?;
        self.friction = reader.read_f32_le()?;
        self.restitution = reader.read_f32_le()?;
        self.gravity_multiplier = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.physics_shape_type)?;
        writer.write_f32_le(self.density)?;
        writer.write_f32_le(self.friction)?;
        writer.write_f32_le(self.restitution)?;
        writer.write_f32_le(self.gravity_multiplier)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PhysicsShapeType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.physics_shape_type),
            ),
        )?;
        map.add_with_string_osd(
            "Density".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.density)),
        )?;
        map.add_with_string_osd(
            "Friction".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.friction)),
        )?;
        map.add_with_string_osd(
            "Restitution".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.restitution)),
        )?;
        map.add_with_string_osd(
            "GravityMultiplier".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.gravity_multiplier)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PhysicsShapeType") {
            self.physics_shape_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Density") {
            self.density = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Friction") {
            self.friction = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Restitution") {
            self.restitution = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GravityMultiplier") {
            self.gravity_multiplier = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectClickActionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectClickActionPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            click_action: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.click_action = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.click_action)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ClickAction".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.click_action)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ClickAction") {
            self.click_action = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectImagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectImagePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            media_url: Vec::new(),
            texture_entry: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_url.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.texture_entry.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.media_url = reader.read_variable(1)?;
        self.texture_entry = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_variable(&self.media_url, 1)?;
        writer.write_variable(&self.texture_entry, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "MediaURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_url.clone()),
        )?;
        map.add_with_string_osd(
            "TextureEntry".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_entry.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("MediaURL") {
            self.media_url = value.as_binary()?;
        }
        if let Some(value) = map.get("TextureEntry") {
            self.texture_entry = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectBypassModUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectBypassModUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            property_id: 0,
            value: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 5_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.value.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.property_id = reader.read_u8()?;
        self.value = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.property_id)?;
        writer.write_variable(&self.value, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PropertyID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.property_id)),
        )?;
        map.add_with_string_osd(
            "Value".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.value.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PropertyID") {
            self.property_id = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Value") {
            self.value = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectMaterialPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectMaterialPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            material: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.material = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.material)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Material".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.material)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Material") {
            self.material = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectShapePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectShapePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            path_curve: 0,
            profile_curve: 0,
            path_begin: 0,
            path_end: 0,
            path_scale_x: 0,
            path_scale_y: 0,
            path_shear_x: 0,
            path_shear_y: 0,
            path_twist: 0,
            path_twist_begin: 0,
            path_radius_offset: 0,
            path_taper_x: 0,
            path_taper_y: 0,
            path_revolutions: 0,
            path_skew: 0,
            profile_begin: 0,
            profile_end: 0,
            profile_hollow: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        27_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.path_curve = reader.read_u8()?;
        self.profile_curve = reader.read_u8()?;
        self.path_begin = reader.read_u16_le()?;
        self.path_end = reader.read_u16_le()?;
        self.path_scale_x = reader.read_u8()?;
        self.path_scale_y = reader.read_u8()?;
        self.path_shear_x = reader.read_u8()?;
        self.path_shear_y = reader.read_u8()?;
        self.path_twist = reader.read_i8()?;
        self.path_twist_begin = reader.read_i8()?;
        self.path_radius_offset = reader.read_i8()?;
        self.path_taper_x = reader.read_i8()?;
        self.path_taper_y = reader.read_i8()?;
        self.path_revolutions = reader.read_u8()?;
        self.path_skew = reader.read_i8()?;
        self.profile_begin = reader.read_u16_le()?;
        self.profile_end = reader.read_u16_le()?;
        self.profile_hollow = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.path_curve)?;
        writer.write_u8(self.profile_curve)?;
        writer.write_u16_le(self.path_begin)?;
        writer.write_u16_le(self.path_end)?;
        writer.write_u8(self.path_scale_x)?;
        writer.write_u8(self.path_scale_y)?;
        writer.write_u8(self.path_shear_x)?;
        writer.write_u8(self.path_shear_y)?;
        writer.write_i8(self.path_twist)?;
        writer.write_i8(self.path_twist_begin)?;
        writer.write_i8(self.path_radius_offset)?;
        writer.write_i8(self.path_taper_x)?;
        writer.write_i8(self.path_taper_y)?;
        writer.write_u8(self.path_revolutions)?;
        writer.write_i8(self.path_skew)?;
        writer.write_u16_le(self.profile_begin)?;
        writer.write_u16_le(self.profile_end)?;
        writer.write_u16_le(self.profile_hollow)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PathCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_curve)),
        )?;
        map.add_with_string_osd(
            "ProfileCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_curve)),
        )?;
        map.add_with_string_osd(
            "PathBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_begin)),
        )?;
        map.add_with_string_osd(
            "PathEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_end)),
        )?;
        map.add_with_string_osd(
            "PathScaleX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_x)),
        )?;
        map.add_with_string_osd(
            "PathScaleY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_y)),
        )?;
        map.add_with_string_osd(
            "PathShearX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_x)),
        )?;
        map.add_with_string_osd(
            "PathShearY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_y)),
        )?;
        map.add_with_string_osd(
            "PathTwist".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_twist)),
        )?;
        map.add_with_string_osd(
            "PathTwistBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_twist_begin),
            ),
        )?;
        map.add_with_string_osd(
            "PathRadiusOffset".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_radius_offset),
            ),
        )?;
        map.add_with_string_osd(
            "PathTaperX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_x)),
        )?;
        map.add_with_string_osd(
            "PathTaperY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_y)),
        )?;
        map.add_with_string_osd(
            "PathRevolutions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_revolutions),
            ),
        )?;
        map.add_with_string_osd(
            "PathSkew".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_skew)),
        )?;
        map.add_with_string_osd(
            "ProfileBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_begin)),
        )?;
        map.add_with_string_osd(
            "ProfileEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_end)),
        )?;
        map.add_with_string_osd(
            "ProfileHollow".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_hollow)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PathCurve") {
            self.path_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ProfileCurve") {
            self.profile_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathBegin") {
            self.path_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathEnd") {
            self.path_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathScaleX") {
            self.path_scale_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathScaleY") {
            self.path_scale_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearX") {
            self.path_shear_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearY") {
            self.path_shear_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathTwist") {
            self.path_twist = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTwistBegin") {
            self.path_twist_begin = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRadiusOffset") {
            self.path_radius_offset = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperX") {
            self.path_taper_x = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperY") {
            self.path_taper_y = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRevolutions") {
            self.path_revolutions = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathSkew") {
            self.path_skew = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("ProfileBegin") {
            self.profile_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileEnd") {
            self.profile_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileHollow") {
            self.profile_hollow = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectExtraParamsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectExtraParamsPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            param_type: 0,
            param_in_use: false,
            param_size: 0,
            param_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 11_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.param_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.param_type = reader.read_u16_le()?;
        self.param_in_use = reader.read_u8()? != 0;
        self.param_size = reader.read_u32_le()?;
        self.param_data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u16_le(self.param_type)?;
        writer.write_u8(u8::from(self.param_in_use))?;
        writer.write_u32_le(self.param_size)?;
        writer.write_variable(&self.param_data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParamType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.param_type)),
        )?;
        map.add_with_string_osd(
            "ParamInUse".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.param_in_use),
        )?;
        map.add_with_string_osd(
            "ParamSize".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.param_size.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParamData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.param_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParamType") {
            self.param_type = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ParamInUse") {
            self.param_in_use = value.as_boolean()?;
        }
        if let Some(value) = map.get("ParamSize") {
            self.param_size = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParamData") {
            self.param_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectOwnerPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectOwnerPacketHeaderDataBlock {
    fn new_generated() -> Self {
        Self {
            override_: false,
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.override_ = reader.read_u8()? != 0;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.override_))?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Override".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.override_),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Override") {
            self.override_ = value.as_boolean()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectOwnerPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGroupPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGroupPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectBuyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            category_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.category_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.category_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "CategoryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.category_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CategoryID") {
            self.category_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectBuyPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            sale_type: 0,
            sale_price: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        9_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::BuyObjectInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::BuyObjectInventoryPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DerezContainerPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            delete: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.delete = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_u8(u8::from(self.delete))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "Delete".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.delete),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Delete") {
            self.delete = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPermissionsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPermissionsPacketHeaderDataBlock {
    fn new_generated() -> Self {
        Self { override_: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.override_ = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.override_))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Override".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.override_),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Override") {
            self.override_ = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPermissionsPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            field: 0,
            set: 0,
            mask: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.field = reader.read_u8()?;
        self.set = reader.read_u8()?;
        self.mask = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.field)?;
        writer.write_u8(self.set)?;
        writer.write_u32_le(self.mask)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Field".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.field)),
        )?;
        map.add_with_string_osd(
            "Set".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.set)),
        )?;
        map.add_with_string_osd(
            "Mask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.mask.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Field") {
            self.field = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Set") {
            self.set = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Mask") {
            self.mask = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSaleInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSaleInfoPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            sale_type: 0,
            sale_price: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        9_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectNamePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectNamePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDescriptionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDescriptionPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectCategoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectCategoryPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0, category: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.category = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_u32_le(self.category)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSelectPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSelectPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeselectPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeselectPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAttachPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            attachment_point: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.attachment_point = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(self.attachment_point)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AttachmentPoint".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.attachment_point),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AttachmentPoint") {
            self.attachment_point = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAttachPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.rotation = reader.read_quaternion()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_quaternion(&self.rotation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Rotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.rotation)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Rotation") {
            self.rotation = value.as_quaternion()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDetachPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDetachPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDropPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDropPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectLinkPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectLinkPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDelinkPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDelinkPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            grab_offset: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.grab_offset = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_vector3(&self.grab_offset)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GrabOffset".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.grab_offset)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GrabOffset") {
            self.grab_offset = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabPacketSurfaceInfoBlock {
    fn new_generated() -> Self {
        Self {
            uv_coord: libremetaverse_types::Vector3::zero(),
            st_coord: libremetaverse_types::Vector3::zero(),
            face_index: 0,
            position: libremetaverse_types::Vector3::zero(),
            normal: libremetaverse_types::Vector3::zero(),
            binormal: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.uv_coord = reader.read_vector3()?;
        self.st_coord = reader.read_vector3()?;
        self.face_index = reader.read_i32_le()?;
        self.position = reader.read_vector3()?;
        self.normal = reader.read_vector3()?;
        self.binormal = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.uv_coord)?;
        writer.write_vector3(&self.st_coord)?;
        writer.write_i32_le(self.face_index)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.normal)?;
        writer.write_vector3(&self.binormal)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UVCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.uv_coord)?,
        )?;
        map.add_with_string_osd(
            "STCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.st_coord)?,
        )?;
        map.add_with_string_osd(
            "FaceIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.face_index),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Normal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.normal)?,
        )?;
        map.add_with_string_osd(
            "Binormal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.binormal)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UVCoord") {
            self.uv_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("STCoord") {
            self.st_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("FaceIndex") {
            self.face_index = value.as_integer()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Normal") {
            self.normal = value.as_vector3()?;
        }
        if let Some(value) = map.get("Binormal") {
            self.binormal = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            grab_offset_initial: libremetaverse_types::Vector3::zero(),
            grab_position: libremetaverse_types::Vector3::zero(),
            time_since_last: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        44_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.grab_offset_initial = reader.read_vector3()?;
        self.grab_position = reader.read_vector3()?;
        self.time_since_last = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_vector3(&self.grab_offset_initial)?;
        writer.write_vector3(&self.grab_position)?;
        writer.write_u32_le(self.time_since_last)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "GrabOffsetInitial".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.grab_offset_initial)?,
        )?;
        map.add_with_string_osd(
            "GrabPosition".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.grab_position)?,
        )?;
        map.add_with_string_osd(
            "TimeSinceLast".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.time_since_last.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GrabOffsetInitial") {
            self.grab_offset_initial = value.as_vector3()?;
        }
        if let Some(value) = map.get("GrabPosition") {
            self.grab_position = value.as_vector3()?;
        }
        if let Some(value) = map.get("TimeSinceLast") {
            self.time_since_last = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectGrabUpdatePacketSurfaceInfoBlock {
    fn new_generated() -> Self {
        Self {
            uv_coord: libremetaverse_types::Vector3::zero(),
            st_coord: libremetaverse_types::Vector3::zero(),
            face_index: 0,
            position: libremetaverse_types::Vector3::zero(),
            normal: libremetaverse_types::Vector3::zero(),
            binormal: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.uv_coord = reader.read_vector3()?;
        self.st_coord = reader.read_vector3()?;
        self.face_index = reader.read_i32_le()?;
        self.position = reader.read_vector3()?;
        self.normal = reader.read_vector3()?;
        self.binormal = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.uv_coord)?;
        writer.write_vector3(&self.st_coord)?;
        writer.write_i32_le(self.face_index)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.normal)?;
        writer.write_vector3(&self.binormal)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UVCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.uv_coord)?,
        )?;
        map.add_with_string_osd(
            "STCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.st_coord)?,
        )?;
        map.add_with_string_osd(
            "FaceIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.face_index),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Normal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.normal)?,
        )?;
        map.add_with_string_osd(
            "Binormal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.binormal)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UVCoord") {
            self.uv_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("STCoord") {
            self.st_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("FaceIndex") {
            self.face_index = value.as_integer()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Normal") {
            self.normal = value.as_vector3()?;
        }
        if let Some(value) = map.get("Binormal") {
            self.binormal = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeGrabPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeGrabPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectDeGrabPacketSurfaceInfoBlock {
    fn new_generated() -> Self {
        Self {
            uv_coord: libremetaverse_types::Vector3::zero(),
            st_coord: libremetaverse_types::Vector3::zero(),
            face_index: 0,
            position: libremetaverse_types::Vector3::zero(),
            normal: libremetaverse_types::Vector3::zero(),
            binormal: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.uv_coord = reader.read_vector3()?;
        self.st_coord = reader.read_vector3()?;
        self.face_index = reader.read_i32_le()?;
        self.position = reader.read_vector3()?;
        self.normal = reader.read_vector3()?;
        self.binormal = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.uv_coord)?;
        writer.write_vector3(&self.st_coord)?;
        writer.write_i32_le(self.face_index)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.normal)?;
        writer.write_vector3(&self.binormal)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UVCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.uv_coord)?,
        )?;
        map.add_with_string_osd(
            "STCoord".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.st_coord)?,
        )?;
        map.add_with_string_osd(
            "FaceIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.face_index),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Normal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.normal)?,
        )?;
        map.add_with_string_osd(
            "Binormal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.binormal)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UVCoord") {
            self.uv_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("STCoord") {
            self.st_coord = value.as_vector3()?;
        }
        if let Some(value) = map.get("FaceIndex") {
            self.face_index = value.as_integer()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Normal") {
            self.normal = value.as_vector3()?;
        }
        if let Some(value) = map.get("Binormal") {
            self.binormal = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinStartPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinStartPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
        }
    }
    fn generated_length(&self) -> i32 {
        28_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.rotation = reader.read_quaternion()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_quaternion(&self.rotation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "Rotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.rotation)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Rotation") {
            self.rotation = value.as_quaternion()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinStopPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectSpinStopPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectExportSelectedPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
            volume_detail: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        34_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        self.volume_detail = reader.read_i16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.request_id)?;
        writer.write_i16_le(self.volume_detail)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "VolumeDetail".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.volume_detail)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("VolumeDetail") {
            self.volume_detail = value.as_integer()? as i16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectExportSelectedPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ModifyLandPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ModifyLandPacketModifyBlockBlock {
    fn new_generated() -> Self {
        Self {
            action: 0,
            brush_size: 0,
            seconds: 0.0_f32,
            height: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.action = reader.read_u8()?;
        self.brush_size = reader.read_u8()?;
        self.seconds = reader.read_f32_le()?;
        self.height = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.action)?;
        writer.write_u8(self.brush_size)?;
        writer.write_f32_le(self.seconds)?;
        writer.write_f32_le(self.height)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Action".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.action)),
        )?;
        map.add_with_string_osd(
            "BrushSize".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.brush_size)),
        )?;
        map.add_with_string_osd(
            "Seconds".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.seconds)),
        )?;
        map.add_with_string_osd(
            "Height".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.height)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Action") {
            self.action = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("BrushSize") {
            self.brush_size = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Seconds") {
            self.seconds = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Height") {
            self.height = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ModifyLandPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            west: 0.0_f32,
            south: 0.0_f32,
            east: 0.0_f32,
            north: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.west = reader.read_f32_le()?;
        self.south = reader.read_f32_le()?;
        self.east = reader.read_f32_le()?;
        self.north = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_f32_le(self.west)?;
        writer.write_f32_le(self.south)?;
        writer.write_f32_le(self.east)?;
        writer.write_f32_le(self.north)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "West".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.west)),
        )?;
        map.add_with_string_osd(
            "South".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.south)),
        )?;
        map.add_with_string_osd(
            "East".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.east)),
        )?;
        map.add_with_string_osd(
            "North".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.north)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("West") {
            self.west = value.as_real()? as f32;
        }
        if let Some(value) = map.get("South") {
            self.south = value.as_real()? as f32;
        }
        if let Some(value) = map.get("East") {
            self.east = value.as_real()? as f32;
        }
        if let Some(value) = map.get("North") {
            self.north = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ModifyLandPacketModifyBlockExtendedBlock {
    fn new_generated() -> Self {
        Self { brush_size: 0.0_f32 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.brush_size = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.brush_size)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "BrushSize".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.brush_size)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("BrushSize") {
            self.brush_size = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::VelocityInterpolateOnPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::VelocityInterpolateOffPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StateSavePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StateSavePacketDataBlockBlock {
    fn new_generated() -> Self {
        Self { filename: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.filename.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.filename = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.filename, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Filename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.filename.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Filename") {
            self.filename = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ReportAutosaveCrashPacketAutosaveDataBlock {
    fn new_generated() -> Self {
        Self { pid: 0, status: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pid = reader.read_i32_le()?;
        self.status = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.pid)?;
        writer.write_i32_le(self.status)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pid),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.status),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PID") {
            self.pid = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimWideDeletesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimWideDeletesPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TrackAgentPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TrackAgentPacketTargetDataBlock {
    fn new_generated() -> Self {
        Self {
            prey_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.prey_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.prey_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PreyID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.prey_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PreyID") {
            self.prey_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStatsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            ip: 0,
            start_time: 0,
            run_time: 0.0_f32,
            sim_fps: 0.0_f32,
            fps: 0.0_f32,
            agents_in_view: 0,
            ping: 0.0_f32,
            meters_traveled: 0.0_f64,
            regions_visited: 0,
            sys_ram: 0,
            sys_os: Vec::new(),
            sys_cpu: Vec::new(),
            sys_gpu: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 73_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sys_os.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sys_cpu.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sys_gpu.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.ip = reader.read_u32_le()?;
        self.start_time = reader.read_u32_le()?;
        self.run_time = reader.read_f32_le()?;
        self.sim_fps = reader.read_f32_le()?;
        self.fps = reader.read_f32_le()?;
        self.agents_in_view = reader.read_u8()?;
        self.ping = reader.read_f32_le()?;
        self.meters_traveled = reader.read_f64_le()?;
        self.regions_visited = reader.read_i32_le()?;
        self.sys_ram = reader.read_u32_le()?;
        self.sys_os = reader.read_variable(1)?;
        self.sys_cpu = reader.read_variable(1)?;
        self.sys_gpu = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.ip)?;
        writer.write_u32_le(self.start_time)?;
        writer.write_f32_le(self.run_time)?;
        writer.write_f32_le(self.sim_fps)?;
        writer.write_f32_le(self.fps)?;
        writer.write_u8(self.agents_in_view)?;
        writer.write_f32_le(self.ping)?;
        writer.write_f64_le(self.meters_traveled)?;
        writer.write_i32_le(self.regions_visited)?;
        writer.write_u32_le(self.sys_ram)?;
        writer.write_variable(&self.sys_os, 1)?;
        writer.write_variable(&self.sys_cpu, 1)?;
        writer.write_variable(&self.sys_gpu, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "IP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ip.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "StartTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.start_time.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RunTime".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.run_time)),
        )?;
        map.add_with_string_osd(
            "SimFPS".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.sim_fps)),
        )?;
        map.add_with_string_osd(
            "FPS".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.fps)),
        )?;
        map.add_with_string_osd(
            "AgentsInView".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.agents_in_view)),
        )?;
        map.add_with_string_osd(
            "Ping".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.ping)),
        )?;
        map.add_with_string_osd(
            "MetersTraveled".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.meters_traveled),
        )?;
        map.add_with_string_osd(
            "RegionsVisited".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.regions_visited),
        )?;
        map.add_with_string_osd(
            "SysRAM".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.sys_ram.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SysOS".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sys_os.clone()),
        )?;
        map.add_with_string_osd(
            "SysCPU".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sys_cpu.clone()),
        )?;
        map.add_with_string_osd(
            "SysGPU".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sys_gpu.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IP") {
            self.ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("StartTime") {
            self.start_time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RunTime") {
            self.run_time = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SimFPS") {
            self.sim_fps = value.as_real()? as f32;
        }
        if let Some(value) = map.get("FPS") {
            self.fps = value.as_real()? as f32;
        }
        if let Some(value) = map.get("AgentsInView") {
            self.agents_in_view = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Ping") {
            self.ping = value.as_real()? as f32;
        }
        if let Some(value) = map.get("MetersTraveled") {
            self.meters_traveled = value.as_real()?;
        }
        if let Some(value) = map.get("RegionsVisited") {
            self.regions_visited = value.as_integer()?;
        }
        if let Some(value) = map.get("SysRAM") {
            self.sys_ram = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SysOS") {
            self.sys_os = value.as_binary()?;
        }
        if let Some(value) = map.get("SysCPU") {
            self.sys_cpu = value.as_binary()?;
        }
        if let Some(value) = map.get("SysGPU") {
            self.sys_gpu = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStatsPacketDownloadTotalsBlock {
    fn new_generated() -> Self {
        Self {
            world: 0,
            objects: 0,
            textures: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.world = reader.read_u32_le()?;
        self.objects = reader.read_u32_le()?;
        self.textures = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.world)?;
        writer.write_u32_le(self.objects)?;
        writer.write_u32_le(self.textures)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "World".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.world.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Objects".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.objects.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Textures".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.textures.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("World") {
            self.world = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Objects") {
            self.objects = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Textures") {
            self.textures = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStatsPacketNetStatsBlock {
    fn new_generated() -> Self {
        Self {
            bytes: 0,
            packets: 0,
            compressed: 0,
            savings: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.bytes = reader.read_u32_le()?;
        self.packets = reader.read_u32_le()?;
        self.compressed = reader.read_u32_le()?;
        self.savings = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.bytes)?;
        writer.write_u32_le(self.packets)?;
        writer.write_u32_le(self.compressed)?;
        writer.write_u32_le(self.savings)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Bytes".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.bytes.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Packets".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.packets.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Compressed".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.compressed.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Savings".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.savings.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Bytes") {
            self.bytes = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Packets") {
            self.packets = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Compressed") {
            self.compressed = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Savings") {
            self.savings = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStatsPacketFailStatsBlock {
    fn new_generated() -> Self {
        Self {
            send_packet: 0,
            dropped: 0,
            resent: 0,
            failed_resends: 0,
            off_circuit: 0,
            invalid: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.send_packet = reader.read_u32_le()?;
        self.dropped = reader.read_u32_le()?;
        self.resent = reader.read_u32_le()?;
        self.failed_resends = reader.read_u32_le()?;
        self.off_circuit = reader.read_u32_le()?;
        self.invalid = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.send_packet)?;
        writer.write_u32_le(self.dropped)?;
        writer.write_u32_le(self.resent)?;
        writer.write_u32_le(self.failed_resends)?;
        writer.write_u32_le(self.off_circuit)?;
        writer.write_u32_le(self.invalid)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SendPacket".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.send_packet.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Dropped".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.dropped.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Resent".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.resent.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FailedResends".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.failed_resends.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OffCircuit".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.off_circuit.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Invalid".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.invalid.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SendPacket") {
            self.send_packet = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Dropped") {
            self.dropped = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Resent") {
            self.resent = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FailedResends") {
            self.failed_resends = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OffCircuit") {
            self.off_circuit = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Invalid") {
            self.invalid = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStatsPacketMiscStatsBlock {
    fn new_generated() -> Self {
        Self { type_: 0, value: 0.0_f64 }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.type_ = reader.read_u32_le()?;
        self.value = reader.read_f64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.type_)?;
        writer.write_f64_le(self.value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.type_.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Value".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.value),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Type") {
            self.type_ = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Value") {
            self.value = value.as_real()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptAnswerYesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptAnswerYesPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            questions: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.questions = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_i32_le(self.questions)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "Questions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.questions),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Questions") {
            self.questions = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserReportPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserReportPacketReportDataBlock {
    fn new_generated() -> Self {
        Self {
            report_type: 0,
            category: 0,
            position: libremetaverse_types::Vector3::zero(),
            check_flags: 0,
            screenshot_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
            abuser_id: libremetaverse_types::UUID::zero(),
            abuse_region_name: Vec::new(),
            abuse_region_id: libremetaverse_types::UUID::zero(),
            summary: Vec::new(),
            details: Vec::new(),
            version_string: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 79_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.abuse_region_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.summary.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.details.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.version_string.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.report_type = reader.read_u8()?;
        self.category = reader.read_u8()?;
        self.position = reader.read_vector3()?;
        self.check_flags = reader.read_u8()?;
        self.screenshot_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        self.abuser_id = reader.read_uuid()?;
        self.abuse_region_name = reader.read_variable(1)?;
        self.abuse_region_id = reader.read_uuid()?;
        self.summary = reader.read_variable(1)?;
        self.details = reader.read_variable(2)?;
        self.version_string = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.report_type)?;
        writer.write_u8(self.category)?;
        writer.write_vector3(&self.position)?;
        writer.write_u8(self.check_flags)?;
        writer.write_uuid(&self.screenshot_id)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.abuser_id)?;
        writer.write_variable(&self.abuse_region_name, 1)?;
        writer.write_uuid(&self.abuse_region_id)?;
        writer.write_variable(&self.summary, 1)?;
        writer.write_variable(&self.details, 2)?;
        writer.write_variable(&self.version_string, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ReportType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.report_type)),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "CheckFlags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.check_flags)),
        )?;
        map.add_with_string_osd(
            "ScreenshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.screenshot_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "AbuserID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.abuser_id),
        )?;
        map.add_with_string_osd(
            "AbuseRegionName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.abuse_region_name.clone()),
        )?;
        map.add_with_string_osd(
            "AbuseRegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.abuse_region_id),
        )?;
        map.add_with_string_osd(
            "Summary".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.summary.clone()),
        )?;
        map.add_with_string_osd(
            "Details".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.details.clone()),
        )?;
        map.add_with_string_osd(
            "VersionString".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.version_string.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ReportType") {
            self.report_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("CheckFlags") {
            self.check_flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ScreenshotID") {
            self.screenshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AbuserID") {
            self.abuser_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AbuseRegionName") {
            self.abuse_region_name = value.as_binary()?;
        }
        if let Some(value) = map.get("AbuseRegionID") {
            self.abuse_region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Summary") {
            self.summary = value.as_binary()?;
        }
        if let Some(value) = map.get("Details") {
            self.details = value.as_binary()?;
        }
        if let Some(value) = map.get("VersionString") {
            self.version_string = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AlertMessagePacketAlertDataBlock {
    fn new_generated() -> Self {
        Self { message: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AlertMessagePacketAlertInfoBlock {
    fn new_generated() -> Self {
        Self {
            message: Vec::new(),
            extra_params: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.extra_params.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.message = reader.read_variable(1)?;
        self.extra_params = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.message, 1)?;
        writer.write_variable(&self.extra_params, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "ExtraParams".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.extra_params.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("ExtraParams") {
            self.extra_params = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AlertMessagePacketAgentInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentAlertMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentAlertMessagePacketAlertDataBlock {
    fn new_generated() -> Self {
        Self {
            modal: false,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 1_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.modal = reader.read_u8()? != 0;
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.modal))?;
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Modal".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.modal),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Modal") {
            self.modal = value.as_boolean()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MeanCollisionAlertPacketMeanCollisionBlock {
    fn new_generated() -> Self {
        Self {
            victim: libremetaverse_types::UUID::zero(),
            perp: libremetaverse_types::UUID::zero(),
            time: 0,
            mag: 0.0_f32,
            type_: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.victim = reader.read_uuid()?;
        self.perp = reader.read_uuid()?;
        self.time = reader.read_u32_le()?;
        self.mag = reader.read_f32_le()?;
        self.type_ = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.victim)?;
        writer.write_uuid(&self.perp)?;
        writer.write_u32_le(self.time)?;
        writer.write_f32_le(self.mag)?;
        writer.write_u8(self.type_)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Victim".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.victim),
        )?;
        map.add_with_string_osd(
            "Perp".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.perp),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.time.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Mag".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.mag)),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Victim") {
            self.victim = value.as_uuid()?;
        }
        if let Some(value) = map.get("Perp") {
            self.perp = value.as_uuid()?;
        }
        if let Some(value) = map.get("Time") {
            self.time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Mag") {
            self.mag = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerFrozenMessagePacketFrozenDataBlock {
    fn new_generated() -> Self {
        Self { data: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.data))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.data),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::HealthMessagePacketHealthDataBlock {
    fn new_generated() -> Self {
        Self { health: 0.0_f32 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.health = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.health)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Health".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.health)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Health") {
            self.health = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChatFromSimulatorPacketChatDataBlock {
    fn new_generated() -> Self {
        Self {
            from_name: Vec::new(),
            source_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            source_type: 0,
            chat_type: 0,
            audible: 0,
            position: libremetaverse_types::Vector3::zero(),
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 47_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.from_name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_name = reader.read_variable(1)?;
        self.source_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.source_type = reader.read_u8()?;
        self.chat_type = reader.read_u8()?;
        self.audible = reader.read_u8()?;
        self.position = reader.read_vector3()?;
        self.message = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.from_name, 1)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(self.source_type)?;
        writer.write_u8(self.chat_type)?;
        writer.write_u8(self.audible)?;
        writer.write_vector3(&self.position)?;
        writer.write_variable(&self.message, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FromName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_name.clone()),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "SourceType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.source_type)),
        )?;
        map.add_with_string_osd(
            "ChatType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.chat_type)),
        )?;
        map.add_with_string_osd(
            "Audible".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.audible)),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FromName") {
            self.from_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SourceType") {
            self.source_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ChatType") {
            self.chat_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Audible") {
            self.audible = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatsPacketRegionBlock {
    fn new_generated() -> Self {
        Self {
            region_x: 0,
            region_y: 0,
            region_flags: 0,
            object_capacity: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_x = reader.read_u32_le()?;
        self.region_y = reader.read_u32_le()?;
        self.region_flags = reader.read_u32_le()?;
        self.object_capacity = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.region_x)?;
        writer.write_u32_le(self.region_y)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_u32_le(self.object_capacity)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ObjectCapacity".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_capacity.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionX") {
            self.region_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionY") {
            self.region_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ObjectCapacity") {
            self.object_capacity = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatsPacketStatBlock {
    fn new_generated() -> Self {
        Self {
            stat_id: 0,
            stat_value: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.stat_id = reader.read_u32_le()?;
        self.stat_value = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.stat_id)?;
        writer.write_f32_le(self.stat_value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "StatID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.stat_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "StatValue".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.stat_value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("StatID") {
            self.stat_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("StatValue") {
            self.stat_value = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatsPacketPidStatBlock {
    fn new_generated() -> Self {
        Self { pid: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pid = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.pid)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pid),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PID") {
            self.pid = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatsPacketRegionInfoBlock {
    fn new_generated() -> Self {
        Self { region_flags_extended: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_flags_extended = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_flags_extended)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionFlagsExtended".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags_extended.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionFlagsExtended") {
            self.region_flags_extended = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestRegionInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketRegionInfoBlock {
    fn new_generated() -> Self {
        Self {
            sim_name: Vec::new(),
            estate_id: 0,
            parent_estate_id: 0,
            region_flags: 0,
            sim_access: 0,
            max_agents: 0,
            billable_factor: 0.0_f32,
            object_bonus_factor: 0.0_f32,
            water_height: 0.0_f32,
            terrain_raise_limit: 0.0_f32,
            terrain_lower_limit: 0.0_f32,
            price_per_meter: 0,
            redirect_grid_x: 0,
            redirect_grid_y: 0,
            use_estate_sun: false,
            sun_hour: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 51_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_name = reader.read_variable(1)?;
        self.estate_id = reader.read_u32_le()?;
        self.parent_estate_id = reader.read_u32_le()?;
        self.region_flags = reader.read_u32_le()?;
        self.sim_access = reader.read_u8()?;
        self.max_agents = reader.read_u8()?;
        self.billable_factor = reader.read_f32_le()?;
        self.object_bonus_factor = reader.read_f32_le()?;
        self.water_height = reader.read_f32_le()?;
        self.terrain_raise_limit = reader.read_f32_le()?;
        self.terrain_lower_limit = reader.read_f32_le()?;
        self.price_per_meter = reader.read_i32_le()?;
        self.redirect_grid_x = reader.read_i32_le()?;
        self.redirect_grid_y = reader.read_i32_le()?;
        self.use_estate_sun = reader.read_u8()? != 0;
        self.sun_hour = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u32_le(self.parent_estate_id)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_u8(self.sim_access)?;
        writer.write_u8(self.max_agents)?;
        writer.write_f32_le(self.billable_factor)?;
        writer.write_f32_le(self.object_bonus_factor)?;
        writer.write_f32_le(self.water_height)?;
        writer.write_f32_le(self.terrain_raise_limit)?;
        writer.write_f32_le(self.terrain_lower_limit)?;
        writer.write_i32_le(self.price_per_meter)?;
        writer.write_i32_le(self.redirect_grid_x)?;
        writer.write_i32_le(self.redirect_grid_y)?;
        writer.write_u8(u8::from(self.use_estate_sun))?;
        writer.write_f32_le(self.sun_hour)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParentEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "MaxAgents".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.max_agents)),
        )?;
        map.add_with_string_osd(
            "BillableFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.billable_factor)),
        )?;
        map.add_with_string_osd(
            "ObjectBonusFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.object_bonus_factor),
            ),
        )?;
        map.add_with_string_osd(
            "WaterHeight".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.water_height)),
        )?;
        map.add_with_string_osd(
            "TerrainRaiseLimit".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_raise_limit),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainLowerLimit".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_lower_limit),
            ),
        )?;
        map.add_with_string_osd(
            "PricePerMeter".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_per_meter),
        )?;
        map.add_with_string_osd(
            "RedirectGridX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.redirect_grid_x),
        )?;
        map.add_with_string_osd(
            "RedirectGridY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.redirect_grid_y),
        )?;
        map.add_with_string_osd(
            "UseEstateSun".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.use_estate_sun),
        )?;
        map.add_with_string_osd(
            "SunHour".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.sun_hour)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParentEstateID") {
            self.parent_estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("MaxAgents") {
            self.max_agents = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("BillableFactor") {
            self.billable_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ObjectBonusFactor") {
            self.object_bonus_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("WaterHeight") {
            self.water_height = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainRaiseLimit") {
            self.terrain_raise_limit = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainLowerLimit") {
            self.terrain_lower_limit = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PricePerMeter") {
            self.price_per_meter = value.as_integer()?;
        }
        if let Some(value) = map.get("RedirectGridX") {
            self.redirect_grid_x = value.as_integer()?;
        }
        if let Some(value) = map.get("RedirectGridY") {
            self.redirect_grid_y = value.as_integer()?;
        }
        if let Some(value) = map.get("UseEstateSun") {
            self.use_estate_sun = value.as_boolean()?;
        }
        if let Some(value) = map.get("SunHour") {
            self.sun_hour = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketRegionInfo2Block {
    fn new_generated() -> Self {
        Self {
            product_sku: Vec::new(),
            product_name: Vec::new(),
            max_agents32: 0,
            hard_max_agents: 0,
            hard_max_objects: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 12_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.product_sku.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.product_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.product_sku = reader.read_variable(1)?;
        self.product_name = reader.read_variable(1)?;
        self.max_agents32 = reader.read_u32_le()?;
        self.hard_max_agents = reader.read_u32_le()?;
        self.hard_max_objects = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.product_sku, 1)?;
        writer.write_variable(&self.product_name, 1)?;
        writer.write_u32_le(self.max_agents32)?;
        writer.write_u32_le(self.hard_max_agents)?;
        writer.write_u32_le(self.hard_max_objects)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ProductSKU".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.product_sku.clone()),
        )?;
        map.add_with_string_osd(
            "ProductName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.product_name.clone()),
        )?;
        map.add_with_string_osd(
            "MaxAgents32".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.max_agents32.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "HardMaxAgents".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.hard_max_agents.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "HardMaxObjects".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.hard_max_objects.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ProductSKU") {
            self.product_sku = value.as_binary()?;
        }
        if let Some(value) = map.get("ProductName") {
            self.product_name = value.as_binary()?;
        }
        if let Some(value) = map.get("MaxAgents32") {
            self.max_agents32 = osd_u32(&value)?;
        }
        if let Some(value) = map.get("HardMaxAgents") {
            self.hard_max_agents = osd_u32(&value)?;
        }
        if let Some(value) = map.get("HardMaxObjects") {
            self.hard_max_objects = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketRegionInfo3Block {
    fn new_generated() -> Self {
        Self { region_flags_extended: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_flags_extended = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_flags_extended)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionFlagsExtended".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags_extended.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionFlagsExtended") {
            self.region_flags_extended = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketRegionInfo5Block {
    fn new_generated() -> Self {
        Self {
            chat_whisper_range: 0.0_f32,
            chat_normal_range: 0.0_f32,
            chat_shout_range: 0.0_f32,
            chat_whisper_offset: 0.0_f32,
            chat_normal_offset: 0.0_f32,
            chat_shout_offset: 0.0_f32,
            chat_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        28_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.chat_whisper_range = reader.read_f32_le()?;
        self.chat_normal_range = reader.read_f32_le()?;
        self.chat_shout_range = reader.read_f32_le()?;
        self.chat_whisper_offset = reader.read_f32_le()?;
        self.chat_normal_offset = reader.read_f32_le()?;
        self.chat_shout_offset = reader.read_f32_le()?;
        self.chat_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.chat_whisper_range)?;
        writer.write_f32_le(self.chat_normal_range)?;
        writer.write_f32_le(self.chat_shout_range)?;
        writer.write_f32_le(self.chat_whisper_offset)?;
        writer.write_f32_le(self.chat_normal_offset)?;
        writer.write_f32_le(self.chat_shout_offset)?;
        writer.write_u32_le(self.chat_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ChatWhisperRange".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.chat_whisper_range)),
        )?;
        map.add_with_string_osd(
            "ChatNormalRange".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.chat_normal_range)),
        )?;
        map.add_with_string_osd(
            "ChatShoutRange".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.chat_shout_range)),
        )?;
        map.add_with_string_osd(
            "ChatWhisperOffset".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.chat_whisper_offset),
            ),
        )?;
        map.add_with_string_osd(
            "ChatNormalOffset".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.chat_normal_offset)),
        )?;
        map.add_with_string_osd(
            "ChatShoutOffset".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.chat_shout_offset)),
        )?;
        map.add_with_string_osd(
            "ChatFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.chat_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ChatWhisperRange") {
            self.chat_whisper_range = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatNormalRange") {
            self.chat_normal_range = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatShoutRange") {
            self.chat_shout_range = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatWhisperOffset") {
            self.chat_whisper_offset = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatNormalOffset") {
            self.chat_normal_offset = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatShoutOffset") {
            self.chat_shout_offset = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ChatFlags") {
            self.chat_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionInfoPacketCombatSettingsBlock {
    fn new_generated() -> Self {
        Self {
            combat_flags: 0,
            on_death: 0,
            damage_throttle: 0.0_f32,
            regeneration_rate: 0.0_f32,
            invulnerabily_time: 0.0_f32,
            damage_limit: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        21_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.combat_flags = reader.read_u32_le()?;
        self.on_death = reader.read_u8()?;
        self.damage_throttle = reader.read_f32_le()?;
        self.regeneration_rate = reader.read_f32_le()?;
        self.invulnerabily_time = reader.read_f32_le()?;
        self.damage_limit = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.combat_flags)?;
        writer.write_u8(self.on_death)?;
        writer.write_f32_le(self.damage_throttle)?;
        writer.write_f32_le(self.regeneration_rate)?;
        writer.write_f32_le(self.invulnerabily_time)?;
        writer.write_f32_le(self.damage_limit)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CombatFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.combat_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OnDeath".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.on_death)),
        )?;
        map.add_with_string_osd(
            "DamageThrottle".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.damage_throttle)),
        )?;
        map.add_with_string_osd(
            "RegenerationRate".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.regeneration_rate)),
        )?;
        map.add_with_string_osd(
            "InvulnerabilyTime".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.invulnerabily_time)),
        )?;
        map.add_with_string_osd(
            "DamageLimit".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.damage_limit)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CombatFlags") {
            self.combat_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OnDeath") {
            self.on_death = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("DamageThrottle") {
            self.damage_throttle = value.as_real()? as f32;
        }
        if let Some(value) = map.get("RegenerationRate") {
            self.regeneration_rate = value.as_real()? as f32;
        }
        if let Some(value) = map.get("InvulnerabilyTime") {
            self.invulnerabily_time = value.as_real()? as f32;
        }
        if let Some(value) = map.get("DamageLimit") {
            self.damage_limit = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodUpdateRegionInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodUpdateRegionInfoPacketRegionInfoBlock {
    fn new_generated() -> Self {
        Self {
            sim_name: Vec::new(),
            estate_id: 0,
            parent_estate_id: 0,
            region_flags: 0,
            billable_factor: 0.0_f32,
            price_per_meter: 0,
            redirect_grid_x: 0,
            redirect_grid_y: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_name = reader.read_variable(1)?;
        self.estate_id = reader.read_u32_le()?;
        self.parent_estate_id = reader.read_u32_le()?;
        self.region_flags = reader.read_u32_le()?;
        self.billable_factor = reader.read_f32_le()?;
        self.price_per_meter = reader.read_i32_le()?;
        self.redirect_grid_x = reader.read_i32_le()?;
        self.redirect_grid_y = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u32_le(self.parent_estate_id)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_f32_le(self.billable_factor)?;
        writer.write_i32_le(self.price_per_meter)?;
        writer.write_i32_le(self.redirect_grid_x)?;
        writer.write_i32_le(self.redirect_grid_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParentEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "BillableFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.billable_factor)),
        )?;
        map.add_with_string_osd(
            "PricePerMeter".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price_per_meter),
        )?;
        map.add_with_string_osd(
            "RedirectGridX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.redirect_grid_x),
        )?;
        map.add_with_string_osd(
            "RedirectGridY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.redirect_grid_y),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParentEstateID") {
            self.parent_estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("BillableFactor") {
            self.billable_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("PricePerMeter") {
            self.price_per_meter = value.as_integer()?;
        }
        if let Some(value) = map.get("RedirectGridX") {
            self.redirect_grid_x = value.as_integer()?;
        }
        if let Some(value) = map.get("RedirectGridY") {
            self.redirect_grid_y = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodUpdateRegionInfoPacketRegionInfo2Block {
    fn new_generated() -> Self {
        Self { region_flags_extended: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_flags_extended = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_flags_extended)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionFlagsExtended".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags_extended.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionFlagsExtended") {
            self.region_flags_extended = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::NearestLandingRegionRequestPacketRequestingRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::NearestLandingRegionReplyPacketLandingRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::NearestLandingRegionUpdatedPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::TeleportLandingStatusChangedPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakePacketRegionInfoBlock {
    fn new_generated() -> Self {
        Self {
            region_flags: 0,
            sim_access: 0,
            sim_name: Vec::new(),
            sim_owner: libremetaverse_types::UUID::zero(),
            is_estate_manager: false,
            water_height: 0.0_f32,
            billable_factor: 0.0_f32,
            cache_id: libremetaverse_types::UUID::zero(),
            terrain_base0: libremetaverse_types::UUID::zero(),
            terrain_base1: libremetaverse_types::UUID::zero(),
            terrain_base2: libremetaverse_types::UUID::zero(),
            terrain_base3: libremetaverse_types::UUID::zero(),
            terrain_detail0: libremetaverse_types::UUID::zero(),
            terrain_detail1: libremetaverse_types::UUID::zero(),
            terrain_detail2: libremetaverse_types::UUID::zero(),
            terrain_detail3: libremetaverse_types::UUID::zero(),
            terrain_start_height00: 0.0_f32,
            terrain_start_height01: 0.0_f32,
            terrain_start_height10: 0.0_f32,
            terrain_start_height11: 0.0_f32,
            terrain_height_range00: 0.0_f32,
            terrain_height_range01: 0.0_f32,
            terrain_height_range10: 0.0_f32,
            terrain_height_range11: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 206_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_flags = reader.read_u32_le()?;
        self.sim_access = reader.read_u8()?;
        self.sim_name = reader.read_variable(1)?;
        self.sim_owner = reader.read_uuid()?;
        self.is_estate_manager = reader.read_u8()? != 0;
        self.water_height = reader.read_f32_le()?;
        self.billable_factor = reader.read_f32_le()?;
        self.cache_id = reader.read_uuid()?;
        self.terrain_base0 = reader.read_uuid()?;
        self.terrain_base1 = reader.read_uuid()?;
        self.terrain_base2 = reader.read_uuid()?;
        self.terrain_base3 = reader.read_uuid()?;
        self.terrain_detail0 = reader.read_uuid()?;
        self.terrain_detail1 = reader.read_uuid()?;
        self.terrain_detail2 = reader.read_uuid()?;
        self.terrain_detail3 = reader.read_uuid()?;
        self.terrain_start_height00 = reader.read_f32_le()?;
        self.terrain_start_height01 = reader.read_f32_le()?;
        self.terrain_start_height10 = reader.read_f32_le()?;
        self.terrain_start_height11 = reader.read_f32_le()?;
        self.terrain_height_range00 = reader.read_f32_le()?;
        self.terrain_height_range01 = reader.read_f32_le()?;
        self.terrain_height_range10 = reader.read_f32_le()?;
        self.terrain_height_range11 = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.region_flags)?;
        writer.write_u8(self.sim_access)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_uuid(&self.sim_owner)?;
        writer.write_u8(u8::from(self.is_estate_manager))?;
        writer.write_f32_le(self.water_height)?;
        writer.write_f32_le(self.billable_factor)?;
        writer.write_uuid(&self.cache_id)?;
        writer.write_uuid(&self.terrain_base0)?;
        writer.write_uuid(&self.terrain_base1)?;
        writer.write_uuid(&self.terrain_base2)?;
        writer.write_uuid(&self.terrain_base3)?;
        writer.write_uuid(&self.terrain_detail0)?;
        writer.write_uuid(&self.terrain_detail1)?;
        writer.write_uuid(&self.terrain_detail2)?;
        writer.write_uuid(&self.terrain_detail3)?;
        writer.write_f32_le(self.terrain_start_height00)?;
        writer.write_f32_le(self.terrain_start_height01)?;
        writer.write_f32_le(self.terrain_start_height10)?;
        writer.write_f32_le(self.terrain_start_height11)?;
        writer.write_f32_le(self.terrain_height_range00)?;
        writer.write_f32_le(self.terrain_height_range01)?;
        writer.write_f32_le(self.terrain_height_range10)?;
        writer.write_f32_le(self.terrain_height_range11)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimOwner".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.sim_owner),
        )?;
        map.add_with_string_osd(
            "IsEstateManager".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_estate_manager),
        )?;
        map.add_with_string_osd(
            "WaterHeight".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.water_height)),
        )?;
        map.add_with_string_osd(
            "BillableFactor".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.billable_factor)),
        )?;
        map.add_with_string_osd(
            "CacheID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.cache_id),
        )?;
        map.add_with_string_osd(
            "TerrainBase0".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_base0),
        )?;
        map.add_with_string_osd(
            "TerrainBase1".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_base1),
        )?;
        map.add_with_string_osd(
            "TerrainBase2".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_base2),
        )?;
        map.add_with_string_osd(
            "TerrainBase3".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_base3),
        )?;
        map.add_with_string_osd(
            "TerrainDetail0".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_detail0),
        )?;
        map.add_with_string_osd(
            "TerrainDetail1".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_detail1),
        )?;
        map.add_with_string_osd(
            "TerrainDetail2".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_detail2),
        )?;
        map.add_with_string_osd(
            "TerrainDetail3".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.terrain_detail3),
        )?;
        map.add_with_string_osd(
            "TerrainStartHeight00".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_start_height00),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainStartHeight01".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_start_height01),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainStartHeight10".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_start_height10),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainStartHeight11".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_start_height11),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainHeightRange00".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_height_range00),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainHeightRange01".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_height_range01),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainHeightRange10".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_height_range10),
            ),
        )?;
        map.add_with_string_osd(
            "TerrainHeightRange11".to_owned(),
            libremetaverse_structured_data::OSD::Real(
                f64::from(self.terrain_height_range11),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimOwner") {
            self.sim_owner = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsEstateManager") {
            self.is_estate_manager = value.as_boolean()?;
        }
        if let Some(value) = map.get("WaterHeight") {
            self.water_height = value.as_real()? as f32;
        }
        if let Some(value) = map.get("BillableFactor") {
            self.billable_factor = value.as_real()? as f32;
        }
        if let Some(value) = map.get("CacheID") {
            self.cache_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainBase0") {
            self.terrain_base0 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainBase1") {
            self.terrain_base1 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainBase2") {
            self.terrain_base2 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainBase3") {
            self.terrain_base3 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainDetail0") {
            self.terrain_detail0 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainDetail1") {
            self.terrain_detail1 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainDetail2") {
            self.terrain_detail2 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainDetail3") {
            self.terrain_detail3 = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerrainStartHeight00") {
            self.terrain_start_height00 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainStartHeight01") {
            self.terrain_start_height01 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainStartHeight10") {
            self.terrain_start_height10 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainStartHeight11") {
            self.terrain_start_height11 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainHeightRange00") {
            self.terrain_height_range00 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainHeightRange01") {
            self.terrain_height_range01 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainHeightRange10") {
            self.terrain_height_range10 = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TerrainHeightRange11") {
            self.terrain_height_range11 = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakePacketRegionInfo2Block {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakePacketRegionInfo3Block {
    fn new_generated() -> Self {
        Self {
            cpu_class_id: 0,
            cpu_ratio: 0,
            colo_name: Vec::new(),
            product_sku: Vec::new(),
            product_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.colo_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.product_sku.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.product_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.cpu_class_id = reader.read_i32_le()?;
        self.cpu_ratio = reader.read_i32_le()?;
        self.colo_name = reader.read_variable(1)?;
        self.product_sku = reader.read_variable(1)?;
        self.product_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.cpu_class_id)?;
        writer.write_i32_le(self.cpu_ratio)?;
        writer.write_variable(&self.colo_name, 1)?;
        writer.write_variable(&self.product_sku, 1)?;
        writer.write_variable(&self.product_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CPUClassID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.cpu_class_id),
        )?;
        map.add_with_string_osd(
            "CPURatio".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.cpu_ratio),
        )?;
        map.add_with_string_osd(
            "ColoName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.colo_name.clone()),
        )?;
        map.add_with_string_osd(
            "ProductSKU".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.product_sku.clone()),
        )?;
        map.add_with_string_osd(
            "ProductName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.product_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CPUClassID") {
            self.cpu_class_id = value.as_integer()?;
        }
        if let Some(value) = map.get("CPURatio") {
            self.cpu_ratio = value.as_integer()?;
        }
        if let Some(value) = map.get("ColoName") {
            self.colo_name = value.as_binary()?;
        }
        if let Some(value) = map.get("ProductSKU") {
            self.product_sku = value.as_binary()?;
        }
        if let Some(value) = map.get("ProductName") {
            self.product_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakePacketRegionInfo4Block {
    fn new_generated() -> Self {
        Self {
            region_flags_extended: 0,
            region_protocols: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_flags_extended = reader.read_u64_le()?;
        self.region_protocols = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_flags_extended)?;
        writer.write_u64_le(self.region_protocols)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionFlagsExtended".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags_extended.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionProtocols".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_protocols.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionFlagsExtended") {
            self.region_flags_extended = osd_u64(&value)?;
        }
        if let Some(value) = map.get("RegionProtocols") {
            self.region_protocols = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakeReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandshakeReplyPacketRegionInfoBlock {
    fn new_generated() -> Self {
        Self { flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimulatorViewerTimeMessagePacketTimeInfoBlock {
    fn new_generated() -> Self {
        Self {
            usec_since_start: 0,
            sec_per_day: 0,
            sec_per_year: 0,
            sun_direction: libremetaverse_types::Vector3::zero(),
            sun_phase: 0.0_f32,
            sun_ang_velocity: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        44_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.usec_since_start = reader.read_u64_le()?;
        self.sec_per_day = reader.read_u32_le()?;
        self.sec_per_year = reader.read_u32_le()?;
        self.sun_direction = reader.read_vector3()?;
        self.sun_phase = reader.read_f32_le()?;
        self.sun_ang_velocity = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.usec_since_start)?;
        writer.write_u32_le(self.sec_per_day)?;
        writer.write_u32_le(self.sec_per_year)?;
        writer.write_vector3(&self.sun_direction)?;
        writer.write_f32_le(self.sun_phase)?;
        writer.write_vector3(&self.sun_ang_velocity)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UsecSinceStart".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.usec_since_start.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SecPerDay".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.sec_per_day.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SecPerYear".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.sec_per_year.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SunDirection".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.sun_direction)?,
        )?;
        map.add_with_string_osd(
            "SunPhase".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.sun_phase)),
        )?;
        map.add_with_string_osd(
            "SunAngVelocity".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.sun_ang_velocity)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UsecSinceStart") {
            self.usec_since_start = osd_u64(&value)?;
        }
        if let Some(value) = map.get("SecPerDay") {
            self.sec_per_day = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SecPerYear") {
            self.sec_per_year = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SunDirection") {
            self.sun_direction = value.as_vector3()?;
        }
        if let Some(value) = map.get("SunPhase") {
            self.sun_phase = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SunAngVelocity") {
            self.sun_ang_velocity = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EnableSimulatorPacketSimulatorInfoBlock {
    fn new_generated() -> Self {
        Self { handle: 0, ip: 0, port: 0 }
    }
    fn generated_length(&self) -> i32 {
        14_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.handle = reader.read_u64_le()?;
        self.ip = reader.read_u32_le()?;
        self.port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.handle)?;
        writer.write_u32_le(self.ip)?;
        writer.write_u16_be(self.port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Handle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "IP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ip.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Handle") {
            self.handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("IP") {
            self.ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferRequestPacketTransferInfoBlock {
    fn new_generated() -> Self {
        Self {
            transfer_id: libremetaverse_types::UUID::zero(),
            channel_type: 0,
            source_type: 0,
            priority: 0.0_f32,
            params: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.params.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transfer_id = reader.read_uuid()?;
        self.channel_type = reader.read_i32_le()?;
        self.source_type = reader.read_i32_le()?;
        self.priority = reader.read_f32_le()?;
        self.params = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transfer_id)?;
        writer.write_i32_le(self.channel_type)?;
        writer.write_i32_le(self.source_type)?;
        writer.write_f32_le(self.priority)?;
        writer.write_variable(&self.params, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransferID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transfer_id),
        )?;
        map.add_with_string_osd(
            "ChannelType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel_type),
        )?;
        map.add_with_string_osd(
            "SourceType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.source_type),
        )?;
        map.add_with_string_osd(
            "Priority".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.priority)),
        )?;
        map.add_with_string_osd(
            "Params".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.params.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransferID") {
            self.transfer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelType") {
            self.channel_type = value.as_integer()?;
        }
        if let Some(value) = map.get("SourceType") {
            self.source_type = value.as_integer()?;
        }
        if let Some(value) = map.get("Priority") {
            self.priority = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Params") {
            self.params = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferInfoPacketTransferInfoBlock {
    fn new_generated() -> Self {
        Self {
            transfer_id: libremetaverse_types::UUID::zero(),
            channel_type: 0,
            target_type: 0,
            status: 0,
            size: 0,
            params: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.params.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transfer_id = reader.read_uuid()?;
        self.channel_type = reader.read_i32_le()?;
        self.target_type = reader.read_i32_le()?;
        self.status = reader.read_i32_le()?;
        self.size = reader.read_i32_le()?;
        self.params = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transfer_id)?;
        writer.write_i32_le(self.channel_type)?;
        writer.write_i32_le(self.target_type)?;
        writer.write_i32_le(self.status)?;
        writer.write_i32_le(self.size)?;
        writer.write_variable(&self.params, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransferID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transfer_id),
        )?;
        map.add_with_string_osd(
            "ChannelType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel_type),
        )?;
        map.add_with_string_osd(
            "TargetType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.target_type),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.status),
        )?;
        map.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.size),
        )?;
        map.add_with_string_osd(
            "Params".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.params.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransferID") {
            self.transfer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelType") {
            self.channel_type = value.as_integer()?;
        }
        if let Some(value) = map.get("TargetType") {
            self.target_type = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_integer()?;
        }
        if let Some(value) = map.get("Size") {
            self.size = value.as_integer()?;
        }
        if let Some(value) = map.get("Params") {
            self.params = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferAbortPacketTransferInfoBlock {
    fn new_generated() -> Self {
        Self {
            transfer_id: libremetaverse_types::UUID::zero(),
            channel_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transfer_id = reader.read_uuid()?;
        self.channel_type = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transfer_id)?;
        writer.write_i32_le(self.channel_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransferID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transfer_id),
        )?;
        map.add_with_string_osd(
            "ChannelType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel_type),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransferID") {
            self.transfer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelType") {
            self.channel_type = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestXferPacketXferIDBlock {
    fn new_generated() -> Self {
        Self {
            id: 0,
            filename: Vec::new(),
            file_path: 0,
            delete_on_completion: false,
            use_big_packets: false,
            v_file_id: libremetaverse_types::UUID::zero(),
            v_file_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.filename.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u64_le()?;
        self.filename = reader.read_variable(1)?;
        self.file_path = reader.read_u8()?;
        self.delete_on_completion = reader.read_u8()? != 0;
        self.use_big_packets = reader.read_u8()? != 0;
        self.v_file_id = reader.read_uuid()?;
        self.v_file_type = reader.read_i16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.id)?;
        writer.write_variable(&self.filename, 1)?;
        writer.write_u8(self.file_path)?;
        writer.write_u8(u8::from(self.delete_on_completion))?;
        writer.write_u8(u8::from(self.use_big_packets))?;
        writer.write_uuid(&self.v_file_id)?;
        writer.write_i16_le(self.v_file_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Filename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.filename.clone()),
        )?;
        map.add_with_string_osd(
            "FilePath".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.file_path)),
        )?;
        map.add_with_string_osd(
            "DeleteOnCompletion".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.delete_on_completion),
        )?;
        map.add_with_string_osd(
            "UseBigPackets".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.use_big_packets),
        )?;
        map.add_with_string_osd(
            "VFileID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.v_file_id),
        )?;
        map.add_with_string_osd(
            "VFileType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.v_file_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Filename") {
            self.filename = value.as_binary()?;
        }
        if let Some(value) = map.get("FilePath") {
            self.file_path = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("DeleteOnCompletion") {
            self.delete_on_completion = value.as_boolean()?;
        }
        if let Some(value) = map.get("UseBigPackets") {
            self.use_big_packets = value.as_boolean()?;
        }
        if let Some(value) = map.get("VFileID") {
            self.v_file_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("VFileType") {
            self.v_file_type = value.as_integer()? as i16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AbortXferPacketXferIDBlock {
    fn new_generated() -> Self {
        Self { id: 0, result: 0 }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u64_le()?;
        self.result = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.id)?;
        writer.write_i32_le(self.result)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Result".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.result),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Result") {
            self.result = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketSenderBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            is_trial: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.is_trial = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_u8(u8::from(self.is_trial))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "IsTrial".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_trial),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsTrial") {
            self.is_trial = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { texture_entry: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.texture_entry.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.texture_entry = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.texture_entry, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TextureEntry".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_entry.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TextureEntry") {
            self.texture_entry = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketVisualParamBlock {
    fn new_generated() -> Self {
        Self { param_value: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.param_value = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.param_value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParamValue".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.param_value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParamValue") {
            self.param_value = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketAppearanceDataBlock {
    fn new_generated() -> Self {
        Self {
            appearance_version: 0,
            cof_version: 0,
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        9_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.appearance_version = reader.read_u8()?;
        self.cof_version = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.appearance_version)?;
        writer.write_i32_le(self.cof_version)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AppearanceVersion".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.appearance_version),
            ),
        )?;
        map.add_with_string_osd(
            "CofVersion".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.cof_version),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AppearanceVersion") {
            self.appearance_version = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("CofVersion") {
            self.cof_version = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketAppearanceHoverBlock {
    fn new_generated() -> Self {
        Self {
            hover_height: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.hover_height = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.hover_height)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "HoverHeight".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.hover_height)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("HoverHeight") {
            self.hover_height = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAppearancePacketAttachmentBlockBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            attachment_point: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.attachment_point = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_u8(self.attachment_point)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "AttachmentPoint".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.attachment_point),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AttachmentPoint") {
            self.attachment_point = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetFollowCamPropertiesPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetFollowCamPropertiesPacketCameraPropertyBlock {
    fn new_generated() -> Self {
        Self { type_: 0, value: 0.0_f32 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.type_ = reader.read_i32_le()?;
        self.value = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.type_)?;
        writer.write_f32_le(self.value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.type_),
        )?;
        map.add_with_string_osd(
            "Value".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()?;
        }
        if let Some(value) = map.get("Value") {
            self.value = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ClearFollowCamPropertiesPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestPayPricePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PayPriceReplyPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            default_pay_price: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.default_pay_price = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_i32_le(self.default_pay_price)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "DefaultPayPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.default_pay_price),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DefaultPayPrice") {
            self.default_pay_price = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PayPriceReplyPacketButtonDataBlock {
    fn new_generated() -> Self {
        Self { pay_button: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pay_button = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.pay_button)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PayButton".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pay_button),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PayButton") {
            self.pay_button = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::KickUserPacketTargetBlockBlock {
    fn new_generated() -> Self {
        Self {
            target_ip: 0,
            target_port: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_ip = reader.read_u32_le()?;
        self.target_port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.target_ip)?;
        writer.write_u16_be(self.target_port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.target_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TargetPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.target_port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetIP") {
            self.target_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TargetPort") {
            self.target_port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::KickUserPacketUserInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            reason: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.reason.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.reason = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_variable(&self.reason, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Reason".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.reason.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Reason") {
            self.reason = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::KickUserAckPacketUserInfoBlock {
    fn new_generated() -> Self {
        Self {
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodKickUserPacketUserInfoBlock {
    fn new_generated() -> Self {
        Self {
            god_id: libremetaverse_types::UUID::zero(),
            god_session_id: libremetaverse_types::UUID::zero(),
            agent_id: libremetaverse_types::UUID::zero(),
            kick_flags: 0,
            reason: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.reason.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.god_id = reader.read_uuid()?;
        self.god_session_id = reader.read_uuid()?;
        self.agent_id = reader.read_uuid()?;
        self.kick_flags = reader.read_u32_le()?;
        self.reason = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.god_id)?;
        writer.write_uuid(&self.god_session_id)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.kick_flags)?;
        writer.write_variable(&self.reason, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GodID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.god_id),
        )?;
        map.add_with_string_osd(
            "GodSessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.god_session_id),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "KickFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.kick_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Reason".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.reason.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GodID") {
            self.god_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GodSessionID") {
            self.god_session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("KickFlags") {
            self.kick_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Reason") {
            self.reason = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SystemKickUserPacketAgentInfoBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectUserPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectUserPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FreezeUserPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FreezeUserPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPropertiesRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            avatar_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.avatar_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.avatar_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::AvatarPropertiesRequestBackendPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            avatar_id: libremetaverse_types::UUID::zero(),
            god_level: 0,
            web_profiles_disabled: false,
        }
    }
    fn generated_length(&self) -> i32 {
        34_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.avatar_id = reader.read_uuid()?;
        self.god_level = reader.read_u8()?;
        self.web_profiles_disabled = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.avatar_id)?;
        writer.write_u8(self.god_level)?;
        writer.write_u8(u8::from(self.web_profiles_disabled))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        map.add_with_string_osd(
            "GodLevel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.god_level)),
        )?;
        map.add_with_string_osd(
            "WebProfilesDisabled".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.web_profiles_disabled),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GodLevel") {
            self.god_level = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("WebProfilesDisabled") {
            self.web_profiles_disabled = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPropertiesReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            avatar_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.avatar_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.avatar_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPropertiesReplyPacketPropertiesDataBlock {
    fn new_generated() -> Self {
        Self {
            image_id: libremetaverse_types::UUID::zero(),
            fl_image_id: libremetaverse_types::UUID::zero(),
            partner_id: libremetaverse_types::UUID::zero(),
            about_text: Vec::new(),
            fl_about_text: Vec::new(),
            born_on: Vec::new(),
            profile_url: Vec::new(),
            charter_member: Vec::new(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.about_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.fl_about_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.born_on.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.profile_url.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.charter_member.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.image_id = reader.read_uuid()?;
        self.fl_image_id = reader.read_uuid()?;
        self.partner_id = reader.read_uuid()?;
        self.about_text = reader.read_variable(2)?;
        self.fl_about_text = reader.read_variable(1)?;
        self.born_on = reader.read_variable(1)?;
        self.profile_url = reader.read_variable(1)?;
        self.charter_member = reader.read_variable(1)?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.image_id)?;
        writer.write_uuid(&self.fl_image_id)?;
        writer.write_uuid(&self.partner_id)?;
        writer.write_variable(&self.about_text, 2)?;
        writer.write_variable(&self.fl_about_text, 1)?;
        writer.write_variable(&self.born_on, 1)?;
        writer.write_variable(&self.profile_url, 1)?;
        writer.write_variable(&self.charter_member, 1)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.image_id),
        )?;
        map.add_with_string_osd(
            "FLImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.fl_image_id),
        )?;
        map.add_with_string_osd(
            "PartnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.partner_id),
        )?;
        map.add_with_string_osd(
            "AboutText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.about_text.clone()),
        )?;
        map.add_with_string_osd(
            "FLAboutText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.fl_about_text.clone()),
        )?;
        map.add_with_string_osd(
            "BornOn".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.born_on.clone()),
        )?;
        map.add_with_string_osd(
            "ProfileURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.profile_url.clone()),
        )?;
        map.add_with_string_osd(
            "CharterMember".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.charter_member.clone()),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ImageID") {
            self.image_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FLImageID") {
            self.fl_image_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PartnerID") {
            self.partner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AboutText") {
            self.about_text = value.as_binary()?;
        }
        if let Some(value) = map.get("FLAboutText") {
            self.fl_about_text = value.as_binary()?;
        }
        if let Some(value) = map.get("BornOn") {
            self.born_on = value.as_binary()?;
        }
        if let Some(value) = map.get("ProfileURL") {
            self.profile_url = value.as_binary()?;
        }
        if let Some(value) = map.get("CharterMember") {
            self.charter_member = value.as_binary()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarInterestsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            avatar_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.avatar_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.avatar_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarInterestsReplyPacketPropertiesDataBlock {
    fn new_generated() -> Self {
        Self {
            want_to_mask: 0,
            want_to_text: Vec::new(),
            skills_mask: 0,
            skills_text: Vec::new(),
            languages_text: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.want_to_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.skills_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.languages_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.want_to_mask = reader.read_u32_le()?;
        self.want_to_text = reader.read_variable(1)?;
        self.skills_mask = reader.read_u32_le()?;
        self.skills_text = reader.read_variable(1)?;
        self.languages_text = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.want_to_mask)?;
        writer.write_variable(&self.want_to_text, 1)?;
        writer.write_u32_le(self.skills_mask)?;
        writer.write_variable(&self.skills_text, 1)?;
        writer.write_variable(&self.languages_text, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "WantToMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.want_to_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "WantToText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.want_to_text.clone()),
        )?;
        map.add_with_string_osd(
            "SkillsMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.skills_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SkillsText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.skills_text.clone()),
        )?;
        map.add_with_string_osd(
            "LanguagesText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.languages_text.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("WantToMask") {
            self.want_to_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("WantToText") {
            self.want_to_text = value.as_binary()?;
        }
        if let Some(value) = map.get("SkillsMask") {
            self.skills_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SkillsText") {
            self.skills_text = value.as_binary()?;
        }
        if let Some(value) = map.get("LanguagesText") {
            self.languages_text = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarGroupsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            avatar_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.avatar_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.avatar_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "AvatarID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.avatar_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AvatarID") {
            self.avatar_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarGroupsReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_powers: 0,
            accept_notices: false,
            group_title: Vec::new(),
            group_id: libremetaverse_types::UUID::zero(),
            group_name: Vec::new(),
            group_insignia_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 41_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_title.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_powers = reader.read_u64_le()?;
        self.accept_notices = reader.read_u8()? != 0;
        self.group_title = reader.read_variable(1)?;
        self.group_id = reader.read_uuid()?;
        self.group_name = reader.read_variable(1)?;
        self.group_insignia_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.group_powers)?;
        writer.write_u8(u8::from(self.accept_notices))?;
        writer.write_variable(&self.group_title, 1)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.group_name, 1)?;
        writer.write_uuid(&self.group_insignia_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AcceptNotices".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.accept_notices),
        )?;
        map.add_with_string_osd(
            "GroupTitle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_title.clone()),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "GroupName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_name.clone()),
        )?;
        map.add_with_string_osd(
            "GroupInsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_insignia_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupPowers") {
            self.group_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("AcceptNotices") {
            self.accept_notices = value.as_boolean()?;
        }
        if let Some(value) = map.get("GroupTitle") {
            self.group_title = value.as_binary()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupName") {
            self.group_name = value.as_binary()?;
        }
        if let Some(value) = map.get("GroupInsigniaID") {
            self.group_insignia_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarGroupsReplyPacketNewGroupDataBlock {
    fn new_generated() -> Self {
        Self { list_in_profile: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.list_in_profile = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.list_in_profile))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ListInProfile".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.list_in_profile),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ListInProfile") {
            self.list_in_profile = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPropertiesUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPropertiesUpdatePacketPropertiesDataBlock {
    fn new_generated() -> Self {
        Self {
            image_id: libremetaverse_types::UUID::zero(),
            fl_image_id: libremetaverse_types::UUID::zero(),
            about_text: Vec::new(),
            fl_about_text: Vec::new(),
            allow_publish: false,
            mature_publish: false,
            profile_url: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 34_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.about_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.fl_about_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.profile_url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.image_id = reader.read_uuid()?;
        self.fl_image_id = reader.read_uuid()?;
        self.about_text = reader.read_variable(2)?;
        self.fl_about_text = reader.read_variable(1)?;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        self.profile_url = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.image_id)?;
        writer.write_uuid(&self.fl_image_id)?;
        writer.write_variable(&self.about_text, 2)?;
        writer.write_variable(&self.fl_about_text, 1)?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        writer.write_variable(&self.profile_url, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.image_id),
        )?;
        map.add_with_string_osd(
            "FLImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.fl_image_id),
        )?;
        map.add_with_string_osd(
            "AboutText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.about_text.clone()),
        )?;
        map.add_with_string_osd(
            "FLAboutText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.fl_about_text.clone()),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        map.add_with_string_osd(
            "ProfileURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.profile_url.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ImageID") {
            self.image_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FLImageID") {
            self.fl_image_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AboutText") {
            self.about_text = value.as_binary()?;
        }
        if let Some(value) = map.get("FLAboutText") {
            self.fl_about_text = value.as_binary()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("ProfileURL") {
            self.profile_url = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarInterestsUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarInterestsUpdatePacketPropertiesDataBlock {
    fn new_generated() -> Self {
        Self {
            want_to_mask: 0,
            want_to_text: Vec::new(),
            skills_mask: 0,
            skills_text: Vec::new(),
            languages_text: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.want_to_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.skills_text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.languages_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.want_to_mask = reader.read_u32_le()?;
        self.want_to_text = reader.read_variable(1)?;
        self.skills_mask = reader.read_u32_le()?;
        self.skills_text = reader.read_variable(1)?;
        self.languages_text = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.want_to_mask)?;
        writer.write_variable(&self.want_to_text, 1)?;
        writer.write_u32_le(self.skills_mask)?;
        writer.write_variable(&self.skills_text, 1)?;
        writer.write_variable(&self.languages_text, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "WantToMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.want_to_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "WantToText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.want_to_text.clone()),
        )?;
        map.add_with_string_osd(
            "SkillsMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.skills_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SkillsText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.skills_text.clone()),
        )?;
        map.add_with_string_osd(
            "LanguagesText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.languages_text.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("WantToMask") {
            self.want_to_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("WantToText") {
            self.want_to_text = value.as_binary()?;
        }
        if let Some(value) = map.get("SkillsMask") {
            self.skills_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SkillsText") {
            self.skills_text = value.as_binary()?;
        }
        if let Some(value) = map.get("LanguagesText") {
            self.languages_text = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarNotesReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarNotesReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            notes: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.notes.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.notes = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_variable(&self.notes, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Notes".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.notes.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Notes") {
            self.notes = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarNotesUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarNotesUpdatePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            notes: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.notes.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.notes = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_variable(&self.notes, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Notes".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.notes.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Notes") {
            self.notes = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPicksReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            target_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.target_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.target_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarPicksReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            pick_id: libremetaverse_types::UUID::zero(),
            pick_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.pick_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pick_id = reader.read_uuid()?;
        self.pick_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.pick_id)?;
        writer.write_variable(&self.pick_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PickID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.pick_id),
        )?;
        map.add_with_string_osd(
            "PickName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.pick_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PickID") {
            self.pick_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PickName") {
            self.pick_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventInfoRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventInfoRequestPacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventInfoReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventInfoReplyPacketEventDataBlock {
    fn new_generated() -> Self {
        Self {
            event_id: 0,
            creator: Vec::new(),
            name: Vec::new(),
            category: Vec::new(),
            desc: Vec::new(),
            date: Vec::new(),
            date_utc: 0,
            duration: 0,
            cover: 0,
            amount: 0,
            sim_name: Vec::new(),
            global_pos: libremetaverse_types::Vector3d::zero(),
            event_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 48_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.creator.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.category.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.desc.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.date.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        self.creator = reader.read_variable(1)?;
        self.name = reader.read_variable(1)?;
        self.category = reader.read_variable(1)?;
        self.desc = reader.read_variable(2)?;
        self.date = reader.read_variable(1)?;
        self.date_utc = reader.read_u32_le()?;
        self.duration = reader.read_u32_le()?;
        self.cover = reader.read_u32_le()?;
        self.amount = reader.read_u32_le()?;
        self.sim_name = reader.read_variable(1)?;
        self.global_pos = reader.read_vector3d()?;
        self.event_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        writer.write_variable(&self.creator, 1)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.category, 1)?;
        writer.write_variable(&self.desc, 2)?;
        writer.write_variable(&self.date, 1)?;
        writer.write_u32_le(self.date_utc)?;
        writer.write_u32_le(self.duration)?;
        writer.write_u32_le(self.cover)?;
        writer.write_u32_le(self.amount)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_vector3d(&self.global_pos)?;
        writer.write_u32_le(self.event_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Creator".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.creator.clone()),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.category.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "Date".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.date.clone()),
        )?;
        map.add_with_string_osd(
            "DateUTC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.date_utc.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Duration".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.duration.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Cover".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.cover.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.amount.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "GlobalPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.global_pos)?,
        )?;
        map.add_with_string_osd(
            "EventFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Creator") {
            self.creator = value.as_binary()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("Date") {
            self.date = value.as_binary()?;
        }
        if let Some(value) = map.get("DateUTC") {
            self.date_utc = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Duration") {
            self.duration = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Cover") {
            self.cover = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("GlobalPos") {
            self.global_pos = value.as_vector3d()?;
        }
        if let Some(value) = map.get("EventFlags") {
            self.event_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventNotificationAddRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventNotificationAddRequestPacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::EventNotificationRemoveRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::EventNotificationRemoveRequestPacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventGodDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventGodDeletePacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventGodDeletePacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            query_text: Vec::new(),
            query_flags: 0,
            query_start: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.query_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.query_text = reader.read_variable(1)?;
        self.query_flags = reader.read_u32_le()?;
        self.query_start = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_variable(&self.query_text, 1)?;
        writer.write_u32_le(self.query_flags)?;
        writer.write_i32_le(self.query_start)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "QueryText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.query_text.clone()),
        )?;
        map.add_with_string_osd(
            "QueryFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.query_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "QueryStart".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.query_start),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryText") {
            self.query_text = value.as_binary()?;
        }
        if let Some(value) = map.get("QueryFlags") {
            self.query_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("QueryStart") {
            self.query_start = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickInfoReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickInfoReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            pick_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            top_pick: false,
            parcel_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            desc: Vec::new(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            user: Vec::new(),
            original_name: Vec::new(),
            sim_name: Vec::new(),
            pos_global: libremetaverse_types::Vector3d::zero(),
            sort_order: 0,
            enabled: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 94_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.desc.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.user.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.original_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pick_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.top_pick = reader.read_u8()? != 0;
        self.parcel_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(2)?;
        self.snapshot_id = reader.read_uuid()?;
        self.user = reader.read_variable(1)?;
        self.original_name = reader.read_variable(1)?;
        self.sim_name = reader.read_variable(1)?;
        self.pos_global = reader.read_vector3d()?;
        self.sort_order = reader.read_i32_le()?;
        self.enabled = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.pick_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_u8(u8::from(self.top_pick))?;
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 2)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_variable(&self.user, 1)?;
        writer.write_variable(&self.original_name, 1)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_vector3d(&self.pos_global)?;
        writer.write_i32_le(self.sort_order)?;
        writer.write_u8(u8::from(self.enabled))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PickID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.pick_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "TopPick".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.top_pick),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "User".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.user.clone()),
        )?;
        map.add_with_string_osd(
            "OriginalName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.original_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "PosGlobal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.pos_global)?,
        )?;
        map.add_with_string_osd(
            "SortOrder".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sort_order),
        )?;
        map.add_with_string_osd(
            "Enabled".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.enabled),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PickID") {
            self.pick_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TopPick") {
            self.top_pick = value.as_boolean()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("User") {
            self.user = value.as_binary()?;
        }
        if let Some(value) = map.get("OriginalName") {
            self.original_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("PosGlobal") {
            self.pos_global = value.as_vector3d()?;
        }
        if let Some(value) = map.get("SortOrder") {
            self.sort_order = value.as_integer()?;
        }
        if let Some(value) = map.get("Enabled") {
            self.enabled = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickInfoUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickInfoUpdatePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            pick_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            top_pick: false,
            parcel_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            desc: Vec::new(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            pos_global: libremetaverse_types::Vector3d::zero(),
            sort_order: 0,
            enabled: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 94_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.desc.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pick_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.top_pick = reader.read_u8()? != 0;
        self.parcel_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(2)?;
        self.snapshot_id = reader.read_uuid()?;
        self.pos_global = reader.read_vector3d()?;
        self.sort_order = reader.read_i32_le()?;
        self.enabled = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.pick_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_u8(u8::from(self.top_pick))?;
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 2)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_vector3d(&self.pos_global)?;
        writer.write_i32_le(self.sort_order)?;
        writer.write_u8(u8::from(self.enabled))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PickID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.pick_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "TopPick".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.top_pick),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "PosGlobal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.pos_global)?,
        )?;
        map.add_with_string_osd(
            "SortOrder".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sort_order),
        )?;
        map.add_with_string_osd(
            "Enabled".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.enabled),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PickID") {
            self.pick_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TopPick") {
            self.top_pick = value.as_boolean()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PosGlobal") {
            self.pos_global = value.as_vector3d()?;
        }
        if let Some(value) = map.get("SortOrder") {
            self.sort_order = value.as_integer()?;
        }
        if let Some(value) = map.get("Enabled") {
            self.enabled = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickDeletePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            pick_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pick_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.pick_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PickID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.pick_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PickID") {
            self.pick_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickGodDeletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PickGodDeletePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            pick_id: libremetaverse_types::UUID::zero(),
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.pick_id = reader.read_uuid()?;
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.pick_id)?;
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PickID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.pick_id),
        )?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PickID") {
            self.pick_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptQuestionPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            object_name: Vec::new(),
            object_owner: Vec::new(),
            questions: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_owner.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.object_name = reader.read_variable(1)?;
        self.object_owner = reader.read_variable(1)?;
        self.questions = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_variable(&self.object_name, 1)?;
        writer.write_variable(&self.object_owner, 1)?;
        writer.write_i32_le(self.questions)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "ObjectName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_name.clone()),
        )?;
        map.add_with_string_osd(
            "ObjectOwner".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_owner.clone()),
        )?;
        map.add_with_string_osd(
            "Questions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.questions),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectName") {
            self.object_name = value.as_binary()?;
        }
        if let Some(value) = map.get("ObjectOwner") {
            self.object_owner = value.as_binary()?;
        }
        if let Some(value) = map.get("Questions") {
            self.questions = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptQuestionPacketExperienceBlock {
    fn new_generated() -> Self {
        Self {
            experience_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.experience_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.experience_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ExperienceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.experience_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ExperienceID") {
            self.experience_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptControlChangePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            take_controls: false,
            controls: 0,
            pass_to_agent: false,
        }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.take_controls = reader.read_u8()? != 0;
        self.controls = reader.read_u32_le()?;
        self.pass_to_agent = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.take_controls))?;
        writer.write_u32_le(self.controls)?;
        writer.write_u8(u8::from(self.pass_to_agent))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TakeControls".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.take_controls),
        )?;
        map.add_with_string_osd(
            "Controls".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.controls.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PassToAgent".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.pass_to_agent),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TakeControls") {
            self.take_controls = value.as_boolean()?;
        }
        if let Some(value) = map.get("Controls") {
            self.controls = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PassToAgent") {
            self.pass_to_agent = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDialogPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            first_name: Vec::new(),
            last_name: Vec::new(),
            object_name: Vec::new(),
            message: Vec::new(),
            chat_channel: 0,
            image_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.first_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.first_name = reader.read_variable(1)?;
        self.last_name = reader.read_variable(1)?;
        self.object_name = reader.read_variable(1)?;
        self.message = reader.read_variable(2)?;
        self.chat_channel = reader.read_i32_le()?;
        self.image_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_variable(&self.first_name, 1)?;
        writer.write_variable(&self.last_name, 1)?;
        writer.write_variable(&self.object_name, 1)?;
        writer.write_variable(&self.message, 2)?;
        writer.write_i32_le(self.chat_channel)?;
        writer.write_uuid(&self.image_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "FirstName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.first_name.clone()),
        )?;
        map.add_with_string_osd(
            "LastName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_name.clone()),
        )?;
        map.add_with_string_osd(
            "ObjectName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_name.clone()),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "ChatChannel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.chat_channel),
        )?;
        map.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.image_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FirstName") {
            self.first_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LastName") {
            self.last_name = value.as_binary()?;
        }
        if let Some(value) = map.get("ObjectName") {
            self.object_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("ChatChannel") {
            self.chat_channel = value.as_integer()?;
        }
        if let Some(value) = map.get("ImageID") {
            self.image_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDialogPacketButtonsBlock {
    fn new_generated() -> Self {
        Self { button_label: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.button_label.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.button_label = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.button_label, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ButtonLabel".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.button_label.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ButtonLabel") {
            self.button_label = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDialogPacketOwnerDataBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDialogReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDialogReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            chat_channel: 0,
            button_index: 0,
            button_label: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.button_label.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.chat_channel = reader.read_i32_le()?;
        self.button_index = reader.read_i32_le()?;
        self.button_label = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_i32_le(self.chat_channel)?;
        writer.write_i32_le(self.button_index)?;
        writer.write_variable(&self.button_label, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ChatChannel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.chat_channel),
        )?;
        map.add_with_string_osd(
            "ButtonIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.button_index),
        )?;
        map.add_with_string_osd(
            "ButtonLabel".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.button_label.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChatChannel") {
            self.chat_channel = value.as_integer()?;
        }
        if let Some(value) = map.get("ButtonIndex") {
            self.button_index = value.as_integer()?;
        }
        if let Some(value) = map.get("ButtonLabel") {
            self.button_label = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ForceScriptControlReleasePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RevokePermissionsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RevokePermissionsPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            object_permissions: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.object_permissions = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_u32_le(self.object_permissions)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ObjectPermissions".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_permissions.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectPermissions") {
            self.object_permissions = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LoadURLPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_name: Vec::new(),
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            owner_is_group: false,
            message: Vec::new(),
            url: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_name = reader.read_variable(1)?;
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.owner_is_group = reader.read_u8()? != 0;
        self.message = reader.read_variable(1)?;
        self.url = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.object_name, 1)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(u8::from(self.owner_is_group))?;
        writer.write_variable(&self.message, 1)?;
        writer.write_variable(&self.url, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_name.clone()),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "OwnerIsGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.owner_is_group),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "URL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.url.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectName") {
            self.object_name = value.as_binary()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerIsGroup") {
            self.owner_is_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("URL") {
            self.url = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptTeleportRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            object_name: Vec::new(),
            sim_name: Vec::new(),
            sim_position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_name = reader.read_variable(1)?;
        self.sim_name = reader.read_variable(1)?;
        self.sim_position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.object_name, 1)?;
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_vector3(&self.sim_position)?;
        writer.write_vector3(&self.look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "SimPosition".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.sim_position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectName") {
            self.object_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimPosition") {
            self.sim_position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptTeleportRequestPacketOptionsBlock {
    fn new_generated() -> Self {
        Self { flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelOverlayPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            sequence_id: 0,
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sequence_id = reader.read_i32_le()?;
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.sequence_id)?;
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesRequestByIDPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::ParcelPropertiesRequestByIDPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            sequence_id: 0,
            local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sequence_id = reader.read_i32_le()?;
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.sequence_id)?;
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesUpdatePacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            flags: 0,
            parcel_flags: 0,
            sale_price: 0,
            name: Vec::new(),
            desc: Vec::new(),
            music_url: Vec::new(),
            media_url: Vec::new(),
            media_id: libremetaverse_types::UUID::zero(),
            media_auto_scale: 0,
            group_id: libremetaverse_types::UUID::zero(),
            pass_price: 0,
            pass_hours: 0.0_f32,
            category: 0,
            auth_buyer_id: libremetaverse_types::UUID::zero(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            user_location: libremetaverse_types::Vector3::zero(),
            user_look_at: libremetaverse_types::Vector3::zero(),
            landing_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 115_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.desc.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.music_url.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        self.parcel_flags = reader.read_u32_le()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(1)?;
        self.music_url = reader.read_variable(1)?;
        self.media_url = reader.read_variable(1)?;
        self.media_id = reader.read_uuid()?;
        self.media_auto_scale = reader.read_u8()?;
        self.group_id = reader.read_uuid()?;
        self.pass_price = reader.read_i32_le()?;
        self.pass_hours = reader.read_f32_le()?;
        self.category = reader.read_u8()?;
        self.auth_buyer_id = reader.read_uuid()?;
        self.snapshot_id = reader.read_uuid()?;
        self.user_location = reader.read_vector3()?;
        self.user_look_at = reader.read_vector3()?;
        self.landing_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.parcel_flags)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 1)?;
        writer.write_variable(&self.music_url, 1)?;
        writer.write_variable(&self.media_url, 1)?;
        writer.write_uuid(&self.media_id)?;
        writer.write_u8(self.media_auto_scale)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_i32_le(self.pass_price)?;
        writer.write_f32_le(self.pass_hours)?;
        writer.write_u8(self.category)?;
        writer.write_uuid(&self.auth_buyer_id)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_vector3(&self.user_location)?;
        writer.write_vector3(&self.user_look_at)?;
        writer.write_u8(self.landing_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ParcelFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parcel_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "MusicURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.music_url.clone()),
        )?;
        map.add_with_string_osd(
            "MediaURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_url.clone()),
        )?;
        map.add_with_string_osd(
            "MediaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.media_id),
        )?;
        map.add_with_string_osd(
            "MediaAutoScale".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.media_auto_scale),
            ),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "PassPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pass_price),
        )?;
        map.add_with_string_osd(
            "PassHours".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.pass_hours)),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "AuthBuyerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.auth_buyer_id),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "UserLocation".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.user_location)?,
        )?;
        map.add_with_string_osd(
            "UserLookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.user_look_at)?,
        )?;
        map.add_with_string_osd(
            "LandingType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.landing_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ParcelFlags") {
            self.parcel_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("MusicURL") {
            self.music_url = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaURL") {
            self.media_url = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaID") {
            self.media_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MediaAutoScale") {
            self.media_auto_scale = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PassPrice") {
            self.pass_price = value.as_integer()?;
        }
        if let Some(value) = map.get("PassHours") {
            self.pass_hours = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AuthBuyerID") {
            self.auth_buyer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("UserLocation") {
            self.user_location = value.as_vector3()?;
        }
        if let Some(value) = map.get("UserLookAt") {
            self.user_look_at = value.as_vector3()?;
        }
        if let Some(value) = map.get("LandingType") {
            self.landing_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReturnObjectsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReturnObjectsPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            return_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.return_type = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_u32_le(self.return_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "ReturnType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.return_type.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("ReturnType") {
            self.return_type = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReturnObjectsPacketTaskIDsBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReturnObjectsPacketOwnerIDsBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSetOtherCleanTimePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSetOtherCleanTimePacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            other_clean_time: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.other_clean_time = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_i32_le(self.other_clean_time)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "OtherCleanTime".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.other_clean_time),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("OtherCleanTime") {
            self.other_clean_time = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDisableObjectsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDisableObjectsPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            return_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.return_type = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_u32_le(self.return_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "ReturnType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.return_type.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("ReturnType") {
            self.return_type = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDisableObjectsPacketTaskIDsBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDisableObjectsPacketOwnerIDsBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSelectObjectsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSelectObjectsPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            return_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.return_type = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_u32_le(self.return_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "ReturnType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.return_type.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("ReturnType") {
            self.return_type = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSelectObjectsPacketReturnIDsBlock {
    fn new_generated() -> Self {
        Self {
            return_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.return_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.return_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ReturnID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.return_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ReturnID") {
            self.return_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EstateCovenantRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EstateCovenantReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            covenant_id: libremetaverse_types::UUID::zero(),
            covenant_timestamp: 0,
            estate_name: Vec::new(),
            estate_owner_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.estate_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.covenant_id = reader.read_uuid()?;
        self.covenant_timestamp = reader.read_u32_le()?;
        self.estate_name = reader.read_variable(1)?;
        self.estate_owner_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.covenant_id)?;
        writer.write_u32_le(self.covenant_timestamp)?;
        writer.write_variable(&self.estate_name, 1)?;
        writer.write_uuid(&self.estate_owner_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CovenantID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.covenant_id),
        )?;
        map.add_with_string_osd(
            "CovenantTimestamp".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.covenant_timestamp.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.estate_name.clone()),
        )?;
        map.add_with_string_osd(
            "EstateOwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.estate_owner_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CovenantID") {
            self.covenant_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CovenantTimestamp") {
            self.covenant_timestamp = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateName") {
            self.estate_name = value.as_binary()?;
        }
        if let Some(value) = map.get("EstateOwnerID") {
            self.estate_owner_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ForceObjectSelectPacketHeaderBlock {
    fn new_generated() -> Self {
        Self { reset_list: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.reset_list = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.reset_list))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ResetList".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.reset_list),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ResetList") {
            self.reset_list = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ForceObjectSelectPacketDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelBuyPassPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelBuyPassPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDeedToGroupPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDeedToGroupPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReclaimPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReclaimPacketDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelClaimPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelClaimPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            is_group_owned: false,
            final_: false,
        }
    }
    fn generated_length(&self) -> i32 {
        18_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.is_group_owned = reader.read_u8()? != 0;
        self.final_ = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.is_group_owned))?;
        writer.write_u8(u8::from(self.final_))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "IsGroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_group_owned),
        )?;
        map.add_with_string_osd(
            "Final".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.final_),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsGroupOwned") {
            self.is_group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("Final") {
            self.final_ = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelClaimPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            west: 0.0_f32,
            south: 0.0_f32,
            east: 0.0_f32,
            north: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.west = reader.read_f32_le()?;
        self.south = reader.read_f32_le()?;
        self.east = reader.read_f32_le()?;
        self.north = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.west)?;
        writer.write_f32_le(self.south)?;
        writer.write_f32_le(self.east)?;
        writer.write_f32_le(self.north)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "West".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.west)),
        )?;
        map.add_with_string_osd(
            "South".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.south)),
        )?;
        map.add_with_string_osd(
            "East".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.east)),
        )?;
        map.add_with_string_osd(
            "North".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.north)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("West") {
            self.west = value.as_real()? as f32;
        }
        if let Some(value) = map.get("South") {
            self.south = value.as_real()? as f32;
        }
        if let Some(value) = map.get("East") {
            self.east = value.as_real()? as f32;
        }
        if let Some(value) = map.get("North") {
            self.north = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelJoinPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelJoinPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            west: 0.0_f32,
            south: 0.0_f32,
            east: 0.0_f32,
            north: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.west = reader.read_f32_le()?;
        self.south = reader.read_f32_le()?;
        self.east = reader.read_f32_le()?;
        self.north = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.west)?;
        writer.write_f32_le(self.south)?;
        writer.write_f32_le(self.east)?;
        writer.write_f32_le(self.north)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "West".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.west)),
        )?;
        map.add_with_string_osd(
            "South".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.south)),
        )?;
        map.add_with_string_osd(
            "East".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.east)),
        )?;
        map.add_with_string_osd(
            "North".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.north)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("West") {
            self.west = value.as_real()? as f32;
        }
        if let Some(value) = map.get("South") {
            self.south = value.as_real()? as f32;
        }
        if let Some(value) = map.get("East") {
            self.east = value.as_real()? as f32;
        }
        if let Some(value) = map.get("North") {
            self.north = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDividePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDividePacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            west: 0.0_f32,
            south: 0.0_f32,
            east: 0.0_f32,
            north: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.west = reader.read_f32_le()?;
        self.south = reader.read_f32_le()?;
        self.east = reader.read_f32_le()?;
        self.north = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f32_le(self.west)?;
        writer.write_f32_le(self.south)?;
        writer.write_f32_le(self.east)?;
        writer.write_f32_le(self.north)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "West".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.west)),
        )?;
        map.add_with_string_osd(
            "South".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.south)),
        )?;
        map.add_with_string_osd(
            "East".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.east)),
        )?;
        map.add_with_string_osd(
            "North".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.north)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("West") {
            self.west = value.as_real()? as f32;
        }
        if let Some(value) = map.get("South") {
            self.south = value.as_real()? as f32;
        }
        if let Some(value) = map.get("East") {
            self.east = value.as_real()? as f32;
        }
        if let Some(value) = map.get("North") {
            self.north = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReleasePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelReleasePacketDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelBuyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelBuyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            is_group_owned: false,
            remove_contribution: false,
            local_id: 0,
            final_: false,
        }
    }
    fn generated_length(&self) -> i32 {
        23_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.is_group_owned = reader.read_u8()? != 0;
        self.remove_contribution = reader.read_u8()? != 0;
        self.local_id = reader.read_i32_le()?;
        self.final_ = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.is_group_owned))?;
        writer.write_u8(u8::from(self.remove_contribution))?;
        writer.write_i32_le(self.local_id)?;
        writer.write_u8(u8::from(self.final_))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "IsGroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_group_owned),
        )?;
        map.add_with_string_osd(
            "RemoveContribution".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.remove_contribution),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "Final".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.final_),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsGroupOwned") {
            self.is_group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("RemoveContribution") {
            self.remove_contribution = value.as_boolean()?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Final") {
            self.final_ = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelBuyPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self { price: 0, area: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.price = reader.read_i32_le()?;
        self.area = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.price)?;
        writer.write_i32_le(self.area)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Price".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.price),
        )?;
        map.add_with_string_osd(
            "Area".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.area),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Price") {
            self.price = value.as_integer()?;
        }
        if let Some(value) = map.get("Area") {
            self.area = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelGodForceOwnerPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelGodForceOwnerPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
            local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            sequence_id: 0,
            flags: 0,
            local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sequence_id = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.sequence_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            sequence_id: 0,
            flags: 0,
            local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        28_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.sequence_id = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_i32_le(self.sequence_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListReplyPacketListBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            time: 0,
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.time = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_i32_le(self.time)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.time),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Time") {
            self.time = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListUpdatePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            flags: 0,
            local_id: 0,
            transaction_id: libremetaverse_types::UUID::zero(),
            sequence_id: 0,
            sections: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        self.local_id = reader.read_i32_le()?;
        self.transaction_id = reader.read_uuid()?;
        self.sequence_id = reader.read_i32_le()?;
        self.sections = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        writer.write_i32_le(self.local_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i32_le(self.sequence_id)?;
        writer.write_i32_le(self.sections)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "Sections".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sections),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("Sections") {
            self.sections = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAccessListUpdatePacketListBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            time: 0,
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.time = reader.read_i32_le()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_i32_le(self.time)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.time),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Time") {
            self.time = value.as_integer()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDwellRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDwellRequestPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            parcel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.parcel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_uuid(&self.parcel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDwellReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelDwellReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            parcel_id: libremetaverse_types::UUID::zero(),
            dwell: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.parcel_id = reader.read_uuid()?;
        self.dwell = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_uuid(&self.parcel_id)?;
        writer.write_f32_le(self.dwell)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "Dwell".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.dwell)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Dwell") {
            self.dwell = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestParcelTransferPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            transaction_time: 0,
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            transaction_type: 0,
            amount: 0,
            billable_area: 0,
            actual_area: 0,
            final_: false,
        }
    }
    fn generated_length(&self) -> i32 {
        86_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.transaction_time = reader.read_u32_le()?;
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.flags = reader.read_u8()?;
        self.transaction_type = reader.read_i32_le()?;
        self.amount = reader.read_i32_le()?;
        self.billable_area = reader.read_i32_le()?;
        self.actual_area = reader.read_i32_le()?;
        self.final_ = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.transaction_time)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(self.flags)?;
        writer.write_i32_le(self.transaction_type)?;
        writer.write_i32_le(self.amount)?;
        writer.write_i32_le(self.billable_area)?;
        writer.write_i32_le(self.actual_area)?;
        writer.write_u8(u8::from(self.final_))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TransactionTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.transaction_time.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "BillableArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.billable_area),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        map.add_with_string_osd(
            "Final".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.final_),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionTime") {
            self.transaction_time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("BillableArea") {
            self.billable_area = value.as_integer()?;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        if let Some(value) = map.get("Final") {
            self.final_ = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestParcelTransferPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            grid_x: 0,
            grid_y: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateParcelPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            region_handle: 0,
            owner_id: libremetaverse_types::UUID::zero(),
            group_owned: false,
            status: 0,
            name: Vec::new(),
            description: Vec::new(),
            music_url: Vec::new(),
            region_x: 0.0_f32,
            region_y: 0.0_f32,
            actual_area: 0,
            billable_area: 0,
            show_dir: false,
            is_for_sale: false,
            category: 0,
            snapshot_id: libremetaverse_types::UUID::zero(),
            user_location: libremetaverse_types::Vector3::zero(),
            sale_price: 0,
            authorized_buyer_id: libremetaverse_types::UUID::zero(),
            allow_publish: false,
            mature_publish: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 111_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.music_url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.region_handle = reader.read_u64_le()?;
        self.owner_id = reader.read_uuid()?;
        self.group_owned = reader.read_u8()? != 0;
        self.status = reader.read_u8()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.music_url = reader.read_variable(1)?;
        self.region_x = reader.read_f32_le()?;
        self.region_y = reader.read_f32_le()?;
        self.actual_area = reader.read_i32_le()?;
        self.billable_area = reader.read_i32_le()?;
        self.show_dir = reader.read_u8()? != 0;
        self.is_for_sale = reader.read_u8()? != 0;
        self.category = reader.read_u8()?;
        self.snapshot_id = reader.read_uuid()?;
        self.user_location = reader.read_vector3()?;
        self.sale_price = reader.read_i32_le()?;
        self.authorized_buyer_id = reader.read_uuid()?;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_u8(self.status)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_variable(&self.music_url, 1)?;
        writer.write_f32_le(self.region_x)?;
        writer.write_f32_le(self.region_y)?;
        writer.write_i32_le(self.actual_area)?;
        writer.write_i32_le(self.billable_area)?;
        writer.write_u8(u8::from(self.show_dir))?;
        writer.write_u8(u8::from(self.is_for_sale))?;
        writer.write_u8(self.category)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_vector3(&self.user_location)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_uuid(&self.authorized_buyer_id)?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.status)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "MusicURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.music_url.clone()),
        )?;
        map.add_with_string_osd(
            "RegionX".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.region_x)),
        )?;
        map.add_with_string_osd(
            "RegionY".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.region_y)),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        map.add_with_string_osd(
            "BillableArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.billable_area),
        )?;
        map.add_with_string_osd(
            "ShowDir".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.show_dir),
        )?;
        map.add_with_string_osd(
            "IsForSale".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_for_sale),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "UserLocation".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.user_location)?,
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "AuthorizedBuyerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.authorized_buyer_id),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("MusicURL") {
            self.music_url = value.as_binary()?;
        }
        if let Some(value) = map.get("RegionX") {
            self.region_x = value.as_real()? as f32;
        }
        if let Some(value) = map.get("RegionY") {
            self.region_y = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        if let Some(value) = map.get("BillableArea") {
            self.billable_area = value.as_integer()?;
        }
        if let Some(value) = map.get("ShowDir") {
            self.show_dir = value.as_boolean()?;
        }
        if let Some(value) = map.get("IsForSale") {
            self.is_for_sale = value.as_boolean()?;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("UserLocation") {
            self.user_location = value.as_vector3()?;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("AuthorizedBuyerID") {
            self.authorized_buyer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveParcelPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MergeParcelPacketMasterParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            master_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.master_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.master_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MasterID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.master_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MasterID") {
            self.master_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MergeParcelPacketSlaveParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            slave_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.slave_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.slave_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SlaveID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.slave_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SlaveID") {
            self.slave_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogParcelChangesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogParcelChangesPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogParcelChangesPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            is_owner_group: false,
            actual_area: 0,
            action: 0,
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        54_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.is_owner_group = reader.read_u8()? != 0;
        self.actual_area = reader.read_i32_le()?;
        self.action = reader.read_i8()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(u8::from(self.is_owner_group))?;
        writer.write_i32_le(self.actual_area)?;
        writer.write_i8(self.action)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "IsOwnerGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_owner_group),
        )?;
        map.add_with_string_osd(
            "ActualArea".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.actual_area),
        )?;
        map.add_with_string_osd(
            "Action".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.action)),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsOwnerGroup") {
            self.is_owner_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("ActualArea") {
            self.actual_area = value.as_integer()?;
        }
        if let Some(value) = map.get("Action") {
            self.action = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CheckParcelSalesPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelSalesPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            buyer_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.buyer_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_uuid(&self.buyer_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "BuyerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.buyer_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BuyerID") {
            self.buyer_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelGodMarkAsContentPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelGodMarkAsContentPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStartAuctionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerStartAuctionPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            snapshot_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_i32_le()?;
        self.snapshot_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.local_id)?;
        writer.write_uuid(&self.snapshot_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartAuctionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartAuctionPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.snapshot_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ConfirmAuctionStartPacketAuctionDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            auction_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.auction_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_u32_le(self.auction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "AuctionID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.auction_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AuctionID") {
            self.auction_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CompleteAuctionPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CancelAuctionPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CheckParcelAuctionsPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self { region_handle: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelAuctionsPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            winner_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.winner_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_uuid(&self.winner_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "WinnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.winner_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("WinnerID") {
            self.winner_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UUIDNameRequestPacketUUIDNameBlockBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UUIDNameReplyPacketUUIDNameBlockBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            first_name: Vec::new(),
            last_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.first_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.first_name = reader.read_variable(1)?;
        self.last_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_variable(&self.first_name, 1)?;
        writer.write_variable(&self.last_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "FirstName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.first_name.clone()),
        )?;
        map.add_with_string_osd(
            "LastName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FirstName") {
            self.first_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LastName") {
            self.last_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UUIDGroupNameRequestPacketUUIDNameBlockBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UUIDGroupNameReplyPacketUUIDNameBlockBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            group_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.group_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_variable(&self.group_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "GroupName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupName") {
            self.group_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChatPassPacketChatDataBlock {
    fn new_generated() -> Self {
        Self {
            channel: 0,
            position: libremetaverse_types::Vector3::zero(),
            id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            source_type: 0,
            type_: 0,
            radius: 0.0_f32,
            sim_access: 0,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 55_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.channel = reader.read_i32_le()?;
        self.position = reader.read_vector3()?;
        self.id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.source_type = reader.read_u8()?;
        self.type_ = reader.read_u8()?;
        self.radius = reader.read_f32_le()?;
        self.sim_access = reader.read_u8()?;
        self.message = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.channel)?;
        writer.write_vector3(&self.position)?;
        writer.write_uuid(&self.id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(self.source_type)?;
        writer.write_u8(self.type_)?;
        writer.write_f32_le(self.radius)?;
        writer.write_u8(self.sim_access)?;
        writer.write_variable(&self.message, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Channel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "SourceType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.source_type)),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Radius".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.radius)),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Channel") {
            self.channel = value.as_integer()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("SourceType") {
            self.source_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Radius") {
            self.radius = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentDyingPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUnknownPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::KillChildAgentsPacketIDBlockBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GetScriptRunningPacketScriptBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptRunningReplyPacketScriptBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            running: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.running = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_u8(u8::from(self.running))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "Running".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.running),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Running") {
            self.running = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetScriptRunningPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetScriptRunningPacketScriptBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            running: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.running = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_u8(u8::from(self.running))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "Running".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.running),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Running") {
            self.running = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptResetPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptResetPacketScriptBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptSensorRequestPacketRequesterBlock {
    fn new_generated() -> Self {
        Self {
            source_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
            search_id: libremetaverse_types::UUID::zero(),
            search_pos: libremetaverse_types::Vector3::zero(),
            search_dir: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            search_name: Vec::new(),
            type_: 0,
            range: 0.0_f32,
            arc: 0.0_f32,
            region_handle: 0,
            search_regions: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 93_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.search_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.source_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        self.search_id = reader.read_uuid()?;
        self.search_pos = reader.read_vector3()?;
        self.search_dir = reader.read_quaternion()?;
        self.search_name = reader.read_variable(1)?;
        self.type_ = reader.read_i32_le()?;
        self.range = reader.read_f32_le()?;
        self.arc = reader.read_f32_le()?;
        self.region_handle = reader.read_u64_le()?;
        self.search_regions = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.request_id)?;
        writer.write_uuid(&self.search_id)?;
        writer.write_vector3(&self.search_pos)?;
        writer.write_quaternion(&self.search_dir)?;
        writer.write_variable(&self.search_name, 1)?;
        writer.write_i32_le(self.type_)?;
        writer.write_f32_le(self.range)?;
        writer.write_f32_le(self.arc)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_u8(self.search_regions)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "SearchID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.search_id),
        )?;
        map.add_with_string_osd(
            "SearchPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.search_pos)?,
        )?;
        map.add_with_string_osd(
            "SearchDir".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.search_dir)?,
        )?;
        map.add_with_string_osd(
            "SearchName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.search_name.clone()),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.type_),
        )?;
        map.add_with_string_osd(
            "Range".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.range)),
        )?;
        map.add_with_string_osd(
            "Arc".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.arc)),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SearchRegions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.search_regions)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SearchID") {
            self.search_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SearchPos") {
            self.search_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("SearchDir") {
            self.search_dir = value.as_quaternion()?;
        }
        if let Some(value) = map.get("SearchName") {
            self.search_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()?;
        }
        if let Some(value) = map.get("Range") {
            self.range = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Arc") {
            self.arc = value.as_real()? as f32;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("SearchRegions") {
            self.search_regions = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptSensorReplyPacketRequesterBlock {
    fn new_generated() -> Self {
        Self {
            source_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.source_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.source_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptSensorReplyPacketSensedDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            position: libremetaverse_types::Vector3::zero(),
            velocity: libremetaverse_types::Vector3::zero(),
            rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            name: Vec::new(),
            type_: 0,
            range: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 92_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.position = reader.read_vector3()?;
        self.velocity = reader.read_vector3()?;
        self.rotation = reader.read_quaternion()?;
        self.name = reader.read_variable(1)?;
        self.type_ = reader.read_i32_le()?;
        self.range = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.velocity)?;
        writer.write_quaternion(&self.rotation)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_i32_le(self.type_)?;
        writer.write_f32_le(self.range)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Velocity".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.velocity)?,
        )?;
        map.add_with_string_osd(
            "Rotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.rotation)?,
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.type_),
        )?;
        map.add_with_string_osd(
            "Range".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.range)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Velocity") {
            self.velocity = value.as_vector3()?;
        }
        if let Some(value) = map.get("Rotation") {
            self.rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()?;
        }
        if let Some(value) = map.get("Range") {
            self.range = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CompleteAgentMovementPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            circuit_code: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.circuit_code = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.circuit_code)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CircuitCode") {
            self.circuit_code = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentMovementCompletePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentMovementCompletePacketDataBlock {
    fn new_generated() -> Self {
        Self {
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
            region_handle: 0,
            timestamp: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        self.region_handle = reader.read_u64_le()?;
        self.timestamp = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_u32_le(self.timestamp)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Timestamp".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.timestamp.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Timestamp") {
            self.timestamp = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentMovementCompletePacketSimDataBlock {
    fn new_generated() -> Self {
        Self {
            channel_version: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.channel_version.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.channel_version = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.channel_version, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ChannelVersion".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.channel_version.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ChannelVersion") {
            self.channel_version = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DataServerLogoutPacketUserDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            viewer_ip: 0,
            disconnect: false,
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        37_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.viewer_ip = reader.read_u32_le()?;
        self.disconnect = reader.read_u8()? != 0;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.viewer_ip)?;
        writer.write_u8(u8::from(self.disconnect))?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "ViewerIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.viewer_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Disconnect".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.disconnect),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ViewerIP") {
            self.viewer_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Disconnect") {
            self.disconnect = value.as_boolean()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogoutRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogoutReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogoutReplyPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedInstantMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedInstantMessagePacketMessageBlockBlock {
    fn new_generated() -> Self {
        Self {
            from_group: false,
            to_agent_id: libremetaverse_types::UUID::zero(),
            parent_estate_id: 0,
            region_id: libremetaverse_types::UUID::zero(),
            position: libremetaverse_types::Vector3::zero(),
            offline: 0,
            dialog: 0,
            id: libremetaverse_types::UUID::zero(),
            timestamp: 0,
            from_agent_name: Vec::new(),
            message: Vec::new(),
            binary_bucket: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 71_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.from_agent_name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.binary_bucket.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_group = reader.read_u8()? != 0;
        self.to_agent_id = reader.read_uuid()?;
        self.parent_estate_id = reader.read_u32_le()?;
        self.region_id = reader.read_uuid()?;
        self.position = reader.read_vector3()?;
        self.offline = reader.read_u8()?;
        self.dialog = reader.read_u8()?;
        self.id = reader.read_uuid()?;
        self.timestamp = reader.read_u32_le()?;
        self.from_agent_name = reader.read_variable(1)?;
        self.message = reader.read_variable(2)?;
        self.binary_bucket = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.from_group))?;
        writer.write_uuid(&self.to_agent_id)?;
        writer.write_u32_le(self.parent_estate_id)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_vector3(&self.position)?;
        writer.write_u8(self.offline)?;
        writer.write_u8(self.dialog)?;
        writer.write_uuid(&self.id)?;
        writer.write_u32_le(self.timestamp)?;
        writer.write_variable(&self.from_agent_name, 1)?;
        writer.write_variable(&self.message, 2)?;
        writer.write_variable(&self.binary_bucket, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FromGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.from_group),
        )?;
        map.add_with_string_osd(
            "ToAgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.to_agent_id),
        )?;
        map.add_with_string_osd(
            "ParentEstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Offline".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.offline)),
        )?;
        map.add_with_string_osd(
            "Dialog".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.dialog)),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Timestamp".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.timestamp.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FromAgentName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_agent_name.clone()),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "BinaryBucket".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.binary_bucket.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FromGroup") {
            self.from_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("ToAgentID") {
            self.to_agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentEstateID") {
            self.parent_estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Offline") {
            self.offline = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Dialog") {
            self.dialog = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Timestamp") {
            self.timestamp = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FromAgentName") {
            self.from_agent_name = value.as_binary()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("BinaryBucket") {
            self.binary_bucket = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedInstantMessagePacketEstateBlockBlock {
    fn new_generated() -> Self {
        Self { estate_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.estate_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.estate_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedInstantMessagePacketMetaDataBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RetrieveInstantMessagesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FindAgentPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            hunter: libremetaverse_types::UUID::zero(),
            prey: libremetaverse_types::UUID::zero(),
            space_ip: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.hunter = reader.read_uuid()?;
        self.prey = reader.read_uuid()?;
        self.space_ip = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.hunter)?;
        writer.write_uuid(&self.prey)?;
        writer.write_u32_le(self.space_ip)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Hunter".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.hunter),
        )?;
        map.add_with_string_osd(
            "Prey".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.prey),
        )?;
        map.add_with_string_osd(
            "SpaceIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.space_ip.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Hunter") {
            self.hunter = value.as_uuid()?;
        }
        if let Some(value) = map.get("Prey") {
            self.prey = value.as_uuid()?;
        }
        if let Some(value) = map.get("SpaceIP") {
            self.space_ip = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FindAgentPacketLocationBlockBlock {
    fn new_generated() -> Self {
        Self {
            global_x: 0.0_f64,
            global_y: 0.0_f64,
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.global_x = reader.read_f64_le()?;
        self.global_y = reader.read_f64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_f64_le(self.global_x)?;
        writer.write_f64_le(self.global_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GlobalX".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.global_x),
        )?;
        map.add_with_string_osd(
            "GlobalY".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.global_y),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GlobalX") {
            self.global_x = value.as_real()?;
        }
        if let Some(value) = map.get("GlobalY") {
            self.global_y = value.as_real()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestGodlikePowersPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestGodlikePowersPacketRequestBlockBlock {
    fn new_generated() -> Self {
        Self {
            godlike: false,
            token: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.godlike = reader.read_u8()? != 0;
        self.token = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.godlike))?;
        writer.write_uuid(&self.token)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        map.add_with_string_osd(
            "Token".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.token),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        if let Some(value) = map.get("Token") {
            self.token = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GrantGodlikePowersPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GrantGodlikePowersPacketGrantDataBlock {
    fn new_generated() -> Self {
        Self {
            god_level: 0,
            token: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.god_level = reader.read_u8()?;
        self.token = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.god_level)?;
        writer.write_uuid(&self.token)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GodLevel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.god_level)),
        )?;
        map.add_with_string_osd(
            "Token".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.token),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GodLevel") {
            self.god_level = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Token") {
            self.token = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodlikeMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodlikeMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self {
            method: Vec::new(),
            invoice: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.method.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_variable(1)?;
        self.invoice = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.method, 1)?;
        writer.write_uuid(&self.invoice)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.method.clone()),
        )?;
        map.add_with_string_osd(
            "Invoice".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invoice),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_binary()?;
        }
        if let Some(value) = map.get("Invoice") {
            self.invoice = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GodlikeMessagePacketParamListBlock {
    fn new_generated() -> Self {
        Self { parameter: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.parameter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parameter = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.parameter, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Parameter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parameter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Parameter") {
            self.parameter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EstateOwnerMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EstateOwnerMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self {
            method: Vec::new(),
            invoice: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.method.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_variable(1)?;
        self.invoice = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.method, 1)?;
        writer.write_uuid(&self.invoice)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.method.clone()),
        )?;
        map.add_with_string_osd(
            "Invoice".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invoice),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_binary()?;
        }
        if let Some(value) = map.get("Invoice") {
            self.invoice = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EstateOwnerMessagePacketParamListBlock {
    fn new_generated() -> Self {
        Self { parameter: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.parameter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parameter = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.parameter, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Parameter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parameter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Parameter") {
            self.parameter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GenericMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GenericMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self {
            method: Vec::new(),
            invoice: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.method.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_variable(1)?;
        self.invoice = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.method, 1)?;
        writer.write_uuid(&self.invoice)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.method.clone()),
        )?;
        map.add_with_string_osd(
            "Invoice".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invoice),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_binary()?;
        }
        if let Some(value) = map.get("Invoice") {
            self.invoice = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GenericMessagePacketParamListBlock {
    fn new_generated() -> Self {
        Self { parameter: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.parameter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parameter = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.parameter, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Parameter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parameter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Parameter") {
            self.parameter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LargeGenericMessagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LargeGenericMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self {
            method: Vec::new(),
            invoice: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.method.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_variable(1)?;
        self.invoice = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.method, 1)?;
        writer.write_uuid(&self.invoice)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.method.clone()),
        )?;
        map.add_with_string_osd(
            "Invoice".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invoice),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_binary()?;
        }
        if let Some(value) = map.get("Invoice") {
            self.invoice = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LargeGenericMessagePacketParamListBlock {
    fn new_generated() -> Self {
        Self { parameter: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.parameter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parameter = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.parameter, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Parameter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parameter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Parameter") {
            self.parameter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MuteListRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MuteListRequestPacketMuteDataBlock {
    fn new_generated() -> Self {
        Self { mute_crc: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.mute_crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.mute_crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MuteCRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.mute_crc.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MuteCRC") {
            self.mute_crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateMuteListEntryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateMuteListEntryPacketMuteDataBlock {
    fn new_generated() -> Self {
        Self {
            mute_id: libremetaverse_types::UUID::zero(),
            mute_name: Vec::new(),
            mute_type: 0,
            mute_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.mute_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.mute_id = reader.read_uuid()?;
        self.mute_name = reader.read_variable(1)?;
        self.mute_type = reader.read_i32_le()?;
        self.mute_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.mute_id)?;
        writer.write_variable(&self.mute_name, 1)?;
        writer.write_i32_le(self.mute_type)?;
        writer.write_u32_le(self.mute_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MuteID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.mute_id),
        )?;
        map.add_with_string_osd(
            "MuteName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.mute_name.clone()),
        )?;
        map.add_with_string_osd(
            "MuteType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.mute_type),
        )?;
        map.add_with_string_osd(
            "MuteFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.mute_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MuteID") {
            self.mute_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MuteName") {
            self.mute_name = value.as_binary()?;
        }
        if let Some(value) = map.get("MuteType") {
            self.mute_type = value.as_integer()?;
        }
        if let Some(value) = map.get("MuteFlags") {
            self.mute_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveMuteListEntryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveMuteListEntryPacketMuteDataBlock {
    fn new_generated() -> Self {
        Self {
            mute_id: libremetaverse_types::UUID::zero(),
            mute_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.mute_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.mute_id = reader.read_uuid()?;
        self.mute_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.mute_id)?;
        writer.write_variable(&self.mute_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MuteID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.mute_id),
        )?;
        map.add_with_string_osd(
            "MuteName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.mute_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MuteID") {
            self.mute_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MuteName") {
            self.mute_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CopyInventoryFromNotecardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::CopyInventoryFromNotecardPacketNotecardDataBlock {
    fn new_generated() -> Self {
        Self {
            notecard_item_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.notecard_item_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.notecard_item_id)?;
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NotecardItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.notecard_item_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NotecardItemID") {
            self.notecard_item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::CopyInventoryFromNotecardPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateInventoryItemPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            callback_id: 0,
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 140_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.callback_id = reader.read_u32_le()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateCreateInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            sim_approved: false,
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.sim_approved = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u8(u8::from(self.sim_approved))?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SimApproved".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.sim_approved),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SimApproved") {
            self.sim_approved = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::UpdateCreateInventoryItemPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            callback_id: 0,
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            asset_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 140_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.callback_id = reader.read_u32_le()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.asset_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            stamp: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.stamp = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(u8::from(self.stamp))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Stamp".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.stamp),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Stamp") {
            self.stamp = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveInventoryItemPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            new_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.new_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.new_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_variable(&self.new_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "NewName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.new_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NewName") {
            self.new_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CopyInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CopyInventoryItemPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            callback_id: 0,
            old_agent_id: libremetaverse_types::UUID::zero(),
            old_item_id: libremetaverse_types::UUID::zero(),
            new_folder_id: libremetaverse_types::UUID::zero(),
            new_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.new_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.callback_id = reader.read_u32_le()?;
        self.old_agent_id = reader.read_uuid()?;
        self.old_item_id = reader.read_uuid()?;
        self.new_folder_id = reader.read_uuid()?;
        self.new_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.old_agent_id)?;
        writer.write_uuid(&self.old_item_id)?;
        writer.write_uuid(&self.new_folder_id)?;
        writer.write_variable(&self.new_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OldAgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.old_agent_id),
        )?;
        map.add_with_string_osd(
            "OldItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.old_item_id),
        )?;
        map.add_with_string_osd(
            "NewFolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.new_folder_id),
        )?;
        map.add_with_string_osd(
            "NewName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.new_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OldAgentID") {
            self.old_agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OldItemID") {
            self.old_item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NewFolderID") {
            self.new_folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NewName") {
            self.new_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryItemPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChangeInventoryItemFlagsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::ChangeInventoryItemFlagsPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SaveAssetIntoInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SaveAssetIntoInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            new_asset_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.new_asset_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.new_asset_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "NewAssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.new_asset_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NewAssetID") {
            self.new_asset_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateInventoryFolderPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateInventoryFolderPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.parent_id)?;
        writer.write_i8(self.type_)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateInventoryFolderPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateInventoryFolderPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.parent_id)?;
        writer.write_i8(self.type_)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveInventoryFolderPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            stamp: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.stamp = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(u8::from(self.stamp))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Stamp".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.stamp),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Stamp") {
            self.stamp = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveInventoryFolderPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.parent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryFolderPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryFolderPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FetchInventoryDescendentsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::FetchInventoryDescendentsPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            sort_order: 0,
            fetch_folders: false,
            fetch_items: false,
        }
    }
    fn generated_length(&self) -> i32 {
        38_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.sort_order = reader.read_i32_le()?;
        self.fetch_folders = reader.read_u8()? != 0;
        self.fetch_items = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_i32_le(self.sort_order)?;
        writer.write_u8(u8::from(self.fetch_folders))?;
        writer.write_u8(u8::from(self.fetch_items))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "SortOrder".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sort_order),
        )?;
        map.add_with_string_osd(
            "FetchFolders".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.fetch_folders),
        )?;
        map.add_with_string_osd(
            "FetchItems".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.fetch_items),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SortOrder") {
            self.sort_order = value.as_integer()?;
        }
        if let Some(value) = map.get("FetchFolders") {
            self.fetch_folders = value.as_boolean()?;
        }
        if let Some(value) = map.get("FetchItems") {
            self.fetch_items = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InventoryDescendentsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            version: 0,
            descendents: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        56_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.version = reader.read_i32_le()?;
        self.descendents = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_i32_le(self.version)?;
        writer.write_i32_le(self.descendents)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Version".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.version),
        )?;
        map.add_with_string_osd(
            "Descendents".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.descendents),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Version") {
            self.version = value.as_integer()?;
        }
        if let Some(value) = map.get("Descendents") {
            self.descendents = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InventoryDescendentsPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.parent_id)?;
        writer.write_i8(self.type_)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InventoryDescendentsPacketItemDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            asset_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.asset_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FetchInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FetchInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            owner_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.owner_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FetchInventoryReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FetchInventoryReplyPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            asset_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.asset_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::BulkUpdateInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::BulkUpdateInventoryPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 33_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.parent_id)?;
        writer.write_i8(self.type_)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::BulkUpdateInventoryPacketItemDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            callback_id: 0,
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            asset_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 140_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.callback_id = reader.read_u32_le()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.asset_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestInventoryAssetPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            agent_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.agent_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InventoryAssetResponsePacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
            asset_id: libremetaverse_types::UUID::zero(),
            is_readable: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        self.asset_id = reader.read_uuid()?;
        self.is_readable = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_u8(u8::from(self.is_readable))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "IsReadable".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_readable),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsReadable") {
            self.is_readable = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryObjectsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryObjectsPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveInventoryObjectsPacketItemDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PurgeInventoryDescendentsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::PurgeInventoryDescendentsPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateTaskInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateTaskInventoryPacketUpdateDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0, key: 0 }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.key = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_u8(self.key)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Key".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.key)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Key") {
            self.key = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateTaskInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveTaskInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveTaskInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveTaskInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoveTaskInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            local_id: 0,
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestTaskInventoryPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestTaskInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self { local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LocalID") {
            self.local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ReplyTaskInventoryPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            serial: 0,
            filename: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 18_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.filename.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.serial = reader.read_i16_le()?;
        self.filename = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_i16_le(self.serial)?;
        writer.write_variable(&self.filename, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "Serial".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.serial)),
        )?;
        map.add_with_string_osd(
            "Filename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.filename.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Serial") {
            self.serial = value.as_integer()? as i16;
        }
        if let Some(value) = map.get("Filename") {
            self.filename = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeRezObjectPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeRezObjectPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            destination: 0,
            destination_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
            packet_count: 0,
            packet_number: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        51_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.destination = reader.read_u8()?;
        self.destination_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        self.packet_count = reader.read_u8()?;
        self.packet_number = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(self.destination)?;
        writer.write_uuid(&self.destination_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u8(self.packet_count)?;
        writer.write_u8(self.packet_number)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Destination".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.destination)),
        )?;
        map.add_with_string_osd(
            "DestinationID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.destination_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "PacketCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.packet_count)),
        )?;
        map.add_with_string_osd(
            "PacketNumber".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.packet_number)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Destination") {
            self.destination = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("DestinationID") {
            self.destination_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PacketCount") {
            self.packet_count = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PacketNumber") {
            self.packet_number = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeRezObjectPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { object_local_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeRezAckPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            success: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.success = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u8(u8::from(self.success))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectPacketRezDataBlock {
    fn new_generated() -> Self {
        Self {
            from_task_id: libremetaverse_types::UUID::zero(),
            bypass_raycast: 0,
            ray_start: libremetaverse_types::Vector3::zero(),
            ray_end: libremetaverse_types::Vector3::zero(),
            ray_target_id: libremetaverse_types::UUID::zero(),
            ray_end_is_intersection: false,
            rez_selected: false,
            remove_item: false,
            item_flags: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        76_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_task_id = reader.read_uuid()?;
        self.bypass_raycast = reader.read_u8()?;
        self.ray_start = reader.read_vector3()?;
        self.ray_end = reader.read_vector3()?;
        self.ray_target_id = reader.read_uuid()?;
        self.ray_end_is_intersection = reader.read_u8()? != 0;
        self.rez_selected = reader.read_u8()? != 0;
        self.remove_item = reader.read_u8()? != 0;
        self.item_flags = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.from_task_id)?;
        writer.write_u8(self.bypass_raycast)?;
        writer.write_vector3(&self.ray_start)?;
        writer.write_vector3(&self.ray_end)?;
        writer.write_uuid(&self.ray_target_id)?;
        writer.write_u8(u8::from(self.ray_end_is_intersection))?;
        writer.write_u8(u8::from(self.rez_selected))?;
        writer.write_u8(u8::from(self.remove_item))?;
        writer.write_u32_le(self.item_flags)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FromTaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.from_task_id),
        )?;
        map.add_with_string_osd(
            "BypassRaycast".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.bypass_raycast)),
        )?;
        map.add_with_string_osd(
            "RayStart".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_start)?,
        )?;
        map.add_with_string_osd(
            "RayEnd".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_end)?,
        )?;
        map.add_with_string_osd(
            "RayTargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.ray_target_id),
        )?;
        map.add_with_string_osd(
            "RayEndIsIntersection".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.ray_end_is_intersection),
        )?;
        map.add_with_string_osd(
            "RezSelected".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.rez_selected),
        )?;
        map.add_with_string_osd(
            "RemoveItem".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.remove_item),
        )?;
        map.add_with_string_osd(
            "ItemFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FromTaskID") {
            self.from_task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BypassRaycast") {
            self.bypass_raycast = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RayStart") {
            self.ray_start = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayEnd") {
            self.ray_end = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayTargetID") {
            self.ray_target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RayEndIsIntersection") {
            self.ray_end_is_intersection = value.as_boolean()?;
        }
        if let Some(value) = map.get("RezSelected") {
            self.rez_selected = value.as_boolean()?;
        }
        if let Some(value) = map.get("RemoveItem") {
            self.remove_item = value.as_boolean()?;
        }
        if let Some(value) = map.get("ItemFlags") {
            self.item_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectFromNotecardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectFromNotecardPacketRezDataBlock {
    fn new_generated() -> Self {
        Self {
            from_task_id: libremetaverse_types::UUID::zero(),
            bypass_raycast: 0,
            ray_start: libremetaverse_types::Vector3::zero(),
            ray_end: libremetaverse_types::Vector3::zero(),
            ray_target_id: libremetaverse_types::UUID::zero(),
            ray_end_is_intersection: false,
            rez_selected: false,
            remove_item: false,
            item_flags: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        76_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_task_id = reader.read_uuid()?;
        self.bypass_raycast = reader.read_u8()?;
        self.ray_start = reader.read_vector3()?;
        self.ray_end = reader.read_vector3()?;
        self.ray_target_id = reader.read_uuid()?;
        self.ray_end_is_intersection = reader.read_u8()? != 0;
        self.rez_selected = reader.read_u8()? != 0;
        self.remove_item = reader.read_u8()? != 0;
        self.item_flags = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.from_task_id)?;
        writer.write_u8(self.bypass_raycast)?;
        writer.write_vector3(&self.ray_start)?;
        writer.write_vector3(&self.ray_end)?;
        writer.write_uuid(&self.ray_target_id)?;
        writer.write_u8(u8::from(self.ray_end_is_intersection))?;
        writer.write_u8(u8::from(self.rez_selected))?;
        writer.write_u8(u8::from(self.remove_item))?;
        writer.write_u32_le(self.item_flags)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FromTaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.from_task_id),
        )?;
        map.add_with_string_osd(
            "BypassRaycast".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.bypass_raycast)),
        )?;
        map.add_with_string_osd(
            "RayStart".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_start)?,
        )?;
        map.add_with_string_osd(
            "RayEnd".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_end)?,
        )?;
        map.add_with_string_osd(
            "RayTargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.ray_target_id),
        )?;
        map.add_with_string_osd(
            "RayEndIsIntersection".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.ray_end_is_intersection),
        )?;
        map.add_with_string_osd(
            "RezSelected".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.rez_selected),
        )?;
        map.add_with_string_osd(
            "RemoveItem".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.remove_item),
        )?;
        map.add_with_string_osd(
            "ItemFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FromTaskID") {
            self.from_task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BypassRaycast") {
            self.bypass_raycast = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RayStart") {
            self.ray_start = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayEnd") {
            self.ray_end = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayTargetID") {
            self.ray_target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RayEndIsIntersection") {
            self.ray_end_is_intersection = value.as_boolean()?;
        }
        if let Some(value) = map.get("RezSelected") {
            self.rez_selected = value.as_boolean()?;
        }
        if let Some(value) = map.get("RemoveItem") {
            self.remove_item = value.as_boolean()?;
        }
        if let Some(value) = map.get("ItemFlags") {
            self.item_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectFromNotecardPacketNotecardDataBlock {
    fn new_generated() -> Self {
        Self {
            notecard_item_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.notecard_item_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.notecard_item_id)?;
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NotecardItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.notecard_item_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NotecardItemID") {
            self.notecard_item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezObjectFromNotecardPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferInventoryPacketInfoBlockBlock {
    fn new_generated() -> Self {
        Self {
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferInventoryPacketInventoryBlockBlock {
    fn new_generated() -> Self {
        Self {
            inventory_id: libremetaverse_types::UUID::zero(),
            type_: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.inventory_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.inventory_id)?;
        writer.write_i8(self.type_)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "InventoryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.inventory_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("InventoryID") {
            self.inventory_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferInventoryPacketValidationBlockBlock {
    fn new_generated() -> Self {
        Self {
            needs_validation: false,
            estate_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.needs_validation = reader.read_u8()? != 0;
        self.estate_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.needs_validation))?;
        writer.write_u32_le(self.estate_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NeedsValidation".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.needs_validation),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NeedsValidation") {
            self.needs_validation = value.as_boolean()?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferInventoryAckPacketInfoBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            inventory_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.inventory_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_uuid(&self.inventory_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "InventoryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.inventory_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("InventoryID") {
            self.inventory_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptFriendshipPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptFriendshipPacketTransactionBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptFriendshipPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeclineFriendshipPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeclineFriendshipPacketTransactionBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::FormFriendshipPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TerminateFriendshipPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TerminateFriendshipPacketExBlockBlock {
    fn new_generated() -> Self {
        Self {
            other_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.other_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.other_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OtherID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.other_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OtherID") {
            self.other_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::OfferCallingCardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::OfferCallingCardPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            dest_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.dest_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.dest_id)?;
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptCallingCardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptCallingCardPacketTransactionBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AcceptCallingCardPacketFolderDataBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeclineCallingCardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeclineCallingCardPacketTransactionBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezScriptPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezScriptPacketUpdateBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            enabled: false,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.enabled = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(u8::from(self.enabled))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Enabled".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.enabled),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Enabled") {
            self.enabled = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezScriptPacketInventoryBlockBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateInventoryItemPacketInventoryBlockBlock {
    fn new_generated() -> Self {
        Self {
            callback_id: 0,
            folder_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
            next_owner_mask: 0,
            type_: 0,
            inv_type: 0,
            wearable_type: 0,
            name: Vec::new(),
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 43_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.callback_id = reader.read_u32_le()?;
        self.folder_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.wearable_type = reader.read_u8()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u8(self.wearable_type)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "WearableType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.wearable_type)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("WearableType") {
            self.wearable_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateLandmarkForEventPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateLandmarkForEventPacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateLandmarkForEventPacketInventoryBlockBlock {
    fn new_generated() -> Self {
        Self {
            folder_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.folder_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.folder_id)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventLocationRequestPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventLocationRequestPacketEventDataBlock {
    fn new_generated() -> Self {
        Self { event_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.event_id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.event_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EventID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.event_id.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EventID") {
            self.event_id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventLocationReplyPacketQueryDataBlock {
    fn new_generated() -> Self {
        Self {
            query_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.query_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.query_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "QueryID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.query_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("QueryID") {
            self.query_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EventLocationReplyPacketEventDataBlock {
    fn new_generated() -> Self {
        Self {
            success: false,
            region_id: libremetaverse_types::UUID::zero(),
            region_pos: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        29_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.success = reader.read_u8()? != 0;
        self.region_id = reader.read_uuid()?;
        self.region_pos = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.success))?;
        writer.write_uuid(&self.region_id)?;
        writer.write_vector3(&self.region_pos)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "RegionPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.region_pos)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionPos") {
            self.region_pos = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionHandleRequestPacketRequestBlockBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RegionIDAndHandleReplyPacketReplyBlockBlock {
    fn new_generated() -> Self {
        Self {
            region_id: libremetaverse_types::UUID::zero(),
            region_handle: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_id = reader.read_uuid()?;
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.region_id)?;
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyTransferRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyTransferRequestPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            amount: 0,
            aggregate_perm_next_owner: 0,
            aggregate_perm_inventory: 0,
            transaction_type: 0,
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 43_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        self.flags = reader.read_u8()?;
        self.amount = reader.read_i32_le()?;
        self.aggregate_perm_next_owner = reader.read_u8()?;
        self.aggregate_perm_inventory = reader.read_u8()?;
        self.transaction_type = reader.read_i32_le()?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_u8(self.flags)?;
        writer.write_i32_le(self.amount)?;
        writer.write_u8(self.aggregate_perm_next_owner)?;
        writer.write_u8(self.aggregate_perm_inventory)?;
        writer.write_i32_le(self.transaction_type)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "AggregatePermNextOwner".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_next_owner),
            ),
        )?;
        map.add_with_string_osd(
            "AggregatePermInventory".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_inventory),
            ),
        )?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("AggregatePermNextOwner") {
            self.aggregate_perm_next_owner = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AggregatePermInventory") {
            self.aggregate_perm_inventory = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyTransferBackendPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            transaction_time: 0,
            source_id: libremetaverse_types::UUID::zero(),
            dest_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            amount: 0,
            aggregate_perm_next_owner: 0,
            aggregate_perm_inventory: 0,
            transaction_type: 0,
            region_id: libremetaverse_types::UUID::zero(),
            grid_x: 0,
            grid_y: 0,
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 87_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.transaction_time = reader.read_u32_le()?;
        self.source_id = reader.read_uuid()?;
        self.dest_id = reader.read_uuid()?;
        self.flags = reader.read_u8()?;
        self.amount = reader.read_i32_le()?;
        self.aggregate_perm_next_owner = reader.read_u8()?;
        self.aggregate_perm_inventory = reader.read_u8()?;
        self.transaction_type = reader.read_i32_le()?;
        self.region_id = reader.read_uuid()?;
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.transaction_time)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_u8(self.flags)?;
        writer.write_i32_le(self.amount)?;
        writer.write_u8(self.aggregate_perm_next_owner)?;
        writer.write_u8(self.aggregate_perm_inventory)?;
        writer.write_i32_le(self.transaction_type)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TransactionTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.transaction_time.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "AggregatePermNextOwner".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_next_owner),
            ),
        )?;
        map.add_with_string_osd(
            "AggregatePermInventory".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_inventory),
            ),
        )?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionTime") {
            self.transaction_time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("AggregatePermNextOwner") {
            self.aggregate_perm_next_owner = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AggregatePermInventory") {
            self.aggregate_perm_inventory = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyBalanceRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyBalanceRequestPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyBalanceReplyPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
            transaction_success: false,
            money_balance: 0,
            square_meters_credit: 0,
            square_meters_committed: 0,
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 45_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        self.transaction_success = reader.read_u8()? != 0;
        self.money_balance = reader.read_i32_le()?;
        self.square_meters_credit = reader.read_i32_le()?;
        self.square_meters_committed = reader.read_i32_le()?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u8(u8::from(self.transaction_success))?;
        writer.write_i32_le(self.money_balance)?;
        writer.write_i32_le(self.square_meters_credit)?;
        writer.write_i32_le(self.square_meters_committed)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TransactionSuccess".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.transaction_success),
        )?;
        map.add_with_string_osd(
            "MoneyBalance".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.money_balance),
        )?;
        map.add_with_string_osd(
            "SquareMetersCredit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.square_meters_credit),
        )?;
        map.add_with_string_osd(
            "SquareMetersCommitted".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.square_meters_committed),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionSuccess") {
            self.transaction_success = value.as_boolean()?;
        }
        if let Some(value) = map.get("MoneyBalance") {
            self.money_balance = value.as_integer()?;
        }
        if let Some(value) = map.get("SquareMetersCredit") {
            self.square_meters_credit = value.as_integer()?;
        }
        if let Some(value) = map.get("SquareMetersCommitted") {
            self.square_meters_committed = value.as_integer()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MoneyBalanceReplyPacketTransactionInfoBlock {
    fn new_generated() -> Self {
        Self {
            transaction_type: 0,
            source_id: libremetaverse_types::UUID::zero(),
            is_source_group: false,
            dest_id: libremetaverse_types::UUID::zero(),
            is_dest_group: false,
            amount: 0,
            item_description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 42_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.item_description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_type = reader.read_i32_le()?;
        self.source_id = reader.read_uuid()?;
        self.is_source_group = reader.read_u8()? != 0;
        self.dest_id = reader.read_uuid()?;
        self.is_dest_group = reader.read_u8()? != 0;
        self.amount = reader.read_i32_le()?;
        self.item_description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.transaction_type)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_u8(u8::from(self.is_source_group))?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_u8(u8::from(self.is_dest_group))?;
        writer.write_i32_le(self.amount)?;
        writer.write_variable(&self.item_description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "IsSourceGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_source_group),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "IsDestGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_dest_group),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "ItemDescription".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.item_description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsSourceGroup") {
            self.is_source_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsDestGroup") {
            self.is_dest_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("ItemDescription") {
            self.item_description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RoutedMoneyBalanceReplyPacketTargetBlockBlock {
    fn new_generated() -> Self {
        Self {
            target_ip: 0,
            target_port: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        6_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_ip = reader.read_u32_le()?;
        self.target_port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.target_ip)?;
        writer.write_u16_be(self.target_port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.target_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TargetPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.target_port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetIP") {
            self.target_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TargetPort") {
            self.target_port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RoutedMoneyBalanceReplyPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
            transaction_success: false,
            money_balance: 0,
            square_meters_credit: 0,
            square_meters_committed: 0,
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 45_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        self.transaction_success = reader.read_u8()? != 0;
        self.money_balance = reader.read_i32_le()?;
        self.square_meters_credit = reader.read_i32_le()?;
        self.square_meters_committed = reader.read_i32_le()?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u8(u8::from(self.transaction_success))?;
        writer.write_i32_le(self.money_balance)?;
        writer.write_i32_le(self.square_meters_credit)?;
        writer.write_i32_le(self.square_meters_committed)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TransactionSuccess".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.transaction_success),
        )?;
        map.add_with_string_osd(
            "MoneyBalance".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.money_balance),
        )?;
        map.add_with_string_osd(
            "SquareMetersCredit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.square_meters_credit),
        )?;
        map.add_with_string_osd(
            "SquareMetersCommitted".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.square_meters_committed),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionSuccess") {
            self.transaction_success = value.as_boolean()?;
        }
        if let Some(value) = map.get("MoneyBalance") {
            self.money_balance = value.as_integer()?;
        }
        if let Some(value) = map.get("SquareMetersCredit") {
            self.square_meters_credit = value.as_integer()?;
        }
        if let Some(value) = map.get("SquareMetersCommitted") {
            self.square_meters_committed = value.as_integer()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RoutedMoneyBalanceReplyPacketTransactionInfoBlock {
    fn new_generated() -> Self {
        Self {
            transaction_type: 0,
            source_id: libremetaverse_types::UUID::zero(),
            is_source_group: false,
            dest_id: libremetaverse_types::UUID::zero(),
            is_dest_group: false,
            amount: 0,
            item_description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 42_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.item_description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_type = reader.read_i32_le()?;
        self.source_id = reader.read_uuid()?;
        self.is_source_group = reader.read_u8()? != 0;
        self.dest_id = reader.read_uuid()?;
        self.is_dest_group = reader.read_u8()? != 0;
        self.amount = reader.read_i32_le()?;
        self.item_description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.transaction_type)?;
        writer.write_uuid(&self.source_id)?;
        writer.write_u8(u8::from(self.is_source_group))?;
        writer.write_uuid(&self.dest_id)?;
        writer.write_u8(u8::from(self.is_dest_group))?;
        writer.write_i32_le(self.amount)?;
        writer.write_variable(&self.item_description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.transaction_type),
        )?;
        map.add_with_string_osd(
            "SourceID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.source_id),
        )?;
        map.add_with_string_osd(
            "IsSourceGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_source_group),
        )?;
        map.add_with_string_osd(
            "DestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.dest_id),
        )?;
        map.add_with_string_osd(
            "IsDestGroup".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_dest_group),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        map.add_with_string_osd(
            "ItemDescription".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.item_description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionType") {
            self.transaction_type = value.as_integer()?;
        }
        if let Some(value) = map.get("SourceID") {
            self.source_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsSourceGroup") {
            self.is_source_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("DestID") {
            self.dest_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsDestGroup") {
            self.is_dest_group = value.as_boolean()?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        if let Some(value) = map.get("ItemDescription") {
            self.item_description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ActivateGesturesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ActivateGesturesPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            asset_id: libremetaverse_types::UUID::zero(),
            gesture_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.asset_id = reader.read_uuid()?;
        self.gesture_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_u32_le(self.gesture_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "GestureFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.gesture_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GestureFlags") {
            self.gesture_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeactivateGesturesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DeactivateGesturesPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            gesture_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.gesture_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_u32_le(self.gesture_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "GestureFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.gesture_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GestureFlags") {
            self.gesture_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MuteListUpdatePacketMuteDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            filename: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.filename.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.filename = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_variable(&self.filename, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Filename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.filename.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Filename") {
            self.filename = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UseCachedMuteListPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GrantUserRightsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GrantUserRightsPacketRightsBlock {
    fn new_generated() -> Self {
        Self {
            agent_related: libremetaverse_types::UUID::zero(),
            related_rights: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_related = reader.read_uuid()?;
        self.related_rights = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_related)?;
        writer.write_i32_le(self.related_rights)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentRelated".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_related),
        )?;
        map.add_with_string_osd(
            "RelatedRights".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.related_rights),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentRelated") {
            self.agent_related = value.as_uuid()?;
        }
        if let Some(value) = map.get("RelatedRights") {
            self.related_rights = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChangeUserRightsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChangeUserRightsPacketRightsBlock {
    fn new_generated() -> Self {
        Self {
            agent_related: libremetaverse_types::UUID::zero(),
            related_rights: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_related = reader.read_uuid()?;
        self.related_rights = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_related)?;
        writer.write_i32_le(self.related_rights)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentRelated".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_related),
        )?;
        map.add_with_string_osd(
            "RelatedRights".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.related_rights),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentRelated") {
            self.agent_related = value.as_uuid()?;
        }
        if let Some(value) = map.get("RelatedRights") {
            self.related_rights = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::OnlineNotificationPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::OfflineNotificationPacketAgentBlockBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetStartLocationRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::SetStartLocationRequestPacketStartLocationDataBlock {
    fn new_generated() -> Self {
        Self {
            sim_name: Vec::new(),
            location_id: 0,
            location_pos: libremetaverse_types::Vector3::zero(),
            location_look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_name = reader.read_variable(1)?;
        self.location_id = reader.read_u32_le()?;
        self.location_pos = reader.read_vector3()?;
        self.location_look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_name, 1)?;
        writer.write_u32_le(self.location_id)?;
        writer.write_vector3(&self.location_pos)?;
        writer.write_vector3(&self.location_look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_name.clone()),
        )?;
        map.add_with_string_osd(
            "LocationID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.location_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LocationPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.location_pos)?,
        )?;
        map.add_with_string_osd(
            "LocationLookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.location_look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimName") {
            self.sim_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LocationID") {
            self.location_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("LocationPos") {
            self.location_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("LocationLookAt") {
            self.location_look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetStartLocationPacketStartLocationDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            region_id: libremetaverse_types::UUID::zero(),
            location_id: 0,
            region_handle: 0,
            location_pos: libremetaverse_types::Vector3::zero(),
            location_look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        68_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.region_id = reader.read_uuid()?;
        self.location_id = reader.read_u32_le()?;
        self.region_handle = reader.read_u64_le()?;
        self.location_pos = reader.read_vector3()?;
        self.location_look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_u32_le(self.location_id)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_vector3(&self.location_pos)?;
        writer.write_vector3(&self.location_look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "LocationID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.location_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LocationPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.location_pos)?,
        )?;
        map.add_with_string_osd(
            "LocationLookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.location_look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocationID") {
            self.location_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("LocationPos") {
            self.location_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("LocationLookAt") {
            self.location_look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::NetTestPacketNetBlockBlock {
    fn new_generated() -> Self {
        Self { port: 0 }
    }
    fn generated_length(&self) -> i32 {
        2_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.port = reader.read_u16_be()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_be(self.port)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetCPURatioPacketDataBlock {
    fn new_generated() -> Self {
        Self { ratio: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ratio = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.ratio)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Ratio".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.ratio)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Ratio") {
            self.ratio = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimCrashedPacketDataBlock {
    fn new_generated() -> Self {
        Self { region_x: 0, region_y: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_x = reader.read_u32_le()?;
        self.region_y = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.region_x)?;
        writer.write_u32_le(self.region_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_y.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionX") {
            self.region_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionY") {
            self.region_y = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimCrashedPacketUsersBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::NameValuePairPacketTaskDataBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::NameValuePairPacketNameValueDataBlock {
    fn new_generated() -> Self {
        Self { nv_pair: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.nv_pair.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.nv_pair = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.nv_pair, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NVPair".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.nv_pair.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NVPair") {
            self.nv_pair = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveNameValuePairPacketTaskDataBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveNameValuePairPacketNameValueDataBlock {
    fn new_generated() -> Self {
        Self { nv_pair: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.nv_pair.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.nv_pair = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.nv_pair, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NVPair".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.nv_pair.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NVPair") {
            self.nv_pair = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateAttachmentPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateAttachmentPacketAttachmentBlockBlock {
    fn new_generated() -> Self {
        Self { attachment_point: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.attachment_point = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.attachment_point)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AttachmentPoint".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.attachment_point),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AttachmentPoint") {
            self.attachment_point = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateAttachmentPacketOperationDataBlock {
    fn new_generated() -> Self {
        Self {
            add_item: false,
            use_existing_asset: false,
        }
    }
    fn generated_length(&self) -> i32 {
        2_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.add_item = reader.read_u8()? != 0;
        self.use_existing_asset = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.add_item))?;
        writer.write_u8(u8::from(self.use_existing_asset))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AddItem".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.add_item),
        )?;
        map.add_with_string_osd(
            "UseExistingAsset".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.use_existing_asset),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AddItem") {
            self.add_item = value.as_boolean()?;
        }
        if let Some(value) = map.get("UseExistingAsset") {
            self.use_existing_asset = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateAttachmentPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            asset_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.asset_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveAttachmentPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RemoveAttachmentPacketAttachmentBlockBlock {
    fn new_generated() -> Self {
        Self {
            attachment_point: 0,
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.attachment_point = reader.read_u8()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.attachment_point)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AttachmentPoint".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.attachment_point),
            ),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AttachmentPoint") {
            self.attachment_point = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AssetUploadRequestPacketAssetBlockBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            tempfile: false,
            store_local: false,
            asset_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 19_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.asset_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.tempfile = reader.read_u8()? != 0;
        self.store_local = reader.read_u8()? != 0;
        self.asset_data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_u8(u8::from(self.tempfile))?;
        writer.write_u8(u8::from(self.store_local))?;
        writer.write_variable(&self.asset_data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Tempfile".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.tempfile),
        )?;
        map.add_with_string_osd(
            "StoreLocal".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.store_local),
        )?;
        map.add_with_string_osd(
            "AssetData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.asset_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Tempfile") {
            self.tempfile = value.as_boolean()?;
        }
        if let Some(value) = map.get("StoreLocal") {
            self.store_local = value.as_boolean()?;
        }
        if let Some(value) = map.get("AssetData") {
            self.asset_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AssetUploadCompletePacketAssetBlockBlock {
    fn new_generated() -> Self {
        Self {
            uuid: libremetaverse_types::UUID::zero(),
            type_: 0,
            success: false,
        }
    }
    fn generated_length(&self) -> i32 {
        18_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.uuid = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.success = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.uuid)?;
        writer.write_i8(self.type_)?;
        writer.write_u8(u8::from(self.success))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UUID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.uuid),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UUID") {
            self.uuid = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EmailMessageRequestPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            from_address: Vec::new(),
            subject: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.from_address.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.subject.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.from_address = reader.read_variable(1)?;
        self.subject = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_variable(&self.from_address, 1)?;
        writer.write_variable(&self.subject, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "FromAddress".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_address.clone()),
        )?;
        map.add_with_string_osd(
            "Subject".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.subject.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FromAddress") {
            self.from_address = value.as_binary()?;
        }
        if let Some(value) = map.get("Subject") {
            self.subject = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EmailMessageReplyPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            more: 0,
            time: 0,
            from_address: Vec::new(),
            subject: Vec::new(),
            data: Vec::new(),
            mail_filter: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.from_address.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.subject.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.mail_filter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.more = reader.read_u32_le()?;
        self.time = reader.read_u32_le()?;
        self.from_address = reader.read_variable(1)?;
        self.subject = reader.read_variable(1)?;
        self.data = reader.read_variable(2)?;
        self.mail_filter = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_u32_le(self.more)?;
        writer.write_u32_le(self.time)?;
        writer.write_variable(&self.from_address, 1)?;
        writer.write_variable(&self.subject, 1)?;
        writer.write_variable(&self.data, 2)?;
        writer.write_variable(&self.mail_filter, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "More".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.more.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.time.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "FromAddress".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_address.clone()),
        )?;
        map.add_with_string_osd(
            "Subject".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.subject.clone()),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        map.add_with_string_osd(
            "MailFilter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.mail_filter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("More") {
            self.more = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Time") {
            self.time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FromAddress") {
            self.from_address = value.as_binary()?;
        }
        if let Some(value) = map.get("Subject") {
            self.subject = value.as_binary()?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        if let Some(value) = map.get("MailFilter") {
            self.mail_filter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDataRequestPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            hash: 0,
            request_type: 0,
            request: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 9_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.request.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.hash = reader.read_u64_le()?;
        self.request_type = reader.read_i8()?;
        self.request = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.hash)?;
        writer.write_i8(self.request_type)?;
        writer.write_variable(&self.request, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Hash".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.hash.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "RequestType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.request_type)),
        )?;
        map.add_with_string_osd(
            "Request".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.request.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Hash") {
            self.hash = osd_u64(&value)?;
        }
        if let Some(value) = map.get("RequestType") {
            self.request_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Request") {
            self.request = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptDataReplyPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self { hash: 0, reply: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.reply.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.hash = reader.read_u64_le()?;
        self.reply = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.hash)?;
        writer.write_variable(&self.reply, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Hash".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.hash.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Reply".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.reply.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Hash") {
            self.hash = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Reply") {
            self.reply = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            name: Vec::new(),
            charter: Vec::new(),
            show_in_list: false,
            insignia_id: libremetaverse_types::UUID::zero(),
            membership_fee: 0,
            open_enrollment: false,
            allow_publish: false,
            mature_publish: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.charter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.name = reader.read_variable(1)?;
        self.charter = reader.read_variable(2)?;
        self.show_in_list = reader.read_u8()? != 0;
        self.insignia_id = reader.read_uuid()?;
        self.membership_fee = reader.read_i32_le()?;
        self.open_enrollment = reader.read_u8()? != 0;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.charter, 2)?;
        writer.write_u8(u8::from(self.show_in_list))?;
        writer.write_uuid(&self.insignia_id)?;
        writer.write_i32_le(self.membership_fee)?;
        writer.write_u8(u8::from(self.open_enrollment))?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Charter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.charter.clone()),
        )?;
        map.add_with_string_osd(
            "ShowInList".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.show_in_list),
        )?;
        map.add_with_string_osd(
            "InsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.insignia_id),
        )?;
        map.add_with_string_osd(
            "MembershipFee".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.membership_fee),
        )?;
        map.add_with_string_osd(
            "OpenEnrollment".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.open_enrollment),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Charter") {
            self.charter = value.as_binary()?;
        }
        if let Some(value) = map.get("ShowInList") {
            self.show_in_list = value.as_boolean()?;
        }
        if let Some(value) = map.get("InsigniaID") {
            self.insignia_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MembershipFee") {
            self.membership_fee = value.as_integer()?;
        }
        if let Some(value) = map.get("OpenEnrollment") {
            self.open_enrollment = value.as_boolean()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupReplyPacketReplyDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            success: false,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 17_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.success = reader.read_u8()? != 0;
        self.message = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.success))?;
        writer.write_variable(&self.message, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateGroupInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateGroupInfoPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            charter: Vec::new(),
            show_in_list: false,
            insignia_id: libremetaverse_types::UUID::zero(),
            membership_fee: 0,
            open_enrollment: false,
            allow_publish: false,
            mature_publish: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 40_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.charter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.charter = reader.read_variable(2)?;
        self.show_in_list = reader.read_u8()? != 0;
        self.insignia_id = reader.read_uuid()?;
        self.membership_fee = reader.read_i32_le()?;
        self.open_enrollment = reader.read_u8()? != 0;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.charter, 2)?;
        writer.write_u8(u8::from(self.show_in_list))?;
        writer.write_uuid(&self.insignia_id)?;
        writer.write_i32_le(self.membership_fee)?;
        writer.write_u8(u8::from(self.open_enrollment))?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Charter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.charter.clone()),
        )?;
        map.add_with_string_osd(
            "ShowInList".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.show_in_list),
        )?;
        map.add_with_string_osd(
            "InsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.insignia_id),
        )?;
        map.add_with_string_osd(
            "MembershipFee".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.membership_fee),
        )?;
        map.add_with_string_osd(
            "OpenEnrollment".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.open_enrollment),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Charter") {
            self.charter = value.as_binary()?;
        }
        if let Some(value) = map.get("ShowInList") {
            self.show_in_list = value.as_boolean()?;
        }
        if let Some(value) = map.get("InsigniaID") {
            self.insignia_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MembershipFee") {
            self.membership_fee = value.as_integer()?;
        }
        if let Some(value) = map.get("OpenEnrollment") {
            self.open_enrollment = value.as_boolean()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleChangesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleChangesPacketRoleChangeBlock {
    fn new_generated() -> Self {
        Self {
            role_id: libremetaverse_types::UUID::zero(),
            member_id: libremetaverse_types::UUID::zero(),
            change: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.role_id = reader.read_uuid()?;
        self.member_id = reader.read_uuid()?;
        self.change = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.role_id)?;
        writer.write_uuid(&self.member_id)?;
        writer.write_u32_le(self.change)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "MemberID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.member_id),
        )?;
        map.add_with_string_osd(
            "Change".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.change.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MemberID") {
            self.member_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Change") {
            self.change = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            success: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.success = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.success))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberRequestPacketEjectDataBlock {
    fn new_generated() -> Self {
        Self {
            ejectee_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ejectee_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.ejectee_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EjecteeID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.ejectee_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EjecteeID") {
            self.ejectee_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EjectGroupMemberReplyPacketEjectDataBlock {
    fn new_generated() -> Self {
        Self { success: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.success = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.success))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LeaveGroupRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LeaveGroupRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LeaveGroupReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LeaveGroupReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            success: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.success = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.success))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Success".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.success),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Success") {
            self.success = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InviteGroupRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InviteGroupRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InviteGroupRequestPacketInviteDataBlock {
    fn new_generated() -> Self {
        Self {
            invitee_id: libremetaverse_types::UUID::zero(),
            role_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.invitee_id = reader.read_uuid()?;
        self.role_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.invitee_id)?;
        writer.write_uuid(&self.role_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "InviteeID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invitee_id),
        )?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("InviteeID") {
            self.invitee_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InviteGroupResponsePacketInviteDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            invitee_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            role_id: libremetaverse_types::UUID::zero(),
            membership_fee: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        68_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.invitee_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.role_id = reader.read_uuid()?;
        self.membership_fee = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.invitee_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.role_id)?;
        writer.write_i32_le(self.membership_fee)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "InviteeID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invitee_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "MembershipFee".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.membership_fee),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("InviteeID") {
            self.invitee_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MembershipFee") {
            self.membership_fee = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InviteGroupResponsePacketGroupDataBlock {
    fn new_generated() -> Self {
        Self { group_limit: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_limit = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.group_limit)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupLimit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_limit),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupLimit") {
            self.group_limit = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProfileRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProfileRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProfileReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProfileReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            charter: Vec::new(),
            show_in_list: false,
            member_title: Vec::new(),
            powers_mask: 0,
            insignia_id: libremetaverse_types::UUID::zero(),
            founder_id: libremetaverse_types::UUID::zero(),
            membership_fee: 0,
            open_enrollment: false,
            money: 0,
            group_membership_count: 0,
            group_roles_count: 0,
            allow_publish: false,
            mature_publish: false,
            owner_role: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 92_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.charter.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.member_title.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.charter = reader.read_variable(2)?;
        self.show_in_list = reader.read_u8()? != 0;
        self.member_title = reader.read_variable(1)?;
        self.powers_mask = reader.read_u64_le()?;
        self.insignia_id = reader.read_uuid()?;
        self.founder_id = reader.read_uuid()?;
        self.membership_fee = reader.read_i32_le()?;
        self.open_enrollment = reader.read_u8()? != 0;
        self.money = reader.read_i32_le()?;
        self.group_membership_count = reader.read_i32_le()?;
        self.group_roles_count = reader.read_i32_le()?;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        self.owner_role = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.charter, 2)?;
        writer.write_u8(u8::from(self.show_in_list))?;
        writer.write_variable(&self.member_title, 1)?;
        writer.write_u64_le(self.powers_mask)?;
        writer.write_uuid(&self.insignia_id)?;
        writer.write_uuid(&self.founder_id)?;
        writer.write_i32_le(self.membership_fee)?;
        writer.write_u8(u8::from(self.open_enrollment))?;
        writer.write_i32_le(self.money)?;
        writer.write_i32_le(self.group_membership_count)?;
        writer.write_i32_le(self.group_roles_count)?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        writer.write_uuid(&self.owner_role)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Charter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.charter.clone()),
        )?;
        map.add_with_string_osd(
            "ShowInList".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.show_in_list),
        )?;
        map.add_with_string_osd(
            "MemberTitle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.member_title.clone()),
        )?;
        map.add_with_string_osd(
            "PowersMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.powers_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "InsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.insignia_id),
        )?;
        map.add_with_string_osd(
            "FounderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.founder_id),
        )?;
        map.add_with_string_osd(
            "MembershipFee".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.membership_fee),
        )?;
        map.add_with_string_osd(
            "OpenEnrollment".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.open_enrollment),
        )?;
        map.add_with_string_osd(
            "Money".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.money),
        )?;
        map.add_with_string_osd(
            "GroupMembershipCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_membership_count),
        )?;
        map.add_with_string_osd(
            "GroupRolesCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_roles_count),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        map.add_with_string_osd(
            "OwnerRole".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_role),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Charter") {
            self.charter = value.as_binary()?;
        }
        if let Some(value) = map.get("ShowInList") {
            self.show_in_list = value.as_boolean()?;
        }
        if let Some(value) = map.get("MemberTitle") {
            self.member_title = value.as_binary()?;
        }
        if let Some(value) = map.get("PowersMask") {
            self.powers_mask = osd_u64(&value)?;
        }
        if let Some(value) = map.get("InsigniaID") {
            self.insignia_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FounderID") {
            self.founder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MembershipFee") {
            self.membership_fee = value.as_integer()?;
        }
        if let Some(value) = map.get("OpenEnrollment") {
            self.open_enrollment = value.as_boolean()?;
        }
        if let Some(value) = map.get("Money") {
            self.money = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupMembershipCount") {
            self.group_membership_count = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupRolesCount") {
            self.group_roles_count = value.as_integer()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("OwnerRole") {
            self.owner_role = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountSummaryRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountSummaryRequestPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountSummaryReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountSummaryReplyPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
            start_date: Vec::new(),
            balance: 0,
            total_credits: 0,
            total_debits: 0,
            object_tax_current: 0,
            light_tax_current: 0,
            land_tax_current: 0,
            group_tax_current: 0,
            parcel_dir_fee_current: 0,
            object_tax_estimate: 0,
            light_tax_estimate: 0,
            land_tax_estimate: 0,
            group_tax_estimate: 0,
            parcel_dir_fee_estimate: 0,
            non_exempt_members: 0,
            last_tax_date: Vec::new(),
            tax_date: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 80_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.start_date.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_tax_date.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.tax_date.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        self.start_date = reader.read_variable(1)?;
        self.balance = reader.read_i32_le()?;
        self.total_credits = reader.read_i32_le()?;
        self.total_debits = reader.read_i32_le()?;
        self.object_tax_current = reader.read_i32_le()?;
        self.light_tax_current = reader.read_i32_le()?;
        self.land_tax_current = reader.read_i32_le()?;
        self.group_tax_current = reader.read_i32_le()?;
        self.parcel_dir_fee_current = reader.read_i32_le()?;
        self.object_tax_estimate = reader.read_i32_le()?;
        self.light_tax_estimate = reader.read_i32_le()?;
        self.land_tax_estimate = reader.read_i32_le()?;
        self.group_tax_estimate = reader.read_i32_le()?;
        self.parcel_dir_fee_estimate = reader.read_i32_le()?;
        self.non_exempt_members = reader.read_i32_le()?;
        self.last_tax_date = reader.read_variable(1)?;
        self.tax_date = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        writer.write_variable(&self.start_date, 1)?;
        writer.write_i32_le(self.balance)?;
        writer.write_i32_le(self.total_credits)?;
        writer.write_i32_le(self.total_debits)?;
        writer.write_i32_le(self.object_tax_current)?;
        writer.write_i32_le(self.light_tax_current)?;
        writer.write_i32_le(self.land_tax_current)?;
        writer.write_i32_le(self.group_tax_current)?;
        writer.write_i32_le(self.parcel_dir_fee_current)?;
        writer.write_i32_le(self.object_tax_estimate)?;
        writer.write_i32_le(self.light_tax_estimate)?;
        writer.write_i32_le(self.land_tax_estimate)?;
        writer.write_i32_le(self.group_tax_estimate)?;
        writer.write_i32_le(self.parcel_dir_fee_estimate)?;
        writer.write_i32_le(self.non_exempt_members)?;
        writer.write_variable(&self.last_tax_date, 1)?;
        writer.write_variable(&self.tax_date, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        map.add_with_string_osd(
            "StartDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.start_date.clone()),
        )?;
        map.add_with_string_osd(
            "Balance".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.balance),
        )?;
        map.add_with_string_osd(
            "TotalCredits".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.total_credits),
        )?;
        map.add_with_string_osd(
            "TotalDebits".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.total_debits),
        )?;
        map.add_with_string_osd(
            "ObjectTaxCurrent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.object_tax_current),
        )?;
        map.add_with_string_osd(
            "LightTaxCurrent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.light_tax_current),
        )?;
        map.add_with_string_osd(
            "LandTaxCurrent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.land_tax_current),
        )?;
        map.add_with_string_osd(
            "GroupTaxCurrent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_tax_current),
        )?;
        map.add_with_string_osd(
            "ParcelDirFeeCurrent".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.parcel_dir_fee_current),
        )?;
        map.add_with_string_osd(
            "ObjectTaxEstimate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.object_tax_estimate),
        )?;
        map.add_with_string_osd(
            "LightTaxEstimate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.light_tax_estimate),
        )?;
        map.add_with_string_osd(
            "LandTaxEstimate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.land_tax_estimate),
        )?;
        map.add_with_string_osd(
            "GroupTaxEstimate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_tax_estimate),
        )?;
        map.add_with_string_osd(
            "ParcelDirFeeEstimate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.parcel_dir_fee_estimate),
        )?;
        map.add_with_string_osd(
            "NonExemptMembers".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.non_exempt_members),
        )?;
        map.add_with_string_osd(
            "LastTaxDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_tax_date.clone()),
        )?;
        map.add_with_string_osd(
            "TaxDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.tax_date.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        if let Some(value) = map.get("StartDate") {
            self.start_date = value.as_binary()?;
        }
        if let Some(value) = map.get("Balance") {
            self.balance = value.as_integer()?;
        }
        if let Some(value) = map.get("TotalCredits") {
            self.total_credits = value.as_integer()?;
        }
        if let Some(value) = map.get("TotalDebits") {
            self.total_debits = value.as_integer()?;
        }
        if let Some(value) = map.get("ObjectTaxCurrent") {
            self.object_tax_current = value.as_integer()?;
        }
        if let Some(value) = map.get("LightTaxCurrent") {
            self.light_tax_current = value.as_integer()?;
        }
        if let Some(value) = map.get("LandTaxCurrent") {
            self.land_tax_current = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupTaxCurrent") {
            self.group_tax_current = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelDirFeeCurrent") {
            self.parcel_dir_fee_current = value.as_integer()?;
        }
        if let Some(value) = map.get("ObjectTaxEstimate") {
            self.object_tax_estimate = value.as_integer()?;
        }
        if let Some(value) = map.get("LightTaxEstimate") {
            self.light_tax_estimate = value.as_integer()?;
        }
        if let Some(value) = map.get("LandTaxEstimate") {
            self.land_tax_estimate = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupTaxEstimate") {
            self.group_tax_estimate = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelDirFeeEstimate") {
            self.parcel_dir_fee_estimate = value.as_integer()?;
        }
        if let Some(value) = map.get("NonExemptMembers") {
            self.non_exempt_members = value.as_integer()?;
        }
        if let Some(value) = map.get("LastTaxDate") {
            self.last_tax_date = value.as_binary()?;
        }
        if let Some(value) = map.get("TaxDate") {
            self.tax_date = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountDetailsRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountDetailsRequestPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountDetailsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountDetailsReplyPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
            start_date: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.start_date.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        self.start_date = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        writer.write_variable(&self.start_date, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        map.add_with_string_osd(
            "StartDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.start_date.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        if let Some(value) = map.get("StartDate") {
            self.start_date = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupAccountDetailsReplyPacketHistoryDataBlock {
    fn new_generated() -> Self {
        Self {
            description: Vec::new(),
            amount: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.description = reader.read_variable(1)?;
        self.amount = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.amount)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupAccountTransactionsRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupAccountTransactionsRequestPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupAccountTransactionsReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupAccountTransactionsReplyPacketMoneyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            interval_days: 0,
            current_interval: 0,
            start_date: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.start_date.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.interval_days = reader.read_i32_le()?;
        self.current_interval = reader.read_i32_le()?;
        self.start_date = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.interval_days)?;
        writer.write_i32_le(self.current_interval)?;
        writer.write_variable(&self.start_date, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "IntervalDays".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.interval_days),
        )?;
        map.add_with_string_osd(
            "CurrentInterval".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.current_interval),
        )?;
        map.add_with_string_osd(
            "StartDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.start_date.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntervalDays") {
            self.interval_days = value.as_integer()?;
        }
        if let Some(value) = map.get("CurrentInterval") {
            self.current_interval = value.as_integer()?;
        }
        if let Some(value) = map.get("StartDate") {
            self.start_date = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupAccountTransactionsReplyPacketHistoryDataBlock {
    fn new_generated() -> Self {
        Self {
            time: Vec::new(),
            user: Vec::new(),
            type_: 0,
            item: Vec::new(),
            amount: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.time.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.user.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.item.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.time = reader.read_variable(1)?;
        self.user = reader.read_variable(1)?;
        self.type_ = reader.read_i32_le()?;
        self.item = reader.read_variable(1)?;
        self.amount = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.time, 1)?;
        writer.write_variable(&self.user, 1)?;
        writer.write_i32_le(self.type_)?;
        writer.write_variable(&self.item, 1)?;
        writer.write_i32_le(self.amount)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.time.clone()),
        )?;
        map.add_with_string_osd(
            "User".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.user.clone()),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.type_),
        )?;
        map.add_with_string_osd(
            "Item".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.item.clone()),
        )?;
        map.add_with_string_osd(
            "Amount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.amount),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Time") {
            self.time = value.as_binary()?;
        }
        if let Some(value) = map.get("User") {
            self.user = value.as_binary()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()?;
        }
        if let Some(value) = map.get("Item") {
            self.item = value.as_binary()?;
        }
        if let Some(value) = map.get("Amount") {
            self.amount = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupActiveProposalsRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupActiveProposalsRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupActiveProposalsRequestPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupActiveProposalItemReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupActiveProposalItemReplyPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            total_num_items: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.total_num_items = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.total_num_items)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TotalNumItems".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.total_num_items.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TotalNumItems") {
            self.total_num_items = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupActiveProposalItemReplyPacketProposalDataBlock {
    fn new_generated() -> Self {
        Self {
            vote_id: libremetaverse_types::UUID::zero(),
            vote_initiator: libremetaverse_types::UUID::zero(),
            terse_date_id: Vec::new(),
            start_date_time: Vec::new(),
            end_date_time: Vec::new(),
            already_voted: false,
            vote_cast: Vec::new(),
            majority: 0.0_f32,
            quorum: 0,
            proposal_text: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 41_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.terse_date_id.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.start_date_time.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.end_date_time.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.vote_cast.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.proposal_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.vote_id = reader.read_uuid()?;
        self.vote_initiator = reader.read_uuid()?;
        self.terse_date_id = reader.read_variable(1)?;
        self.start_date_time = reader.read_variable(1)?;
        self.end_date_time = reader.read_variable(1)?;
        self.already_voted = reader.read_u8()? != 0;
        self.vote_cast = reader.read_variable(1)?;
        self.majority = reader.read_f32_le()?;
        self.quorum = reader.read_i32_le()?;
        self.proposal_text = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.vote_id)?;
        writer.write_uuid(&self.vote_initiator)?;
        writer.write_variable(&self.terse_date_id, 1)?;
        writer.write_variable(&self.start_date_time, 1)?;
        writer.write_variable(&self.end_date_time, 1)?;
        writer.write_u8(u8::from(self.already_voted))?;
        writer.write_variable(&self.vote_cast, 1)?;
        writer.write_f32_le(self.majority)?;
        writer.write_i32_le(self.quorum)?;
        writer.write_variable(&self.proposal_text, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "VoteID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.vote_id),
        )?;
        map.add_with_string_osd(
            "VoteInitiator".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.vote_initiator),
        )?;
        map.add_with_string_osd(
            "TerseDateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.terse_date_id.clone()),
        )?;
        map.add_with_string_osd(
            "StartDateTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.start_date_time.clone()),
        )?;
        map.add_with_string_osd(
            "EndDateTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.end_date_time.clone()),
        )?;
        map.add_with_string_osd(
            "AlreadyVoted".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.already_voted),
        )?;
        map.add_with_string_osd(
            "VoteCast".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.vote_cast.clone()),
        )?;
        map.add_with_string_osd(
            "Majority".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.majority)),
        )?;
        map.add_with_string_osd(
            "Quorum".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.quorum),
        )?;
        map.add_with_string_osd(
            "ProposalText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.proposal_text.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("VoteID") {
            self.vote_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("VoteInitiator") {
            self.vote_initiator = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerseDateID") {
            self.terse_date_id = value.as_binary()?;
        }
        if let Some(value) = map.get("StartDateTime") {
            self.start_date_time = value.as_binary()?;
        }
        if let Some(value) = map.get("EndDateTime") {
            self.end_date_time = value.as_binary()?;
        }
        if let Some(value) = map.get("AlreadyVoted") {
            self.already_voted = value.as_boolean()?;
        }
        if let Some(value) = map.get("VoteCast") {
            self.vote_cast = value.as_binary()?;
        }
        if let Some(value) = map.get("Majority") {
            self.majority = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Quorum") {
            self.quorum = value.as_integer()?;
        }
        if let Some(value) = map.get("ProposalText") {
            self.proposal_text = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupVoteHistoryRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupVoteHistoryRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupVoteHistoryRequestPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupVoteHistoryItemReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupVoteHistoryItemReplyPacketTransactionDataBlock {
    fn new_generated() -> Self {
        Self {
            transaction_id: libremetaverse_types::UUID::zero(),
            total_num_items: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transaction_id = reader.read_uuid()?;
        self.total_num_items = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transaction_id)?;
        writer.write_u32_le(self.total_num_items)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "TotalNumItems".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.total_num_items.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TotalNumItems") {
            self.total_num_items = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::GroupVoteHistoryItemReplyPacketHistoryItemDataBlock {
    fn new_generated() -> Self {
        Self {
            vote_id: libremetaverse_types::UUID::zero(),
            terse_date_id: Vec::new(),
            start_date_time: Vec::new(),
            end_date_time: Vec::new(),
            vote_initiator: libremetaverse_types::UUID::zero(),
            vote_type: Vec::new(),
            vote_result: Vec::new(),
            majority: 0.0_f32,
            quorum: 0,
            proposal_text: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 40_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.terse_date_id.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.start_date_time.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.end_date_time.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.vote_type.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.vote_result.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.proposal_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.vote_id = reader.read_uuid()?;
        self.terse_date_id = reader.read_variable(1)?;
        self.start_date_time = reader.read_variable(1)?;
        self.end_date_time = reader.read_variable(1)?;
        self.vote_initiator = reader.read_uuid()?;
        self.vote_type = reader.read_variable(1)?;
        self.vote_result = reader.read_variable(1)?;
        self.majority = reader.read_f32_le()?;
        self.quorum = reader.read_i32_le()?;
        self.proposal_text = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.vote_id)?;
        writer.write_variable(&self.terse_date_id, 1)?;
        writer.write_variable(&self.start_date_time, 1)?;
        writer.write_variable(&self.end_date_time, 1)?;
        writer.write_uuid(&self.vote_initiator)?;
        writer.write_variable(&self.vote_type, 1)?;
        writer.write_variable(&self.vote_result, 1)?;
        writer.write_f32_le(self.majority)?;
        writer.write_i32_le(self.quorum)?;
        writer.write_variable(&self.proposal_text, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "VoteID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.vote_id),
        )?;
        map.add_with_string_osd(
            "TerseDateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.terse_date_id.clone()),
        )?;
        map.add_with_string_osd(
            "StartDateTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.start_date_time.clone()),
        )?;
        map.add_with_string_osd(
            "EndDateTime".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.end_date_time.clone()),
        )?;
        map.add_with_string_osd(
            "VoteInitiator".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.vote_initiator),
        )?;
        map.add_with_string_osd(
            "VoteType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.vote_type.clone()),
        )?;
        map.add_with_string_osd(
            "VoteResult".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.vote_result.clone()),
        )?;
        map.add_with_string_osd(
            "Majority".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.majority)),
        )?;
        map.add_with_string_osd(
            "Quorum".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.quorum),
        )?;
        map.add_with_string_osd(
            "ProposalText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.proposal_text.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("VoteID") {
            self.vote_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TerseDateID") {
            self.terse_date_id = value.as_binary()?;
        }
        if let Some(value) = map.get("StartDateTime") {
            self.start_date_time = value.as_binary()?;
        }
        if let Some(value) = map.get("EndDateTime") {
            self.end_date_time = value.as_binary()?;
        }
        if let Some(value) = map.get("VoteInitiator") {
            self.vote_initiator = value.as_uuid()?;
        }
        if let Some(value) = map.get("VoteType") {
            self.vote_type = value.as_binary()?;
        }
        if let Some(value) = map.get("VoteResult") {
            self.vote_result = value.as_binary()?;
        }
        if let Some(value) = map.get("Majority") {
            self.majority = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Quorum") {
            self.quorum = value.as_integer()?;
        }
        if let Some(value) = map.get("ProposalText") {
            self.proposal_text = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupVoteHistoryItemReplyPacketVoteItemBlock {
    fn new_generated() -> Self {
        Self {
            candidate_id: libremetaverse_types::UUID::zero(),
            vote_cast: Vec::new(),
            num_votes: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 20_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.vote_cast.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.candidate_id = reader.read_uuid()?;
        self.vote_cast = reader.read_variable(1)?;
        self.num_votes = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.candidate_id)?;
        writer.write_variable(&self.vote_cast, 1)?;
        writer.write_i32_le(self.num_votes)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CandidateID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.candidate_id),
        )?;
        map.add_with_string_osd(
            "VoteCast".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.vote_cast.clone()),
        )?;
        map.add_with_string_osd(
            "NumVotes".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.num_votes),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CandidateID") {
            self.candidate_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("VoteCast") {
            self.vote_cast = value.as_binary()?;
        }
        if let Some(value) = map.get("NumVotes") {
            self.num_votes = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartGroupProposalPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartGroupProposalPacketProposalDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            quorum: 0,
            majority: 0.0_f32,
            duration: 0,
            proposal_text: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.proposal_text.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.quorum = reader.read_i32_le()?;
        self.majority = reader.read_f32_le()?;
        self.duration = reader.read_i32_le()?;
        self.proposal_text = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_i32_le(self.quorum)?;
        writer.write_f32_le(self.majority)?;
        writer.write_i32_le(self.duration)?;
        writer.write_variable(&self.proposal_text, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Quorum".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.quorum),
        )?;
        map.add_with_string_osd(
            "Majority".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.majority)),
        )?;
        map.add_with_string_osd(
            "Duration".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.duration),
        )?;
        map.add_with_string_osd(
            "ProposalText".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.proposal_text.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Quorum") {
            self.quorum = value.as_integer()?;
        }
        if let Some(value) = map.get("Majority") {
            self.majority = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Duration") {
            self.duration = value.as_integer()?;
        }
        if let Some(value) = map.get("ProposalText") {
            self.proposal_text = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProposalBallotPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupProposalBallotPacketProposalDataBlock {
    fn new_generated() -> Self {
        Self {
            proposal_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            vote_cast: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.vote_cast.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.proposal_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.vote_cast = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.proposal_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.vote_cast, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ProposalID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.proposal_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "VoteCast".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.vote_cast.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ProposalID") {
            self.proposal_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("VoteCast") {
            self.vote_cast = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupMembersRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupMembersRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupMembersReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupMembersReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
            member_count: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        self.member_count = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.member_count)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "MemberCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.member_count),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MemberCount") {
            self.member_count = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupMembersReplyPacketMemberDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            contribution: 0,
            online_status: Vec::new(),
            agent_powers: 0,
            title: Vec::new(),
            is_owner: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.online_status.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.title.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.contribution = reader.read_i32_le()?;
        self.online_status = reader.read_variable(1)?;
        self.agent_powers = reader.read_u64_le()?;
        self.title = reader.read_variable(1)?;
        self.is_owner = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_i32_le(self.contribution)?;
        writer.write_variable(&self.online_status, 1)?;
        writer.write_u64_le(self.agent_powers)?;
        writer.write_variable(&self.title, 1)?;
        writer.write_u8(u8::from(self.is_owner))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Contribution".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.contribution),
        )?;
        map.add_with_string_osd(
            "OnlineStatus".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.online_status.clone()),
        )?;
        map.add_with_string_osd(
            "AgentPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.agent_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Title".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.title.clone()),
        )?;
        map.add_with_string_osd(
            "IsOwner".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_owner),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Contribution") {
            self.contribution = value.as_integer()?;
        }
        if let Some(value) = map.get("OnlineStatus") {
            self.online_status = value.as_binary()?;
        }
        if let Some(value) = map.get("AgentPowers") {
            self.agent_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Title") {
            self.title = value.as_binary()?;
        }
        if let Some(value) = map.get("IsOwner") {
            self.is_owner = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ActivateGroupPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetGroupContributionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetGroupContributionPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            contribution: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.contribution = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_i32_le(self.contribution)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Contribution".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.contribution),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Contribution") {
            self.contribution = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetGroupAcceptNoticesPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetGroupAcceptNoticesPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            accept_notices: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.accept_notices = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u8(u8::from(self.accept_notices))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "AcceptNotices".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.accept_notices),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AcceptNotices") {
            self.accept_notices = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SetGroupAcceptNoticesPacketNewDataBlock {
    fn new_generated() -> Self {
        Self { list_in_profile: false }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.list_in_profile = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.list_in_profile))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ListInProfile".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.list_in_profile),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ListInProfile") {
            self.list_in_profile = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleDataRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleDataRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleDataReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleDataReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
            role_count: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        self.role_count = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        writer.write_i32_le(self.role_count)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "RoleCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.role_count),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RoleCount") {
            self.role_count = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleDataReplyPacketRoleDataBlock {
    fn new_generated() -> Self {
        Self {
            role_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            title: Vec::new(),
            description: Vec::new(),
            powers: 0,
            members: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.title.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.role_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.title = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.powers = reader.read_u64_le()?;
        self.members = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.role_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.title, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_u64_le(self.powers)?;
        writer.write_u32_le(self.members)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Title".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.title.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "Powers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Members".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.members.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Title") {
            self.title = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("Powers") {
            self.powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Members") {
            self.members = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleMembersRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleMembersRequestPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleMembersReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
            total_pairs: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        52_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        self.total_pairs = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        writer.write_u32_le(self.total_pairs)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "TotalPairs".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.total_pairs.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TotalPairs") {
            self.total_pairs = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleMembersReplyPacketMemberDataBlock {
    fn new_generated() -> Self {
        Self {
            role_id: libremetaverse_types::UUID::zero(),
            member_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.role_id = reader.read_uuid()?;
        self.member_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.role_id)?;
        writer.write_uuid(&self.member_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "MemberID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.member_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MemberID") {
            self.member_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupTitlesRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupTitlesReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            request_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.request_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.request_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupTitlesReplyPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            title: Vec::new(),
            role_id: libremetaverse_types::UUID::zero(),
            selected: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 17_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.title.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.title = reader.read_variable(1)?;
        self.role_id = reader.read_uuid()?;
        self.selected = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.title, 1)?;
        writer.write_uuid(&self.role_id)?;
        writer.write_u8(u8::from(self.selected))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Title".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.title.clone()),
        )?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "Selected".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.selected),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Title") {
            self.title = value.as_binary()?;
        }
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Selected") {
            self.selected = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupTitleUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            title_role_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        64_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.title_role_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_uuid(&self.title_role_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "TitleRoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.title_role_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TitleRoleID") {
            self.title_role_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupRoleUpdatePacketRoleDataBlock {
    fn new_generated() -> Self {
        Self {
            role_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            description: Vec::new(),
            title: Vec::new(),
            powers: 0,
            update_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 25_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.title.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.role_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.title = reader.read_variable(1)?;
        self.powers = reader.read_u64_le()?;
        self.update_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.role_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_variable(&self.title, 1)?;
        writer.write_u64_le(self.powers)?;
        writer.write_u8(self.update_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RoleID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.role_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "Title".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.title.clone()),
        )?;
        map.add_with_string_osd(
            "Powers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "UpdateType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.update_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RoleID") {
            self.role_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("Title") {
            self.title = value.as_binary()?;
        }
        if let Some(value) = map.get("Powers") {
            self.powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("UpdateType") {
            self.update_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LiveHelpGroupRequestPacketRequestDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LiveHelpGroupReplyPacketReplyDataBlock {
    fn new_generated() -> Self {
        Self {
            request_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            selection: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.selection.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.selection = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.request_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_variable(&self.selection, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.request_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "Selection".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.selection.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestID") {
            self.request_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Selection") {
            self.selection = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentWearablesRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentWearablesUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.serial_num)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.serial_num.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentWearablesUpdatePacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            asset_id: libremetaverse_types::UUID::zero(),
            wearable_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.asset_id = reader.read_uuid()?;
        self.wearable_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_u8(self.wearable_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "WearableType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.wearable_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("WearableType") {
            self.wearable_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentIsNowWearingPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentIsNowWearingPacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            wearable_type: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.wearable_type = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_u8(self.wearable_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "WearableType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.wearable_type)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("WearableType") {
            self.wearable_type = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentCachedTexturePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_i32_le(self.serial_num)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.serial_num),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentCachedTexturePacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            texture_index: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.texture_index = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_u8(self.texture_index)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "TextureIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.texture_index)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TextureIndex") {
            self.texture_index = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentCachedTextureResponsePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            serial_num: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.serial_num = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_i32_le(self.serial_num)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "SerialNum".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.serial_num),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SerialNum") {
            self.serial_num = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::AgentCachedTextureResponsePacketWearableDataBlock {
    fn new_generated() -> Self {
        Self {
            texture_id: libremetaverse_types::UUID::zero(),
            texture_index: 0,
            host_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 17_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.host_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.texture_id = reader.read_uuid()?;
        self.texture_index = reader.read_u8()?;
        self.host_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.texture_id)?;
        writer.write_u8(self.texture_index)?;
        writer.write_variable(&self.host_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TextureID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.texture_id),
        )?;
        map.add_with_string_osd(
            "TextureIndex".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.texture_index)),
        )?;
        map.add_with_string_osd(
            "HostName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.host_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TextureID") {
            self.texture_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TextureIndex") {
            self.texture_index = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("HostName") {
            self.host_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentDataUpdateRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentDataUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            first_name: Vec::new(),
            last_name: Vec::new(),
            group_title: Vec::new(),
            active_group_id: libremetaverse_types::UUID::zero(),
            group_powers: 0,
            group_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 40_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.first_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.last_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_title.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.first_name = reader.read_variable(1)?;
        self.last_name = reader.read_variable(1)?;
        self.group_title = reader.read_variable(1)?;
        self.active_group_id = reader.read_uuid()?;
        self.group_powers = reader.read_u64_le()?;
        self.group_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_variable(&self.first_name, 1)?;
        writer.write_variable(&self.last_name, 1)?;
        writer.write_variable(&self.group_title, 1)?;
        writer.write_uuid(&self.active_group_id)?;
        writer.write_u64_le(self.group_powers)?;
        writer.write_variable(&self.group_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "FirstName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.first_name.clone()),
        )?;
        map.add_with_string_osd(
            "LastName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.last_name.clone()),
        )?;
        map.add_with_string_osd(
            "GroupTitle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_title.clone()),
        )?;
        map.add_with_string_osd(
            "ActiveGroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.active_group_id),
        )?;
        map.add_with_string_osd(
            "GroupPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FirstName") {
            self.first_name = value.as_binary()?;
        }
        if let Some(value) = map.get("LastName") {
            self.last_name = value.as_binary()?;
        }
        if let Some(value) = map.get("GroupTitle") {
            self.group_title = value.as_binary()?;
        }
        if let Some(value) = map.get("ActiveGroupID") {
            self.active_group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupPowers") {
            self.group_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("GroupName") {
            self.group_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GroupDataUpdatePacketAgentGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            agent_powers: 0,
            group_title: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 40_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_title.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.agent_powers = reader.read_u64_le()?;
        self.group_title = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u64_le(self.agent_powers)?;
        writer.write_variable(&self.group_title, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "AgentPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.agent_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupTitle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_title.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentPowers") {
            self.agent_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("GroupTitle") {
            self.group_title = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentGroupDataUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentGroupDataUpdatePacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            group_powers: 0,
            accept_notices: false,
            group_insignia_id: libremetaverse_types::UUID::zero(),
            contribution: 0,
            group_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 45_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.group_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.group_powers = reader.read_u64_le()?;
        self.accept_notices = reader.read_u8()? != 0;
        self.group_insignia_id = reader.read_uuid()?;
        self.contribution = reader.read_i32_le()?;
        self.group_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u64_le(self.group_powers)?;
        writer.write_u8(u8::from(self.accept_notices))?;
        writer.write_uuid(&self.group_insignia_id)?;
        writer.write_i32_le(self.contribution)?;
        writer.write_variable(&self.group_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "GroupPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AcceptNotices".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.accept_notices),
        )?;
        map.add_with_string_osd(
            "GroupInsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_insignia_id),
        )?;
        map.add_with_string_osd(
            "Contribution".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.contribution),
        )?;
        map.add_with_string_osd(
            "GroupName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.group_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupPowers") {
            self.group_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("AcceptNotices") {
            self.accept_notices = value.as_boolean()?;
        }
        if let Some(value) = map.get("GroupInsigniaID") {
            self.group_insignia_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Contribution") {
            self.contribution = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupName") {
            self.group_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentDropGroupPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LogTextMessagePacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            from_agent_id: libremetaverse_types::UUID::zero(),
            to_agent_id: libremetaverse_types::UUID::zero(),
            global_x: 0.0_f64,
            global_y: 0.0_f64,
            time: 0,
            message: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_agent_id = reader.read_uuid()?;
        self.to_agent_id = reader.read_uuid()?;
        self.global_x = reader.read_f64_le()?;
        self.global_y = reader.read_f64_le()?;
        self.time = reader.read_u32_le()?;
        self.message = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.from_agent_id)?;
        writer.write_uuid(&self.to_agent_id)?;
        writer.write_f64_le(self.global_x)?;
        writer.write_f64_le(self.global_y)?;
        writer.write_u32_le(self.time)?;
        writer.write_variable(&self.message, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "FromAgentId".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.from_agent_id),
        )?;
        map.add_with_string_osd(
            "ToAgentId".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.to_agent_id),
        )?;
        map.add_with_string_osd(
            "GlobalX".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.global_x),
        )?;
        map.add_with_string_osd(
            "GlobalY".to_owned(),
            libremetaverse_structured_data::OSD::Real(self.global_y),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.time.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("FromAgentId") {
            self.from_agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ToAgentId") {
            self.to_agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GlobalX") {
            self.global_x = value.as_real()?;
        }
        if let Some(value) = map.get("GlobalY") {
            self.global_y = value.as_real()?;
        }
        if let Some(value) = map.get("Time") {
            self.time = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateTrustedCircuitPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            end_point_id: libremetaverse_types::UUID::zero(),
            digest: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.end_point_id = reader.read_uuid()?;
        self.digest = reader.read_bytes(32, "truncated fixed packet field")?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.end_point_id)?;
        writer.write_fixed(&self.digest, 32)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EndPointID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.end_point_id),
        )?;
        map.add_with_string_osd(
            "Digest".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.digest.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EndPointID") {
            self.end_point_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Digest") {
            self.digest = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DenyTrustedCircuitPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            end_point_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.end_point_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.end_point_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "EndPointID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.end_point_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("EndPointID") {
            self.end_point_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezSingleAttachmentFromInvPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezSingleAttachmentFromInvPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            attachment_pt: 0,
            item_flags: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            name: Vec::new(),
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 49_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.attachment_pt = reader.read_u8()?;
        self.item_flags = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(self.attachment_pt)?;
        writer.write_u32_le(self.item_flags)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "AttachmentPt".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.attachment_pt)),
        )?;
        map.add_with_string_osd(
            "ItemFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AttachmentPt") {
            self.attachment_pt = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ItemFlags") {
            self.item_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RezMultipleAttachmentsFromInvPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RezMultipleAttachmentsFromInvPacketHeaderDataBlock {
    fn new_generated() -> Self {
        Self {
            compound_msg_id: libremetaverse_types::UUID::zero(),
            total_objects: 0,
            first_detach_all: false,
        }
    }
    fn generated_length(&self) -> i32 {
        18_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.compound_msg_id = reader.read_uuid()?;
        self.total_objects = reader.read_u8()?;
        self.first_detach_all = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.compound_msg_id)?;
        writer.write_u8(self.total_objects)?;
        writer.write_u8(u8::from(self.first_detach_all))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CompoundMsgID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.compound_msg_id),
        )?;
        map.add_with_string_osd(
            "TotalObjects".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.total_objects)),
        )?;
        map.add_with_string_osd(
            "FirstDetachAll".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.first_detach_all),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CompoundMsgID") {
            self.compound_msg_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TotalObjects") {
            self.total_objects = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("FirstDetachAll") {
            self.first_detach_all = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RezMultipleAttachmentsFromInvPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            attachment_pt: 0,
            item_flags: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            name: Vec::new(),
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 49_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.attachment_pt = reader.read_u8()?;
        self.item_flags = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(self.attachment_pt)?;
        writer.write_u32_le(self.item_flags)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "AttachmentPt".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.attachment_pt)),
        )?;
        map.add_with_string_osd(
            "ItemFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AttachmentPt") {
            self.attachment_pt = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ItemFlags") {
            self.item_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::DetachAttachmentIntoInvPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateNewOutfitAttachmentsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateNewOutfitAttachmentsPacketHeaderDataBlock {
    fn new_generated() -> Self {
        Self {
            new_folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.new_folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.new_folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NewFolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.new_folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NewFolderID") {
            self.new_folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateNewOutfitAttachmentsPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            old_item_id: libremetaverse_types::UUID::zero(),
            old_folder_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.old_item_id = reader.read_uuid()?;
        self.old_folder_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.old_item_id)?;
        writer.write_uuid(&self.old_folder_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "OldItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.old_item_id),
        )?;
        map.add_with_string_osd(
            "OldFolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.old_folder_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("OldItemID") {
            self.old_item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OldFolderID") {
            self.old_folder_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserInfoRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserInfoReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UserInfoReplyPacketUserDataBlock {
    fn new_generated() -> Self {
        Self {
            im_via_e_mail: false,
            directory_visibility: Vec::new(),
            e_mail: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 1_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.directory_visibility.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.e_mail.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.im_via_e_mail = reader.read_u8()? != 0;
        self.directory_visibility = reader.read_variable(1)?;
        self.e_mail = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.im_via_e_mail))?;
        writer.write_variable(&self.directory_visibility, 1)?;
        writer.write_variable(&self.e_mail, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "IMViaEMail".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.im_via_e_mail),
        )?;
        map.add_with_string_osd(
            "DirectoryVisibility".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.directory_visibility.clone(),
            ),
        )?;
        map.add_with_string_osd(
            "EMail".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.e_mail.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("IMViaEMail") {
            self.im_via_e_mail = value.as_boolean()?;
        }
        if let Some(value) = map.get("DirectoryVisibility") {
            self.directory_visibility = value.as_binary()?;
        }
        if let Some(value) = map.get("EMail") {
            self.e_mail = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateUserInfoPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::UpdateUserInfoPacketUserDataBlock {
    fn new_generated() -> Self {
        Self {
            im_via_e_mail: false,
            directory_visibility: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 1_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.directory_visibility.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.im_via_e_mail = reader.read_u8()? != 0;
        self.directory_visibility = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.im_via_e_mail))?;
        writer.write_variable(&self.directory_visibility, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "IMViaEMail".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.im_via_e_mail),
        )?;
        map.add_with_string_osd(
            "DirectoryVisibility".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.directory_visibility.clone(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("IMViaEMail") {
            self.im_via_e_mail = value.as_boolean()?;
        }
        if let Some(value) = map.get("DirectoryVisibility") {
            self.directory_visibility = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelRenamePacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            parcel_id: libremetaverse_types::UUID::zero(),
            new_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.new_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_id = reader.read_uuid()?;
        self.new_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.parcel_id)?;
        writer.write_variable(&self.new_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parcel_id),
        )?;
        map.add_with_string_osd(
            "NewName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.new_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelID") {
            self.parcel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("NewName") {
            self.new_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InitiateDownloadPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InitiateDownloadPacketFileDataBlock {
    fn new_generated() -> Self {
        Self {
            sim_filename: Vec::new(),
            viewer_filename: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sim_filename.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.viewer_filename.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_filename = reader.read_variable(1)?;
        self.viewer_filename = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.sim_filename, 1)?;
        writer.write_variable(&self.viewer_filename, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimFilename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sim_filename.clone()),
        )?;
        map.add_with_string_osd(
            "ViewerFilename".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.viewer_filename.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimFilename") {
            self.sim_filename = value.as_binary()?;
        }
        if let Some(value) = map.get("ViewerFilename") {
            self.viewer_filename = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SystemMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self {
            method: Vec::new(),
            invoice: libremetaverse_types::UUID::zero(),
            digest: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 48_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.method.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_variable(1)?;
        self.invoice = reader.read_uuid()?;
        self.digest = reader.read_bytes(32, "truncated fixed packet field")?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.method, 1)?;
        writer.write_uuid(&self.invoice)?;
        writer.write_fixed(&self.digest, 32)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.method.clone()),
        )?;
        map.add_with_string_osd(
            "Invoice".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.invoice),
        )?;
        map.add_with_string_osd(
            "Digest".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.digest.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_binary()?;
        }
        if let Some(value) = map.get("Invoice") {
            self.invoice = value.as_uuid()?;
        }
        if let Some(value) = map.get("Digest") {
            self.digest = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SystemMessagePacketParamListBlock {
    fn new_generated() -> Self {
        Self { parameter: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.parameter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parameter = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.parameter, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Parameter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.parameter.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Parameter") {
            self.parameter = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapLayerRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapLayerReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapLayerReplyPacketLayerDataBlock {
    fn new_generated() -> Self {
        Self {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0,
            image_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.left = reader.read_u32_le()?;
        self.right = reader.read_u32_le()?;
        self.top = reader.read_u32_le()?;
        self.bottom = reader.read_u32_le()?;
        self.image_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.left)?;
        writer.write_u32_le(self.right)?;
        writer.write_u32_le(self.top)?;
        writer.write_u32_le(self.bottom)?;
        writer.write_uuid(&self.image_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Left".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.left.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Right".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.right.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Top".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.top.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Bottom".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.bottom.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.image_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Left") {
            self.left = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Right") {
            self.right = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Top") {
            self.top = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Bottom") {
            self.bottom = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ImageID") {
            self.image_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapBlockRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapBlockRequestPacketPositionDataBlock {
    fn new_generated() -> Self {
        Self {
            min_x: 0,
            max_x: 0,
            min_y: 0,
            max_y: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.min_x = reader.read_u16_le()?;
        self.max_x = reader.read_u16_le()?;
        self.min_y = reader.read_u16_le()?;
        self.max_y = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_le(self.min_x)?;
        writer.write_u16_le(self.max_x)?;
        writer.write_u16_le(self.min_y)?;
        writer.write_u16_le(self.max_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MinX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.min_x)),
        )?;
        map.add_with_string_osd(
            "MaxX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.max_x)),
        )?;
        map.add_with_string_osd(
            "MinY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.min_y)),
        )?;
        map.add_with_string_osd(
            "MaxY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.max_y)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MinX") {
            self.min_x = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("MaxX") {
            self.max_x = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("MinY") {
            self.min_y = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("MaxY") {
            self.max_y = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapNameRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapNameRequestPacketNameDataBlock {
    fn new_generated() -> Self {
        Self { name: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapBlockReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapBlockReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            x: 0,
            y: 0,
            name: Vec::new(),
            access: 0,
            region_flags: 0,
            water_height: 0,
            agents: 0,
            map_image_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 27_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.x = reader.read_u16_le()?;
        self.y = reader.read_u16_le()?;
        self.name = reader.read_variable(1)?;
        self.access = reader.read_u8()?;
        self.region_flags = reader.read_u32_le()?;
        self.water_height = reader.read_u8()?;
        self.agents = reader.read_u8()?;
        self.map_image_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_le(self.x)?;
        writer.write_u16_le(self.y)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(self.access)?;
        writer.write_u32_le(self.region_flags)?;
        writer.write_u8(self.water_height)?;
        writer.write_u8(self.agents)?;
        writer.write_uuid(&self.map_image_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "X".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.x)),
        )?;
        map.add_with_string_osd(
            "Y".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.y)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Access".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.access)),
        )?;
        map.add_with_string_osd(
            "RegionFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "WaterHeight".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.water_height)),
        )?;
        map.add_with_string_osd(
            "Agents".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.agents)),
        )?;
        map.add_with_string_osd(
            "MapImageID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.map_image_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("X") {
            self.x = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("Y") {
            self.y = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Access") {
            self.access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RegionFlags") {
            self.region_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("WaterHeight") {
            self.water_height = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Agents") {
            self.agents = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("MapImageID") {
            self.map_image_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapBlockReplyPacketSizeBlock {
    fn new_generated() -> Self {
        Self { size_x: 0, size_y: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.size_x = reader.read_u16_le()?;
        self.size_y = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_le(self.size_x)?;
        writer.write_u16_le(self.size_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SizeX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.size_x)),
        )?;
        map.add_with_string_osd(
            "SizeY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.size_y)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SizeX") {
            self.size_x = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("SizeY") {
            self.size_y = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapItemRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            flags: 0,
            estate_id: 0,
            godlike: false,
        }
    }
    fn generated_length(&self) -> i32 {
        41_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        self.estate_id = reader.read_u32_le()?;
        self.godlike = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.estate_id)?;
        writer.write_u8(u8::from(self.godlike))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EstateID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.estate_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Godlike".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.godlike),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EstateID") {
            self.estate_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Godlike") {
            self.godlike = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapItemRequestPacketRequestDataBlock {
    fn new_generated() -> Self {
        Self {
            item_type: 0,
            region_handle: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_type = reader.read_u32_le()?;
        self.region_handle = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.item_type)?;
        writer.write_u64_le(self.region_handle)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_type.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemType") {
            self.item_type = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapItemReplyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapItemReplyPacketRequestDataBlock {
    fn new_generated() -> Self {
        Self { item_type: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_type = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.item_type)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.item_type.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemType") {
            self.item_type = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MapItemReplyPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            x: 0,
            y: 0,
            id: libremetaverse_types::UUID::zero(),
            extra: 0,
            extra2: 0,
            name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 32_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.x = reader.read_u32_le()?;
        self.y = reader.read_u32_le()?;
        self.id = reader.read_uuid()?;
        self.extra = reader.read_i32_le()?;
        self.extra2 = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.x)?;
        writer.write_u32_le(self.y)?;
        writer.write_uuid(&self.id)?;
        writer.write_i32_le(self.extra)?;
        writer.write_i32_le(self.extra2)?;
        writer.write_variable(&self.name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "X".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.x.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Y".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.y.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Extra".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.extra),
        )?;
        map.add_with_string_osd(
            "Extra2".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.extra2),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("X") {
            self.x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Y") {
            self.y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Extra") {
            self.extra = value.as_integer()?;
        }
        if let Some(value) = map.get("Extra2") {
            self.extra2 = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SendPostcardPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            asset_id: libremetaverse_types::UUID::zero(),
            pos_global: libremetaverse_types::Vector3d::zero(),
            to: Vec::new(),
            from_: Vec::new(),
            name: Vec::new(),
            subject: Vec::new(),
            msg: Vec::new(),
            allow_publish: false,
            mature_publish: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 74_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.to.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.from_.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.subject.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.msg.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.asset_id = reader.read_uuid()?;
        self.pos_global = reader.read_vector3d()?;
        self.to = reader.read_variable(1)?;
        self.from_ = reader.read_variable(1)?;
        self.name = reader.read_variable(1)?;
        self.subject = reader.read_variable(1)?;
        self.msg = reader.read_variable(2)?;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.asset_id)?;
        writer.write_vector3d(&self.pos_global)?;
        writer.write_variable(&self.to, 1)?;
        writer.write_variable(&self.from_, 1)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.subject, 1)?;
        writer.write_variable(&self.msg, 2)?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AssetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.asset_id),
        )?;
        map.add_with_string_osd(
            "PosGlobal".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3d(self.pos_global)?,
        )?;
        map.add_with_string_osd(
            "To".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.to.clone()),
        )?;
        map.add_with_string_osd(
            "From".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_.clone()),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Subject".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.subject.clone()),
        )?;
        map.add_with_string_osd(
            "Msg".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.msg.clone()),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AssetID") {
            self.asset_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PosGlobal") {
            self.pos_global = value.as_vector3d()?;
        }
        if let Some(value) = map.get("To") {
            self.to = value.as_binary()?;
        }
        if let Some(value) = map.get("From") {
            self.from_ = value.as_binary()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Subject") {
            self.subject = value.as_binary()?;
        }
        if let Some(value) = map.get("Msg") {
            self.msg = value.as_binary()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RpcChannelRequestPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            grid_x: 0,
            grid_y: 0,
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        40_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RpcChannelReplyPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            channel_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.channel_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.channel_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "ChannelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.channel_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelID") {
            self.channel_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RpcScriptRequestInboundPacketTargetBlockBlock {
    fn new_generated() -> Self {
        Self { grid_x: 0, grid_y: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.grid_x = reader.read_u32_le()?;
        self.grid_y = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.grid_x)?;
        writer.write_u32_le(self.grid_y)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GridX".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_x.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GridY".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.grid_y.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GridX") {
            self.grid_x = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GridY") {
            self.grid_y = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RpcScriptRequestInboundPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            channel_id: libremetaverse_types::UUID::zero(),
            int_value: 0,
            string_value: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.string_value.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.channel_id = reader.read_uuid()?;
        self.int_value = reader.read_u32_le()?;
        self.string_value = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.channel_id)?;
        writer.write_u32_le(self.int_value)?;
        writer.write_variable(&self.string_value, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "ChannelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.channel_id),
        )?;
        map.add_with_string_osd(
            "IntValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.int_value.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "StringValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.string_value.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelID") {
            self.channel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntValue") {
            self.int_value = osd_u32(&value)?;
        }
        if let Some(value) = map.get("StringValue") {
            self.string_value = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RpcScriptRequestInboundForwardPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            rpc_server_ip: 0,
            rpc_server_port: 0,
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            channel_id: libremetaverse_types::UUID::zero(),
            int_value: 0,
            string_value: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 58_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.string_value.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.rpc_server_ip = reader.read_u32_le()?;
        self.rpc_server_port = reader.read_u16_be()?;
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.channel_id = reader.read_uuid()?;
        self.int_value = reader.read_u32_le()?;
        self.string_value = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.rpc_server_ip)?;
        writer.write_u16_be(self.rpc_server_port)?;
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.channel_id)?;
        writer.write_u32_le(self.int_value)?;
        writer.write_variable(&self.string_value, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RPCServerIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.rpc_server_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RPCServerPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.rpc_server_port)),
        )?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "ChannelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.channel_id),
        )?;
        map.add_with_string_osd(
            "IntValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.int_value.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "StringValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.string_value.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RPCServerIP") {
            self.rpc_server_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RPCServerPort") {
            self.rpc_server_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelID") {
            self.channel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntValue") {
            self.int_value = osd_u32(&value)?;
        }
        if let Some(value) = map.get("StringValue") {
            self.string_value = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RpcScriptReplyInboundPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            item_id: libremetaverse_types::UUID::zero(),
            channel_id: libremetaverse_types::UUID::zero(),
            int_value: 0,
            string_value: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 52_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.string_value.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.item_id = reader.read_uuid()?;
        self.channel_id = reader.read_uuid()?;
        self.int_value = reader.read_u32_le()?;
        self.string_value = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.channel_id)?;
        writer.write_u32_le(self.int_value)?;
        writer.write_variable(&self.string_value, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "ChannelID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.channel_id),
        )?;
        map.add_with_string_osd(
            "IntValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.int_value.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "StringValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.string_value.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelID") {
            self.channel_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IntValue") {
            self.int_value = osd_u32(&value)?;
        }
        if let Some(value) = map.get("StringValue") {
            self.string_value = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ScriptMailRegistrationPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            target_ip: Vec::new(),
            target_port: 0,
            task_id: libremetaverse_types::UUID::zero(),
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 22_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.target_ip.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_ip = reader.read_variable(1)?;
        self.target_port = reader.read_u16_be()?;
        self.task_id = reader.read_uuid()?;
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.target_ip, 1)?;
        writer.write_u16_be(self.target_port)?;
        writer.write_uuid(&self.task_id)?;
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.target_ip.clone()),
        )?;
        map.add_with_string_osd(
            "TargetPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.target_port)),
        )?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetIP") {
            self.target_ip = value.as_binary()?;
        }
        if let Some(value) = map.get("TargetPort") {
            self.target_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::ParcelMediaCommandMessagePacketCommandBlockBlock {
    fn new_generated() -> Self {
        Self {
            flags: 0,
            command: 0,
            time: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        self.command = reader.read_u32_le()?;
        self.time = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        writer.write_u32_le(self.command)?;
        writer.write_f32_le(self.time)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Command".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.command.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Time".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.time)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Command") {
            self.command = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Time") {
            self.time = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelMediaUpdatePacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            media_url: Vec::new(),
            media_id: libremetaverse_types::UUID::zero(),
            media_auto_scale: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 17_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.media_url = reader.read_variable(1)?;
        self.media_id = reader.read_uuid()?;
        self.media_auto_scale = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.media_url, 1)?;
        writer.write_uuid(&self.media_id)?;
        writer.write_u8(self.media_auto_scale)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MediaURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_url.clone()),
        )?;
        map.add_with_string_osd(
            "MediaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.media_id),
        )?;
        map.add_with_string_osd(
            "MediaAutoScale".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.media_auto_scale),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MediaURL") {
            self.media_url = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaID") {
            self.media_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MediaAutoScale") {
            self.media_auto_scale = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelMediaUpdatePacketDataBlockExtendedBlock {
    fn new_generated() -> Self {
        Self {
            media_type: Vec::new(),
            media_desc: Vec::new(),
            media_width: 0,
            media_height: 0,
            media_loop: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 9_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_type.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_desc.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.media_type = reader.read_variable(1)?;
        self.media_desc = reader.read_variable(1)?;
        self.media_width = reader.read_i32_le()?;
        self.media_height = reader.read_i32_le()?;
        self.media_loop = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.media_type, 1)?;
        writer.write_variable(&self.media_desc, 1)?;
        writer.write_i32_le(self.media_width)?;
        writer.write_i32_le(self.media_height)?;
        writer.write_u8(self.media_loop)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "MediaType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_type.clone()),
        )?;
        map.add_with_string_osd(
            "MediaDesc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_desc.clone()),
        )?;
        map.add_with_string_osd(
            "MediaWidth".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.media_width),
        )?;
        map.add_with_string_osd(
            "MediaHeight".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.media_height),
        )?;
        map.add_with_string_osd(
            "MediaLoop".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.media_loop)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("MediaType") {
            self.media_type = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaDesc") {
            self.media_desc = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaWidth") {
            self.media_width = value.as_integer()?;
        }
        if let Some(value) = map.get("MediaHeight") {
            self.media_height = value.as_integer()?;
        }
        if let Some(value) = map.get("MediaLoop") {
            self.media_loop = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LandStatRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LandStatRequestPacketRequestDataBlock {
    fn new_generated() -> Self {
        Self {
            report_type: 0,
            request_flags: 0,
            filter: Vec::new(),
            parcel_local_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 12_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.filter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.report_type = reader.read_u32_le()?;
        self.request_flags = reader.read_u32_le()?;
        self.filter = reader.read_variable(1)?;
        self.parcel_local_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.report_type)?;
        writer.write_u32_le(self.request_flags)?;
        writer.write_variable(&self.filter, 1)?;
        writer.write_i32_le(self.parcel_local_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ReportType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.report_type.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RequestFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.request_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Filter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.filter.clone()),
        )?;
        map.add_with_string_osd(
            "ParcelLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.parcel_local_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ReportType") {
            self.report_type = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RequestFlags") {
            self.request_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Filter") {
            self.filter = value.as_binary()?;
        }
        if let Some(value) = map.get("ParcelLocalID") {
            self.parcel_local_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LandStatReplyPacketRequestDataBlock {
    fn new_generated() -> Self {
        Self {
            report_type: 0,
            request_flags: 0,
            total_object_count: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.report_type = reader.read_u32_le()?;
        self.request_flags = reader.read_u32_le()?;
        self.total_object_count = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.report_type)?;
        writer.write_u32_le(self.request_flags)?;
        writer.write_u32_le(self.total_object_count)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ReportType".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.report_type.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "RequestFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.request_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TotalObjectCount".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.total_object_count.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ReportType") {
            self.report_type = osd_u32(&value)?;
        }
        if let Some(value) = map.get("RequestFlags") {
            self.request_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TotalObjectCount") {
            self.total_object_count = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LandStatReplyPacketReportDataBlock {
    fn new_generated() -> Self {
        Self {
            task_local_id: 0,
            task_id: libremetaverse_types::UUID::zero(),
            location_x: 0.0_f32,
            location_y: 0.0_f32,
            location_z: 0.0_f32,
            score: 0.0_f32,
            task_name: Vec::new(),
            owner_name: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 36_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.task_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.owner_name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_local_id = reader.read_u32_le()?;
        self.task_id = reader.read_uuid()?;
        self.location_x = reader.read_f32_le()?;
        self.location_y = reader.read_f32_le()?;
        self.location_z = reader.read_f32_le()?;
        self.score = reader.read_f32_le()?;
        self.task_name = reader.read_variable(1)?;
        self.owner_name = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.task_local_id)?;
        writer.write_uuid(&self.task_id)?;
        writer.write_f32_le(self.location_x)?;
        writer.write_f32_le(self.location_y)?;
        writer.write_f32_le(self.location_z)?;
        writer.write_f32_le(self.score)?;
        writer.write_variable(&self.task_name, 1)?;
        writer.write_variable(&self.owner_name, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.task_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "LocationX".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.location_x)),
        )?;
        map.add_with_string_osd(
            "LocationY".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.location_y)),
        )?;
        map.add_with_string_osd(
            "LocationZ".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.location_z)),
        )?;
        map.add_with_string_osd(
            "Score".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.score)),
        )?;
        map.add_with_string_osd(
            "TaskName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.task_name.clone()),
        )?;
        map.add_with_string_osd(
            "OwnerName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.owner_name.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskLocalID") {
            self.task_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LocationX") {
            self.location_x = value.as_real()? as f32;
        }
        if let Some(value) = map.get("LocationY") {
            self.location_y = value.as_real()? as f32;
        }
        if let Some(value) = map.get("LocationZ") {
            self.location_z = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Score") {
            self.score = value.as_real()? as f32;
        }
        if let Some(value) = map.get("TaskName") {
            self.task_name = value.as_binary()?;
        }
        if let Some(value) = map.get("OwnerName") {
            self.owner_name = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ErrorPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ErrorPacketDataBlock {
    fn new_generated() -> Self {
        Self {
            code: 0,
            token: Vec::new(),
            id: libremetaverse_types::UUID::zero(),
            system: Vec::new(),
            message: Vec::new(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 20_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.token.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.system.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.message.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.code = reader.read_i32_le()?;
        self.token = reader.read_variable(1)?;
        self.id = reader.read_uuid()?;
        self.system = reader.read_variable(1)?;
        self.message = reader.read_variable(2)?;
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.code)?;
        writer.write_variable(&self.token, 1)?;
        writer.write_uuid(&self.id)?;
        writer.write_variable(&self.system, 1)?;
        writer.write_variable(&self.message, 2)?;
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Code".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.code),
        )?;
        map.add_with_string_osd(
            "Token".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.token.clone()),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "System".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.system.clone()),
        )?;
        map.add_with_string_osd(
            "Message".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.message.clone()),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Code") {
            self.code = value.as_integer()?;
        }
        if let Some(value) = map.get("Token") {
            self.token = value.as_binary()?;
        }
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("System") {
            self.system = value.as_binary()?;
        }
        if let Some(value) = map.get("Message") {
            self.message = value.as_binary()?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectIncludeInSearchPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectIncludeInSearchPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            include_in_search: false,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.include_in_search = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(u8::from(self.include_in_search))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "IncludeInSearch".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.include_in_search),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("IncludeInSearch") {
            self.include_in_search = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezRestoreToWorldPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RezRestoreToWorldPacketInventoryDataBlock {
    fn new_generated() -> Self {
        Self {
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            group_owned: false,
            transaction_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            flags: 0,
            sale_type: 0,
            sale_price: 0,
            name: Vec::new(),
            description: Vec::new(),
            creation_date: 0,
            crc: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 136_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.group_owned = reader.read_u8()? != 0;
        self.transaction_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.flags = reader.read_u32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.creation_date = reader.read_i32_le()?;
        self.crc = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_u8(u8::from(self.group_owned))?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_u32_le(self.flags)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_i32_le(self.creation_date)?;
        writer.write_u32_le(self.crc)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.group_owned),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.creation_date),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupOwned") {
            self.group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = value.as_integer()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LinkInventoryItemPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LinkInventoryItemPacketInventoryBlockBlock {
    fn new_generated() -> Self {
        Self {
            callback_id: 0,
            folder_id: libremetaverse_types::UUID::zero(),
            transaction_id: libremetaverse_types::UUID::zero(),
            old_item_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            inv_type: 0,
            name: Vec::new(),
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 54_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.callback_id = reader.read_u32_le()?;
        self.folder_id = reader.read_uuid()?;
        self.transaction_id = reader.read_uuid()?;
        self.old_item_id = reader.read_uuid()?;
        self.type_ = reader.read_i8()?;
        self.inv_type = reader.read_i8()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.callback_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.transaction_id)?;
        writer.write_uuid(&self.old_item_id)?;
        writer.write_i8(self.type_)?;
        writer.write_i8(self.inv_type)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CallbackID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.callback_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "TransactionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transaction_id),
        )?;
        map.add_with_string_osd(
            "OldItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.old_item_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "InvType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.inv_type)),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CallbackID") {
            self.callback_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("TransactionID") {
            self.transaction_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OldItemID") {
            self.old_item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("InvType") {
            self.inv_type = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RetrieveIMsExtendedPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            is_premium: false,
        }
    }
    fn generated_length(&self) -> i32 {
        33_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.is_premium = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_u8(u8::from(self.is_premium))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "IsPremium".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_premium),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsPremium") {
            self.is_premium = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupRequestExtendedPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_limit: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_limit = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_i32_le(self.group_limit)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupLimit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_limit),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupLimit") {
            self.group_limit = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::JoinGroupRequestExtendedPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupRequestExtendedPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_limit: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        36_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_limit = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_i32_le(self.group_limit)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupLimit".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_limit),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupLimit") {
            self.group_limit = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CreateGroupRequestExtendedPacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            name: Vec::new(),
            charter: Vec::new(),
            show_in_list: false,
            insignia_id: libremetaverse_types::UUID::zero(),
            membership_fee: 0,
            open_enrollment: false,
            allow_publish: false,
            mature_publish: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 24_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.charter.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.name = reader.read_variable(1)?;
        self.charter = reader.read_variable(2)?;
        self.show_in_list = reader.read_u8()? != 0;
        self.insignia_id = reader.read_uuid()?;
        self.membership_fee = reader.read_i32_le()?;
        self.open_enrollment = reader.read_u8()? != 0;
        self.allow_publish = reader.read_u8()? != 0;
        self.mature_publish = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.charter, 2)?;
        writer.write_u8(u8::from(self.show_in_list))?;
        writer.write_uuid(&self.insignia_id)?;
        writer.write_i32_le(self.membership_fee)?;
        writer.write_u8(u8::from(self.open_enrollment))?;
        writer.write_u8(u8::from(self.allow_publish))?;
        writer.write_u8(u8::from(self.mature_publish))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Charter".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.charter.clone()),
        )?;
        map.add_with_string_osd(
            "ShowInList".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.show_in_list),
        )?;
        map.add_with_string_osd(
            "InsigniaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.insignia_id),
        )?;
        map.add_with_string_osd(
            "MembershipFee".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.membership_fee),
        )?;
        map.add_with_string_osd(
            "OpenEnrollment".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.open_enrollment),
        )?;
        map.add_with_string_osd(
            "AllowPublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.allow_publish),
        )?;
        map.add_with_string_osd(
            "MaturePublish".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.mature_publish),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Charter") {
            self.charter = value.as_binary()?;
        }
        if let Some(value) = map.get("ShowInList") {
            self.show_in_list = value.as_boolean()?;
        }
        if let Some(value) = map.get("InsigniaID") {
            self.insignia_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MembershipFee") {
            self.membership_fee = value.as_integer()?;
        }
        if let Some(value) = map.get("OpenEnrollment") {
            self.open_enrollment = value.as_boolean()?;
        }
        if let Some(value) = map.get("AllowPublish") {
            self.allow_publish = value.as_boolean()?;
        }
        if let Some(value) = map.get("MaturePublish") {
            self.mature_publish = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAddPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_uuid(&self.group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAddPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            p_code: 0,
            material: 0,
            add_flags: 0,
            path_curve: 0,
            profile_curve: 0,
            path_begin: 0,
            path_end: 0,
            path_scale_x: 0,
            path_scale_y: 0,
            path_shear_x: 0,
            path_shear_y: 0,
            path_twist: 0,
            path_twist_begin: 0,
            path_radius_offset: 0,
            path_taper_x: 0,
            path_taper_y: 0,
            path_revolutions: 0,
            path_skew: 0,
            profile_begin: 0,
            profile_end: 0,
            profile_hollow: 0,
            bypass_raycast: 0,
            ray_start: libremetaverse_types::Vector3::zero(),
            ray_end: libremetaverse_types::Vector3::zero(),
            ray_target_id: libremetaverse_types::UUID::zero(),
            ray_end_is_intersection: 0,
            scale: libremetaverse_types::Vector3::zero(),
            rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            state: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        96_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.p_code = reader.read_u8()?;
        self.material = reader.read_u8()?;
        self.add_flags = reader.read_u32_le()?;
        self.path_curve = reader.read_u8()?;
        self.profile_curve = reader.read_u8()?;
        self.path_begin = reader.read_u16_le()?;
        self.path_end = reader.read_u16_le()?;
        self.path_scale_x = reader.read_u8()?;
        self.path_scale_y = reader.read_u8()?;
        self.path_shear_x = reader.read_u8()?;
        self.path_shear_y = reader.read_u8()?;
        self.path_twist = reader.read_i8()?;
        self.path_twist_begin = reader.read_i8()?;
        self.path_radius_offset = reader.read_i8()?;
        self.path_taper_x = reader.read_i8()?;
        self.path_taper_y = reader.read_i8()?;
        self.path_revolutions = reader.read_u8()?;
        self.path_skew = reader.read_i8()?;
        self.profile_begin = reader.read_u16_le()?;
        self.profile_end = reader.read_u16_le()?;
        self.profile_hollow = reader.read_u16_le()?;
        self.bypass_raycast = reader.read_u8()?;
        self.ray_start = reader.read_vector3()?;
        self.ray_end = reader.read_vector3()?;
        self.ray_target_id = reader.read_uuid()?;
        self.ray_end_is_intersection = reader.read_u8()?;
        self.scale = reader.read_vector3()?;
        self.rotation = reader.read_quaternion()?;
        self.state = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.p_code)?;
        writer.write_u8(self.material)?;
        writer.write_u32_le(self.add_flags)?;
        writer.write_u8(self.path_curve)?;
        writer.write_u8(self.profile_curve)?;
        writer.write_u16_le(self.path_begin)?;
        writer.write_u16_le(self.path_end)?;
        writer.write_u8(self.path_scale_x)?;
        writer.write_u8(self.path_scale_y)?;
        writer.write_u8(self.path_shear_x)?;
        writer.write_u8(self.path_shear_y)?;
        writer.write_i8(self.path_twist)?;
        writer.write_i8(self.path_twist_begin)?;
        writer.write_i8(self.path_radius_offset)?;
        writer.write_i8(self.path_taper_x)?;
        writer.write_i8(self.path_taper_y)?;
        writer.write_u8(self.path_revolutions)?;
        writer.write_i8(self.path_skew)?;
        writer.write_u16_le(self.profile_begin)?;
        writer.write_u16_le(self.profile_end)?;
        writer.write_u16_le(self.profile_hollow)?;
        writer.write_u8(self.bypass_raycast)?;
        writer.write_vector3(&self.ray_start)?;
        writer.write_vector3(&self.ray_end)?;
        writer.write_uuid(&self.ray_target_id)?;
        writer.write_u8(self.ray_end_is_intersection)?;
        writer.write_vector3(&self.scale)?;
        writer.write_quaternion(&self.rotation)?;
        writer.write_u8(self.state)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PCode".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.p_code)),
        )?;
        map.add_with_string_osd(
            "Material".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.material)),
        )?;
        map.add_with_string_osd(
            "AddFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.add_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PathCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_curve)),
        )?;
        map.add_with_string_osd(
            "ProfileCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_curve)),
        )?;
        map.add_with_string_osd(
            "PathBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_begin)),
        )?;
        map.add_with_string_osd(
            "PathEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_end)),
        )?;
        map.add_with_string_osd(
            "PathScaleX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_x)),
        )?;
        map.add_with_string_osd(
            "PathScaleY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_y)),
        )?;
        map.add_with_string_osd(
            "PathShearX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_x)),
        )?;
        map.add_with_string_osd(
            "PathShearY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_y)),
        )?;
        map.add_with_string_osd(
            "PathTwist".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_twist)),
        )?;
        map.add_with_string_osd(
            "PathTwistBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_twist_begin),
            ),
        )?;
        map.add_with_string_osd(
            "PathRadiusOffset".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_radius_offset),
            ),
        )?;
        map.add_with_string_osd(
            "PathTaperX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_x)),
        )?;
        map.add_with_string_osd(
            "PathTaperY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_y)),
        )?;
        map.add_with_string_osd(
            "PathRevolutions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_revolutions),
            ),
        )?;
        map.add_with_string_osd(
            "PathSkew".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_skew)),
        )?;
        map.add_with_string_osd(
            "ProfileBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_begin)),
        )?;
        map.add_with_string_osd(
            "ProfileEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_end)),
        )?;
        map.add_with_string_osd(
            "ProfileHollow".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_hollow)),
        )?;
        map.add_with_string_osd(
            "BypassRaycast".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.bypass_raycast)),
        )?;
        map.add_with_string_osd(
            "RayStart".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_start)?,
        )?;
        map.add_with_string_osd(
            "RayEnd".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.ray_end)?,
        )?;
        map.add_with_string_osd(
            "RayTargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.ray_target_id),
        )?;
        map.add_with_string_osd(
            "RayEndIsIntersection".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.ray_end_is_intersection),
            ),
        )?;
        map.add_with_string_osd(
            "Scale".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.scale)?,
        )?;
        map.add_with_string_osd(
            "Rotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.rotation)?,
        )?;
        map.add_with_string_osd(
            "State".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.state)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PCode") {
            self.p_code = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Material") {
            self.material = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AddFlags") {
            self.add_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PathCurve") {
            self.path_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ProfileCurve") {
            self.profile_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathBegin") {
            self.path_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathEnd") {
            self.path_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathScaleX") {
            self.path_scale_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathScaleY") {
            self.path_scale_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearX") {
            self.path_shear_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearY") {
            self.path_shear_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathTwist") {
            self.path_twist = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTwistBegin") {
            self.path_twist_begin = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRadiusOffset") {
            self.path_radius_offset = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperX") {
            self.path_taper_x = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperY") {
            self.path_taper_y = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRevolutions") {
            self.path_revolutions = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathSkew") {
            self.path_skew = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("ProfileBegin") {
            self.profile_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileEnd") {
            self.profile_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileHollow") {
            self.profile_hollow = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("BypassRaycast") {
            self.bypass_raycast = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RayStart") {
            self.ray_start = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayEnd") {
            self.ray_end = value.as_vector3()?;
        }
        if let Some(value) = map.get("RayTargetID") {
            self.ray_target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("RayEndIsIntersection") {
            self.ray_end_is_intersection = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Scale") {
            self.scale = value.as_vector3()?;
        }
        if let Some(value) = map.get("Rotation") {
            self.rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("State") {
            self.state = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MultipleObjectUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::MultipleObjectUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            type_: 0,
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 5_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.type_ = reader.read_u8()?;
        self.data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_u8(self.type_)?;
        writer.write_variable(&self.data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestMultipleObjectsPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestMultipleObjectsPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { cache_miss_type: 0, id: 0 }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.cache_miss_type = reader.read_u8()?;
        self.id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.cache_miss_type)?;
        writer.write_u32_le(self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CacheMissType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.cache_miss_type)),
        )?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CacheMissType") {
            self.cache_miss_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ID") {
            self.id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPositionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPositionPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_local_id: 0,
            position: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_local_id = reader.read_u32_le()?;
        self.position = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.object_local_id)?;
        writer.write_vector3(&self.position)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectLocalID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.object_local_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectLocalID") {
            self.object_local_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RequestObjectPropertiesFamilyPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::RequestObjectPropertiesFamilyPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            request_flags: 0,
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_flags = reader.read_u32_le()?;
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.request_flags)?;
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.request_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestFlags") {
            self.request_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CoarseLocationUpdatePacketLocationBlock {
    fn new_generated() -> Self {
        Self { x: 0, y: 0, z: 0 }
    }
    fn generated_length(&self) -> i32 {
        3_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.x = reader.read_u8()?;
        self.y = reader.read_u8()?;
        self.z = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.x)?;
        writer.write_u8(self.y)?;
        writer.write_u8(self.z)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "X".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.x)),
        )?;
        map.add_with_string_osd(
            "Y".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.y)),
        )?;
        map.add_with_string_osd(
            "Z".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.z)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("X") {
            self.x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Y") {
            self.y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Z") {
            self.z = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CoarseLocationUpdatePacketIndexBlock {
    fn new_generated() -> Self {
        Self { you: 0, prey: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.you = reader.read_i16_le()?;
        self.prey = reader.read_i16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i16_le(self.you)?;
        writer.write_i16_le(self.prey)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "You".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.you)),
        )?;
        map.add_with_string_osd(
            "Prey".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.prey)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("You") {
            self.you = value.as_integer()? as i16;
        }
        if let Some(value) = map.get("Prey") {
            self.prey = value.as_integer()? as i16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CoarseLocationUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CrossedRegionPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CrossedRegionPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            sim_ip: 0,
            sim_port: 0,
            region_handle: 0,
            seed_capability: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 14_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.seed_capability.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sim_ip = reader.read_u32_le()?;
        self.sim_port = reader.read_u16_be()?;
        self.region_handle = reader.read_u64_le()?;
        self.seed_capability = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.sim_ip)?;
        writer.write_u16_be(self.sim_port)?;
        writer.write_u64_le(self.region_handle)?;
        writer.write_variable(&self.seed_capability, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SimIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.sim_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SimPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_port)),
        )?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SeedCapability".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.seed_capability.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SimIP") {
            self.sim_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SimPort") {
            self.sim_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("SeedCapability") {
            self.seed_capability = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CrossedRegionPacketInfoBlock {
    fn new_generated() -> Self {
        Self {
            position: libremetaverse_types::Vector3::zero(),
            look_at: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        24_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.position = reader.read_vector3()?;
        self.look_at = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector3(&self.position)?;
        writer.write_vector3(&self.look_at)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "LookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.look_at)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("LookAt") {
            self.look_at = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ConfirmEnableSimulatorPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPropertiesPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            creator_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            creation_date: 0,
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            ownership_cost: 0,
            sale_type: 0,
            sale_price: 0,
            aggregate_perms: 0,
            aggregate_perm_textures: 0,
            aggregate_perm_textures_owner: 0,
            category: 0,
            inventory_serial: 0,
            item_id: libremetaverse_types::UUID::zero(),
            folder_id: libremetaverse_types::UUID::zero(),
            from_task_id: libremetaverse_types::UUID::zero(),
            last_owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            description: Vec::new(),
            touch_name: Vec::new(),
            sit_name: Vec::new(),
            texture_id: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 174_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.touch_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.sit_name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.texture_id.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.creator_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.creation_date = reader.read_u64_le()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.ownership_cost = reader.read_i32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.aggregate_perms = reader.read_u8()?;
        self.aggregate_perm_textures = reader.read_u8()?;
        self.aggregate_perm_textures_owner = reader.read_u8()?;
        self.category = reader.read_u32_le()?;
        self.inventory_serial = reader.read_i16_le()?;
        self.item_id = reader.read_uuid()?;
        self.folder_id = reader.read_uuid()?;
        self.from_task_id = reader.read_uuid()?;
        self.last_owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        self.touch_name = reader.read_variable(1)?;
        self.sit_name = reader.read_variable(1)?;
        self.texture_id = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.creator_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u64_le(self.creation_date)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_i32_le(self.ownership_cost)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_u8(self.aggregate_perms)?;
        writer.write_u8(self.aggregate_perm_textures)?;
        writer.write_u8(self.aggregate_perm_textures_owner)?;
        writer.write_u32_le(self.category)?;
        writer.write_i16_le(self.inventory_serial)?;
        writer.write_uuid(&self.item_id)?;
        writer.write_uuid(&self.folder_id)?;
        writer.write_uuid(&self.from_task_id)?;
        writer.write_uuid(&self.last_owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        writer.write_variable(&self.touch_name, 1)?;
        writer.write_variable(&self.sit_name, 1)?;
        writer.write_variable(&self.texture_id, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "CreatorID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.creator_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "CreationDate".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.creation_date.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnershipCost".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.ownership_cost),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "AggregatePerms".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.aggregate_perms)),
        )?;
        map.add_with_string_osd(
            "AggregatePermTextures".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_textures),
            ),
        )?;
        map.add_with_string_osd(
            "AggregatePermTexturesOwner".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.aggregate_perm_textures_owner),
            ),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "InventorySerial".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.inventory_serial),
            ),
        )?;
        map.add_with_string_osd(
            "ItemID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.item_id),
        )?;
        map.add_with_string_osd(
            "FolderID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.folder_id),
        )?;
        map.add_with_string_osd(
            "FromTaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.from_task_id),
        )?;
        map.add_with_string_osd(
            "LastOwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.last_owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        map.add_with_string_osd(
            "TouchName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.touch_name.clone()),
        )?;
        map.add_with_string_osd(
            "SitName".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.sit_name.clone()),
        )?;
        map.add_with_string_osd(
            "TextureID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_id.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreatorID") {
            self.creator_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CreationDate") {
            self.creation_date = osd_u64(&value)?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnershipCost") {
            self.ownership_cost = value.as_integer()?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("AggregatePerms") {
            self.aggregate_perms = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AggregatePermTextures") {
            self.aggregate_perm_textures = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AggregatePermTexturesOwner") {
            self.aggregate_perm_textures_owner = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("InventorySerial") {
            self.inventory_serial = value.as_integer()? as i16;
        }
        if let Some(value) = map.get("ItemID") {
            self.item_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FolderID") {
            self.folder_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("FromTaskID") {
            self.from_task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("LastOwnerID") {
            self.last_owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        if let Some(value) = map.get("TouchName") {
            self.touch_name = value.as_binary()?;
        }
        if let Some(value) = map.get("SitName") {
            self.sit_name = value.as_binary()?;
        }
        if let Some(value) = map.get("TextureID") {
            self.texture_id = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectPropertiesFamilyPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            request_flags: 0,
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            group_id: libremetaverse_types::UUID::zero(),
            base_mask: 0,
            owner_mask: 0,
            group_mask: 0,
            everyone_mask: 0,
            next_owner_mask: 0,
            ownership_cost: 0,
            sale_type: 0,
            sale_price: 0,
            category: 0,
            last_owner_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            description: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 101_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.description.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_flags = reader.read_u32_le()?;
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.group_id = reader.read_uuid()?;
        self.base_mask = reader.read_u32_le()?;
        self.owner_mask = reader.read_u32_le()?;
        self.group_mask = reader.read_u32_le()?;
        self.everyone_mask = reader.read_u32_le()?;
        self.next_owner_mask = reader.read_u32_le()?;
        self.ownership_cost = reader.read_i32_le()?;
        self.sale_type = reader.read_u8()?;
        self.sale_price = reader.read_i32_le()?;
        self.category = reader.read_u32_le()?;
        self.last_owner_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.description = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.request_flags)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_u32_le(self.base_mask)?;
        writer.write_u32_le(self.owner_mask)?;
        writer.write_u32_le(self.group_mask)?;
        writer.write_u32_le(self.everyone_mask)?;
        writer.write_u32_le(self.next_owner_mask)?;
        writer.write_i32_le(self.ownership_cost)?;
        writer.write_u8(self.sale_type)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_u32_le(self.category)?;
        writer.write_uuid(&self.last_owner_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.description, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.request_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "BaseMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.base_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "GroupMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EveryoneMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.everyone_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "NextOwnerMask".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.next_owner_mask.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "OwnershipCost".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.ownership_cost),
        )?;
        map.add_with_string_osd(
            "SaleType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sale_type)),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.category.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "LastOwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.last_owner_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Description".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.description.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestFlags") {
            self.request_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BaseMask") {
            self.base_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnerMask") {
            self.owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("GroupMask") {
            self.group_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EveryoneMask") {
            self.everyone_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("NextOwnerMask") {
            self.next_owner_mask = osd_u32(&value)?;
        }
        if let Some(value) = map.get("OwnershipCost") {
            self.ownership_cost = value.as_integer()?;
        }
        if let Some(value) = map.get("SaleType") {
            self.sale_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Category") {
            self.category = osd_u32(&value)?;
        }
        if let Some(value) = map.get("LastOwnerID") {
            self.last_owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Description") {
            self.description = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesRequestPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesRequestPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            sequence_id: 0,
            west: 0.0_f32,
            south: 0.0_f32,
            east: 0.0_f32,
            north: 0.0_f32,
            snap_selection: false,
        }
    }
    fn generated_length(&self) -> i32 {
        21_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sequence_id = reader.read_i32_le()?;
        self.west = reader.read_f32_le()?;
        self.south = reader.read_f32_le()?;
        self.east = reader.read_f32_le()?;
        self.north = reader.read_f32_le()?;
        self.snap_selection = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.sequence_id)?;
        writer.write_f32_le(self.west)?;
        writer.write_f32_le(self.south)?;
        writer.write_f32_le(self.east)?;
        writer.write_f32_le(self.north)?;
        writer.write_u8(u8::from(self.snap_selection))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "West".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.west)),
        )?;
        map.add_with_string_osd(
            "South".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.south)),
        )?;
        map.add_with_string_osd(
            "East".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.east)),
        )?;
        map.add_with_string_osd(
            "North".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.north)),
        )?;
        map.add_with_string_osd(
            "SnapSelection".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.snap_selection),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("West") {
            self.west = value.as_real()? as f32;
        }
        if let Some(value) = map.get("South") {
            self.south = value.as_real()? as f32;
        }
        if let Some(value) = map.get("East") {
            self.east = value.as_real()? as f32;
        }
        if let Some(value) = map.get("North") {
            self.north = value.as_real()? as f32;
        }
        if let Some(value) = map.get("SnapSelection") {
            self.snap_selection = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatusPacketSimStatusBlock {
    fn new_generated() -> Self {
        Self {
            can_accept_agents: false,
            can_accept_tasks: false,
        }
    }
    fn generated_length(&self) -> i32 {
        2_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.can_accept_agents = reader.read_u8()? != 0;
        self.can_accept_tasks = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.can_accept_agents))?;
        writer.write_u8(u8::from(self.can_accept_tasks))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "CanAcceptAgents".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.can_accept_agents),
        )?;
        map.add_with_string_osd(
            "CanAcceptTasks".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.can_accept_tasks),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("CanAcceptAgents") {
            self.can_accept_agents = value.as_boolean()?;
        }
        if let Some(value) = map.get("CanAcceptTasks") {
            self.can_accept_tasks = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SimStatusPacketSimFlagsBlock {
    fn new_generated() -> Self {
        Self { flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        8_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u64_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u64(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AttachedSoundPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            sound_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            gain: 0.0_f32,
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        53_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sound_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.gain = reader.read_f32_le()?;
        self.flags = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.sound_id)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_f32_le(self.gain)?;
        writer.write_u8(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SoundID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.sound_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Gain".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.gain)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SoundID") {
            self.sound_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Gain") {
            self.gain = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AttachedSoundGainChangePacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            gain: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.gain = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_f32_le(self.gain)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "Gain".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.gain)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Gain") {
            self.gain = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::PreloadSoundPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            sound_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        48_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.sound_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.sound_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "SoundID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.sound_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SoundID") {
            self.sound_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::InternalScriptMailPacketDataBlockBlock {
    fn new_generated() -> Self {
        Self {
            from_: Vec::new(),
            to: libremetaverse_types::UUID::zero(),
            subject: Vec::new(),
            body: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 16_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.from_.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.subject.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.body.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.from_ = reader.read_variable(1)?;
        self.to = reader.read_uuid()?;
        self.subject = reader.read_variable(1)?;
        self.body = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.from_, 1)?;
        writer.write_uuid(&self.to)?;
        writer.write_variable(&self.subject, 1)?;
        writer.write_variable(&self.body, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "From".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.from_.clone()),
        )?;
        map.add_with_string_osd(
            "To".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.to),
        )?;
        map.add_with_string_osd(
            "Subject".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.subject.clone()),
        )?;
        map.add_with_string_osd(
            "Body".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.body.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("From") {
            self.from_ = value.as_binary()?;
        }
        if let Some(value) = map.get("To") {
            self.to = value.as_uuid()?;
        }
        if let Some(value) = map.get("Subject") {
            self.subject = value.as_binary()?;
        }
        if let Some(value) = map.get("Body") {
            self.body = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerEffectPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ViewerEffectPacketEffectBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            agent_id: libremetaverse_types::UUID::zero(),
            type_: 0,
            duration: 0.0_f32,
            color: Vec::new(),
            type_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 41_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.type_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.agent_id = reader.read_uuid()?;
        self.type_ = reader.read_u8()?;
        self.duration = reader.read_f32_le()?;
        self.color = reader.read_bytes(4, "truncated fixed packet field")?;
        self.type_data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_u8(self.type_)?;
        writer.write_f32_le(self.duration)?;
        writer.write_fixed(&self.color, 4)?;
        writer.write_variable(&self.type_data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        map.add_with_string_osd(
            "Duration".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.duration)),
        )?;
        map.add_with_string_osd(
            "Color".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.color.clone()),
        )?;
        map.add_with_string_osd(
            "TypeData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.type_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Duration") {
            self.duration = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Color") {
            self.color = value.as_binary()?;
        }
        if let Some(value) = map.get("TypeData") {
            self.type_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::StartPingCheckPacketPingIDBlock {
    fn new_generated() -> Self {
        Self {
            ping_id: 0,
            oldest_unacked: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ping_id = reader.read_u8()?;
        self.oldest_unacked = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.ping_id)?;
        writer.write_u32_le(self.oldest_unacked)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PingID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.ping_id)),
        )?;
        map.add_with_string_osd(
            "OldestUnacked".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.oldest_unacked.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PingID") {
            self.ping_id = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("OldestUnacked") {
            self.oldest_unacked = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CompletePingCheckPacketPingIDBlock {
    fn new_generated() -> Self {
        Self { ping_id: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ping_id = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.ping_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "PingID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.ping_id)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("PingID") {
            self.ping_id = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::NeighborListPacketNeighborBlockBlock {
    fn new_generated() -> Self {
        Self {
            ip: 0,
            port: 0,
            public_ip: 0,
            public_port: 0,
            region_id: libremetaverse_types::UUID::zero(),
            name: Vec::new(),
            sim_access: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 29_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.ip = reader.read_u32_le()?;
        self.port = reader.read_u16_be()?;
        self.public_ip = reader.read_u32_le()?;
        self.public_port = reader.read_u16_be()?;
        self.region_id = reader.read_uuid()?;
        self.name = reader.read_variable(1)?;
        self.sim_access = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.ip)?;
        writer.write_u16_be(self.port)?;
        writer.write_u32_le(self.public_ip)?;
        writer.write_u16_be(self.public_port)?;
        writer.write_uuid(&self.region_id)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_u8(self.sim_access)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "IP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ip.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Port".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.port)),
        )?;
        map.add_with_string_osd(
            "PublicIP".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.public_ip.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PublicPort".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.public_port)),
        )?;
        map.add_with_string_osd(
            "RegionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.region_id),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "SimAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.sim_access)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("IP") {
            self.ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Port") {
            self.port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PublicIP") {
            self.public_ip = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PublicPort") {
            self.public_port = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("RegionID") {
            self.region_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("SimAccess") {
            self.sim_access = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            body_rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            head_rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            state: 0,
            camera_center: libremetaverse_types::Vector3::zero(),
            camera_at_axis: libremetaverse_types::Vector3::zero(),
            camera_left_axis: libremetaverse_types::Vector3::zero(),
            camera_up_axis: libremetaverse_types::Vector3::zero(),
            far: 0.0_f32,
            control_flags: 0,
            flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        114_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.body_rotation = reader.read_quaternion()?;
        self.head_rotation = reader.read_quaternion()?;
        self.state = reader.read_u8()?;
        self.camera_center = reader.read_vector3()?;
        self.camera_at_axis = reader.read_vector3()?;
        self.camera_left_axis = reader.read_vector3()?;
        self.camera_up_axis = reader.read_vector3()?;
        self.far = reader.read_f32_le()?;
        self.control_flags = reader.read_u32_le()?;
        self.flags = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_quaternion(&self.body_rotation)?;
        writer.write_quaternion(&self.head_rotation)?;
        writer.write_u8(self.state)?;
        writer.write_vector3(&self.camera_center)?;
        writer.write_vector3(&self.camera_at_axis)?;
        writer.write_vector3(&self.camera_left_axis)?;
        writer.write_vector3(&self.camera_up_axis)?;
        writer.write_f32_le(self.far)?;
        writer.write_u32_le(self.control_flags)?;
        writer.write_u8(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "BodyRotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.body_rotation)?,
        )?;
        map.add_with_string_osd(
            "HeadRotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.head_rotation)?,
        )?;
        map.add_with_string_osd(
            "State".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.state)),
        )?;
        map.add_with_string_osd(
            "CameraCenter".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_center)?,
        )?;
        map.add_with_string_osd(
            "CameraAtAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_at_axis)?,
        )?;
        map.add_with_string_osd(
            "CameraLeftAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_left_axis)?,
        )?;
        map.add_with_string_osd(
            "CameraUpAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_up_axis)?,
        )?;
        map.add_with_string_osd(
            "Far".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.far)),
        )?;
        map.add_with_string_osd(
            "ControlFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.control_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("BodyRotation") {
            self.body_rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("HeadRotation") {
            self.head_rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("State") {
            self.state = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("CameraCenter") {
            self.camera_center = value.as_vector3()?;
        }
        if let Some(value) = map.get("CameraAtAxis") {
            self.camera_at_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("CameraLeftAxis") {
            self.camera_left_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("CameraUpAxis") {
            self.camera_up_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("Far") {
            self.far = value.as_real()? as f32;
        }
        if let Some(value) = map.get("ControlFlags") {
            self.control_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentAnimationPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentAnimationPacketAnimationListBlock {
    fn new_generated() -> Self {
        Self {
            anim_id: libremetaverse_types::UUID::zero(),
            start_anim: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.anim_id = reader.read_uuid()?;
        self.start_anim = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.anim_id)?;
        writer.write_u8(u8::from(self.start_anim))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AnimID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.anim_id),
        )?;
        map.add_with_string_osd(
            "StartAnim".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.start_anim),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AnimID") {
            self.anim_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("StartAnim") {
            self.start_anim = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::AgentAnimationPacketPhysicalAvatarEventListBlock {
    fn new_generated() -> Self {
        Self { type_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.type_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.type_data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.type_data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TypeData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.type_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TypeData") {
            self.type_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentRequestSitPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentRequestSitPacketTargetObjectBlock {
    fn new_generated() -> Self {
        Self {
            target_id: libremetaverse_types::UUID::zero(),
            offset: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        28_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.target_id = reader.read_uuid()?;
        self.offset = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.target_id)?;
        writer.write_vector3(&self.offset)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TargetID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.target_id),
        )?;
        map.add_with_string_osd(
            "Offset".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.offset)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TargetID") {
            self.target_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Offset") {
            self.offset = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AgentSitPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestImagePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::RequestImagePacketRequestImageBlock {
    fn new_generated() -> Self {
        Self {
            image: libremetaverse_types::UUID::zero(),
            discard_level: 0,
            download_priority: 0.0_f32,
            packet: 0,
            type_: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        26_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.image = reader.read_uuid()?;
        self.discard_level = reader.read_i8()?;
        self.download_priority = reader.read_f32_le()?;
        self.packet = reader.read_u32_le()?;
        self.type_ = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.image)?;
        writer.write_i8(self.discard_level)?;
        writer.write_f32_le(self.download_priority)?;
        writer.write_u32_le(self.packet)?;
        writer.write_u8(self.type_)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Image".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.image),
        )?;
        map.add_with_string_osd(
            "DiscardLevel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.discard_level)),
        )?;
        map.add_with_string_osd(
            "DownloadPriority".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.download_priority)),
        )?;
        map.add_with_string_osd(
            "Packet".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.packet.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Image") {
            self.image = value.as_uuid()?;
        }
        if let Some(value) = map.get("DiscardLevel") {
            self.discard_level = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("DownloadPriority") {
            self.download_priority = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Packet") {
            self.packet = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImageDataPacketImageIDBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            codec: 0,
            size: 0,
            packets: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        23_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.codec = reader.read_u8()?;
        self.size = reader.read_u32_le()?;
        self.packets = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_u8(self.codec)?;
        writer.write_u32_le(self.size)?;
        writer.write_u16_le(self.packets)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Codec".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.codec)),
        )?;
        map.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.size.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Packets".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.packets)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Codec") {
            self.codec = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Size") {
            self.size = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Packets") {
            self.packets = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImageDataPacketImageDataBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImagePacketPacketImageIDBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
            packet: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        18_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        self.packet = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        writer.write_u16_le(self.packet)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        map.add_with_string_osd(
            "Packet".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.packet)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Packet") {
            self.packet = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImagePacketPacketImageDataBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LayerDataPacketLayerIDBlock {
    fn new_generated() -> Self {
        Self { type_: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.type_ = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.type_)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Type".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.type_)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Type") {
            self.type_ = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::LayerDataPacketLayerDataBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdatePacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            time_dilation: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.time_dilation = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u16_le(self.time_dilation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TimeDilation".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.time_dilation)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("TimeDilation") {
            self.time_dilation = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            id: 0,
            state: 0,
            full_id: libremetaverse_types::UUID::zero(),
            crc: 0,
            p_code: 0,
            material: 0,
            click_action: 0,
            scale: libremetaverse_types::Vector3::zero(),
            object_data: Vec::new(),
            parent_id: 0,
            update_flags: 0,
            path_curve: 0,
            profile_curve: 0,
            path_begin: 0,
            path_end: 0,
            path_scale_x: 0,
            path_scale_y: 0,
            path_shear_x: 0,
            path_shear_y: 0,
            path_twist: 0,
            path_twist_begin: 0,
            path_radius_offset: 0,
            path_taper_x: 0,
            path_taper_y: 0,
            path_revolutions: 0,
            path_skew: 0,
            profile_begin: 0,
            profile_end: 0,
            profile_hollow: 0,
            texture_entry: Vec::new(),
            texture_anim: Vec::new(),
            name_value: Vec::new(),
            data: Vec::new(),
            text: Vec::new(),
            text_color: Vec::new(),
            media_url: Vec::new(),
            ps_block: Vec::new(),
            extra_params: Vec::new(),
            sound: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            gain: 0.0_f32,
            flags: 0,
            radius: 0.0_f32,
            joint_type: 0,
            joint_pivot: libremetaverse_types::Vector3::zero(),
            joint_axis_or_anchor: libremetaverse_types::Vector3::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 141_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.object_data.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.texture_entry.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.texture_anim.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.name_value.len()));
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.text.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_url.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.ps_block.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.extra_params.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u32_le()?;
        self.state = reader.read_u8()?;
        self.full_id = reader.read_uuid()?;
        self.crc = reader.read_u32_le()?;
        self.p_code = reader.read_u8()?;
        self.material = reader.read_u8()?;
        self.click_action = reader.read_u8()?;
        self.scale = reader.read_vector3()?;
        self.object_data = reader.read_variable(1)?;
        self.parent_id = reader.read_u32_le()?;
        self.update_flags = reader.read_u32_le()?;
        self.path_curve = reader.read_u8()?;
        self.profile_curve = reader.read_u8()?;
        self.path_begin = reader.read_u16_le()?;
        self.path_end = reader.read_u16_le()?;
        self.path_scale_x = reader.read_u8()?;
        self.path_scale_y = reader.read_u8()?;
        self.path_shear_x = reader.read_u8()?;
        self.path_shear_y = reader.read_u8()?;
        self.path_twist = reader.read_i8()?;
        self.path_twist_begin = reader.read_i8()?;
        self.path_radius_offset = reader.read_i8()?;
        self.path_taper_x = reader.read_i8()?;
        self.path_taper_y = reader.read_i8()?;
        self.path_revolutions = reader.read_u8()?;
        self.path_skew = reader.read_i8()?;
        self.profile_begin = reader.read_u16_le()?;
        self.profile_end = reader.read_u16_le()?;
        self.profile_hollow = reader.read_u16_le()?;
        self.texture_entry = reader.read_variable(2)?;
        self.texture_anim = reader.read_variable(1)?;
        self.name_value = reader.read_variable(2)?;
        self.data = reader.read_variable(2)?;
        self.text = reader.read_variable(1)?;
        self.text_color = reader.read_bytes(4, "truncated fixed packet field")?;
        self.media_url = reader.read_variable(1)?;
        self.ps_block = reader.read_variable(1)?;
        self.extra_params = reader.read_variable(1)?;
        self.sound = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.gain = reader.read_f32_le()?;
        self.flags = reader.read_u8()?;
        self.radius = reader.read_f32_le()?;
        self.joint_type = reader.read_u8()?;
        self.joint_pivot = reader.read_vector3()?;
        self.joint_axis_or_anchor = reader.read_vector3()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.id)?;
        writer.write_u8(self.state)?;
        writer.write_uuid(&self.full_id)?;
        writer.write_u32_le(self.crc)?;
        writer.write_u8(self.p_code)?;
        writer.write_u8(self.material)?;
        writer.write_u8(self.click_action)?;
        writer.write_vector3(&self.scale)?;
        writer.write_variable(&self.object_data, 1)?;
        writer.write_u32_le(self.parent_id)?;
        writer.write_u32_le(self.update_flags)?;
        writer.write_u8(self.path_curve)?;
        writer.write_u8(self.profile_curve)?;
        writer.write_u16_le(self.path_begin)?;
        writer.write_u16_le(self.path_end)?;
        writer.write_u8(self.path_scale_x)?;
        writer.write_u8(self.path_scale_y)?;
        writer.write_u8(self.path_shear_x)?;
        writer.write_u8(self.path_shear_y)?;
        writer.write_i8(self.path_twist)?;
        writer.write_i8(self.path_twist_begin)?;
        writer.write_i8(self.path_radius_offset)?;
        writer.write_i8(self.path_taper_x)?;
        writer.write_i8(self.path_taper_y)?;
        writer.write_u8(self.path_revolutions)?;
        writer.write_i8(self.path_skew)?;
        writer.write_u16_le(self.profile_begin)?;
        writer.write_u16_le(self.profile_end)?;
        writer.write_u16_le(self.profile_hollow)?;
        writer.write_variable(&self.texture_entry, 2)?;
        writer.write_variable(&self.texture_anim, 1)?;
        writer.write_variable(&self.name_value, 2)?;
        writer.write_variable(&self.data, 2)?;
        writer.write_variable(&self.text, 1)?;
        writer.write_fixed(&self.text_color, 4)?;
        writer.write_variable(&self.media_url, 1)?;
        writer.write_variable(&self.ps_block, 1)?;
        writer.write_variable(&self.extra_params, 1)?;
        writer.write_uuid(&self.sound)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_f32_le(self.gain)?;
        writer.write_u8(self.flags)?;
        writer.write_f32_le(self.radius)?;
        writer.write_u8(self.joint_type)?;
        writer.write_vector3(&self.joint_pivot)?;
        writer.write_vector3(&self.joint_axis_or_anchor)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "State".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.state)),
        )?;
        map.add_with_string_osd(
            "FullID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.full_id),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "PCode".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.p_code)),
        )?;
        map.add_with_string_osd(
            "Material".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.material)),
        )?;
        map.add_with_string_osd(
            "ClickAction".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.click_action)),
        )?;
        map.add_with_string_osd(
            "Scale".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.scale)?,
        )?;
        map.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.object_data.clone()),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parent_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "UpdateFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.update_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "PathCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_curve)),
        )?;
        map.add_with_string_osd(
            "ProfileCurve".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_curve)),
        )?;
        map.add_with_string_osd(
            "PathBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_begin)),
        )?;
        map.add_with_string_osd(
            "PathEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_end)),
        )?;
        map.add_with_string_osd(
            "PathScaleX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_x)),
        )?;
        map.add_with_string_osd(
            "PathScaleY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_scale_y)),
        )?;
        map.add_with_string_osd(
            "PathShearX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_x)),
        )?;
        map.add_with_string_osd(
            "PathShearY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_shear_y)),
        )?;
        map.add_with_string_osd(
            "PathTwist".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_twist)),
        )?;
        map.add_with_string_osd(
            "PathTwistBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_twist_begin),
            ),
        )?;
        map.add_with_string_osd(
            "PathRadiusOffset".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_radius_offset),
            ),
        )?;
        map.add_with_string_osd(
            "PathTaperX".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_x)),
        )?;
        map.add_with_string_osd(
            "PathTaperY".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_taper_y)),
        )?;
        map.add_with_string_osd(
            "PathRevolutions".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.path_revolutions),
            ),
        )?;
        map.add_with_string_osd(
            "PathSkew".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.path_skew)),
        )?;
        map.add_with_string_osd(
            "ProfileBegin".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_begin)),
        )?;
        map.add_with_string_osd(
            "ProfileEnd".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_end)),
        )?;
        map.add_with_string_osd(
            "ProfileHollow".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.profile_hollow)),
        )?;
        map.add_with_string_osd(
            "TextureEntry".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_entry.clone()),
        )?;
        map.add_with_string_osd(
            "TextureAnim".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_anim.clone()),
        )?;
        map.add_with_string_osd(
            "NameValue".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name_value.clone()),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        map.add_with_string_osd(
            "Text".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.text.clone()),
        )?;
        map.add_with_string_osd(
            "TextColor".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.text_color.clone()),
        )?;
        map.add_with_string_osd(
            "MediaURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_url.clone()),
        )?;
        map.add_with_string_osd(
            "PSBlock".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.ps_block.clone()),
        )?;
        map.add_with_string_osd(
            "ExtraParams".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.extra_params.clone()),
        )?;
        map.add_with_string_osd(
            "Sound".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.sound),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "Gain".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.gain)),
        )?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.flags)),
        )?;
        map.add_with_string_osd(
            "Radius".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.radius)),
        )?;
        map.add_with_string_osd(
            "JointType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.joint_type)),
        )?;
        map.add_with_string_osd(
            "JointPivot".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.joint_pivot)?,
        )?;
        map.add_with_string_osd(
            "JointAxisOrAnchor".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.joint_axis_or_anchor)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("State") {
            self.state = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("FullID") {
            self.full_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PCode") {
            self.p_code = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Material") {
            self.material = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ClickAction") {
            self.click_action = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Scale") {
            self.scale = value.as_vector3()?;
        }
        if let Some(value) = map.get("ObjectData") {
            self.object_data = value.as_binary()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("UpdateFlags") {
            self.update_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("PathCurve") {
            self.path_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("ProfileCurve") {
            self.profile_curve = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathBegin") {
            self.path_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathEnd") {
            self.path_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("PathScaleX") {
            self.path_scale_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathScaleY") {
            self.path_scale_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearX") {
            self.path_shear_x = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathShearY") {
            self.path_shear_y = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathTwist") {
            self.path_twist = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTwistBegin") {
            self.path_twist_begin = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRadiusOffset") {
            self.path_radius_offset = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperX") {
            self.path_taper_x = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathTaperY") {
            self.path_taper_y = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("PathRevolutions") {
            self.path_revolutions = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("PathSkew") {
            self.path_skew = value.as_integer()? as i8;
        }
        if let Some(value) = map.get("ProfileBegin") {
            self.profile_begin = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileEnd") {
            self.profile_end = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("ProfileHollow") {
            self.profile_hollow = value.as_integer()? as u16;
        }
        if let Some(value) = map.get("TextureEntry") {
            self.texture_entry = value.as_binary()?;
        }
        if let Some(value) = map.get("TextureAnim") {
            self.texture_anim = value.as_binary()?;
        }
        if let Some(value) = map.get("NameValue") {
            self.name_value = value.as_binary()?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        if let Some(value) = map.get("Text") {
            self.text = value.as_binary()?;
        }
        if let Some(value) = map.get("TextColor") {
            self.text_color = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaURL") {
            self.media_url = value.as_binary()?;
        }
        if let Some(value) = map.get("PSBlock") {
            self.ps_block = value.as_binary()?;
        }
        if let Some(value) = map.get("ExtraParams") {
            self.extra_params = value.as_binary()?;
        }
        if let Some(value) = map.get("Sound") {
            self.sound = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Gain") {
            self.gain = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Flags") {
            self.flags = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Radius") {
            self.radius = value.as_real()? as f32;
        }
        if let Some(value) = map.get("JointType") {
            self.joint_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("JointPivot") {
            self.joint_pivot = value.as_vector3()?;
        }
        if let Some(value) = map.get("JointAxisOrAnchor") {
            self.joint_axis_or_anchor = value.as_vector3()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdateCompressedPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            time_dilation: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.time_dilation = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u16_le(self.time_dilation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TimeDilation".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.time_dilation)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("TimeDilation") {
            self.time_dilation = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdateCompressedPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            update_flags: 0,
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 4_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.update_flags = reader.read_u32_le()?;
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.update_flags)?;
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "UpdateFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.update_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("UpdateFlags") {
            self.update_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdateCachedPacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            time_dilation: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.time_dilation = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u16_le(self.time_dilation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TimeDilation".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.time_dilation)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("TimeDilation") {
            self.time_dilation = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectUpdateCachedPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            id: 0,
            crc: 0,
            update_flags: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u32_le()?;
        self.crc = reader.read_u32_le()?;
        self.update_flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.id)?;
        writer.write_u32_le(self.crc)?;
        writer.write_u32_le(self.update_flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "CRC".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.crc.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "UpdateFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.update_flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("CRC") {
            self.crc = osd_u32(&value)?;
        }
        if let Some(value) = map.get("UpdateFlags") {
            self.update_flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedTerseObjectUpdatePacketRegionDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            time_dilation: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.time_dilation = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u16_le(self.time_dilation)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "TimeDilation".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.time_dilation)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("TimeDilation") {
            self.time_dilation = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ImprovedTerseObjectUpdatePacketObjectDataBlock {
    fn new_generated() -> Self {
        Self {
            data: Vec::new(),
            texture_entry: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.data.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.texture_entry.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(1)?;
        self.texture_entry = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 1)?;
        writer.write_variable(&self.texture_entry, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        map.add_with_string_osd(
            "TextureEntry".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.texture_entry.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        if let Some(value) = map.get("TextureEntry") {
            self.texture_entry = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::KillObjectPacketObjectDataBlock {
    fn new_generated() -> Self {
        Self { id: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::TransferPacketPacketTransferDataBlock {
    fn new_generated() -> Self {
        Self {
            transfer_id: libremetaverse_types::UUID::zero(),
            channel_type: 0,
            packet: 0,
            status: 0,
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 28_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.transfer_id = reader.read_uuid()?;
        self.channel_type = reader.read_i32_le()?;
        self.packet = reader.read_i32_le()?;
        self.status = reader.read_i32_le()?;
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.transfer_id)?;
        writer.write_i32_le(self.channel_type)?;
        writer.write_i32_le(self.packet)?;
        writer.write_i32_le(self.status)?;
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TransferID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.transfer_id),
        )?;
        map.add_with_string_osd(
            "ChannelType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.channel_type),
        )?;
        map.add_with_string_osd(
            "Packet".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.packet),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.status),
        )?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TransferID") {
            self.transfer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ChannelType") {
            self.channel_type = value.as_integer()?;
        }
        if let Some(value) = map.get("Packet") {
            self.packet = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_integer()?;
        }
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SendXferPacketPacketXferIDBlock {
    fn new_generated() -> Self {
        Self { id: 0, packet: 0 }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u64_le()?;
        self.packet = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.id)?;
        writer.write_u32_le(self.packet)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Packet".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.packet.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Packet") {
            self.packet = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SendXferPacketPacketDataPacketBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ConfirmXferPacketPacketXferIDBlock {
    fn new_generated() -> Self {
        Self { id: 0, packet: 0 }
    }
    fn generated_length(&self) -> i32 {
        12_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_u64_le()?;
        self.packet = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.id)?;
        writer.write_u32_le(self.packet)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.id.to_le_bytes().to_vec()),
        )?;
        map.add_with_string_osd(
            "Packet".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.packet.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Packet") {
            self.packet = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAnimationPacketSenderBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAnimationPacketAnimationListBlock {
    fn new_generated() -> Self {
        Self {
            anim_id: libremetaverse_types::UUID::zero(),
            anim_sequence_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.anim_id = reader.read_uuid()?;
        self.anim_sequence_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.anim_id)?;
        writer.write_i32_le(self.anim_sequence_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AnimID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.anim_id),
        )?;
        map.add_with_string_osd(
            "AnimSequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.anim_sequence_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AnimID") {
            self.anim_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AnimSequenceID") {
            self.anim_sequence_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarAnimationPacketAnimationSourceListBlock {
    fn new_generated() -> Self {
        Self {
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::AvatarAnimationPacketPhysicalAvatarEventListBlock {
    fn new_generated() -> Self {
        Self { type_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.type_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.type_data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.type_data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TypeData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.type_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TypeData") {
            self.type_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarSitResponsePacketSitObjectBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AvatarSitResponsePacketSitTransformBlock {
    fn new_generated() -> Self {
        Self {
            auto_pilot: false,
            sit_position: libremetaverse_types::Vector3::zero(),
            sit_rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            camera_eye_offset: libremetaverse_types::Vector3::zero(),
            camera_at_offset: libremetaverse_types::Vector3::zero(),
            force_mouselook: false,
        }
    }
    fn generated_length(&self) -> i32 {
        50_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.auto_pilot = reader.read_u8()? != 0;
        self.sit_position = reader.read_vector3()?;
        self.sit_rotation = reader.read_quaternion()?;
        self.camera_eye_offset = reader.read_vector3()?;
        self.camera_at_offset = reader.read_vector3()?;
        self.force_mouselook = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.auto_pilot))?;
        writer.write_vector3(&self.sit_position)?;
        writer.write_quaternion(&self.sit_rotation)?;
        writer.write_vector3(&self.camera_eye_offset)?;
        writer.write_vector3(&self.camera_at_offset)?;
        writer.write_u8(u8::from(self.force_mouselook))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AutoPilot".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.auto_pilot),
        )?;
        map.add_with_string_osd(
            "SitPosition".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.sit_position)?,
        )?;
        map.add_with_string_osd(
            "SitRotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.sit_rotation)?,
        )?;
        map.add_with_string_osd(
            "CameraEyeOffset".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_eye_offset)?,
        )?;
        map.add_with_string_osd(
            "CameraAtOffset".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.camera_at_offset)?,
        )?;
        map.add_with_string_osd(
            "ForceMouselook".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.force_mouselook),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AutoPilot") {
            self.auto_pilot = value.as_boolean()?;
        }
        if let Some(value) = map.get("SitPosition") {
            self.sit_position = value.as_vector3()?;
        }
        if let Some(value) = map.get("SitRotation") {
            self.sit_rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("CameraEyeOffset") {
            self.camera_eye_offset = value.as_vector3()?;
        }
        if let Some(value) = map.get("CameraAtOffset") {
            self.camera_at_offset = value.as_vector3()?;
        }
        if let Some(value) = map.get("ForceMouselook") {
            self.force_mouselook = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::CameraConstraintPacketCameraCollidePlaneBlock {
    fn new_generated() -> Self {
        Self {
            plane: libremetaverse_types::Vector4::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.plane = reader.read_vector4()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_vector4(&self.plane)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Plane".to_owned(),
            libremetaverse_structured_data::OSD::from_vector4(self.plane)?,
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Plane") {
            self.plane = value.as_vector4()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesPacketParcelDataBlock {
    fn new_generated() -> Self {
        Self {
            request_result: 0,
            sequence_id: 0,
            snap_selection: false,
            self_count: 0,
            other_count: 0,
            public_count: 0,
            local_id: 0,
            owner_id: libremetaverse_types::UUID::zero(),
            is_group_owned: false,
            auction_id: 0,
            claim_date: 0,
            claim_price: 0,
            rent_price: 0,
            aabb_min: libremetaverse_types::Vector3::zero(),
            aabb_max: libremetaverse_types::Vector3::zero(),
            bitmap: Vec::new(),
            area: 0,
            status: 0,
            sim_wide_max_prims: 0,
            sim_wide_total_prims: 0,
            max_prims: 0,
            total_prims: 0,
            owner_prims: 0,
            group_prims: 0,
            other_prims: 0,
            selected_prims: 0,
            parcel_prim_bonus: 0.0_f32,
            other_clean_time: 0,
            parcel_flags: 0,
            sale_price: 0,
            name: Vec::new(),
            desc: Vec::new(),
            music_url: Vec::new(),
            media_url: Vec::new(),
            media_id: libremetaverse_types::UUID::zero(),
            media_auto_scale: 0,
            group_id: libremetaverse_types::UUID::zero(),
            pass_price: 0,
            pass_hours: 0.0_f32,
            category: 0,
            auth_buyer_id: libremetaverse_types::UUID::zero(),
            snapshot_id: libremetaverse_types::UUID::zero(),
            user_location: libremetaverse_types::Vector3::zero(),
            user_look_at: libremetaverse_types::Vector3::zero(),
            landing_type: 0,
            region_push_override: false,
            region_deny_anonymous: false,
            region_deny_identified: false,
            region_deny_transacted: false,
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 238_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.bitmap.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.name.len()));
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.desc.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.music_url.len()));
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.media_url.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.request_result = reader.read_i32_le()?;
        self.sequence_id = reader.read_i32_le()?;
        self.snap_selection = reader.read_u8()? != 0;
        self.self_count = reader.read_i32_le()?;
        self.other_count = reader.read_i32_le()?;
        self.public_count = reader.read_i32_le()?;
        self.local_id = reader.read_i32_le()?;
        self.owner_id = reader.read_uuid()?;
        self.is_group_owned = reader.read_u8()? != 0;
        self.auction_id = reader.read_u32_le()?;
        self.claim_date = reader.read_i32_le()?;
        self.claim_price = reader.read_i32_le()?;
        self.rent_price = reader.read_i32_le()?;
        self.aabb_min = reader.read_vector3()?;
        self.aabb_max = reader.read_vector3()?;
        self.bitmap = reader.read_variable(2)?;
        self.area = reader.read_i32_le()?;
        self.status = reader.read_u8()?;
        self.sim_wide_max_prims = reader.read_i32_le()?;
        self.sim_wide_total_prims = reader.read_i32_le()?;
        self.max_prims = reader.read_i32_le()?;
        self.total_prims = reader.read_i32_le()?;
        self.owner_prims = reader.read_i32_le()?;
        self.group_prims = reader.read_i32_le()?;
        self.other_prims = reader.read_i32_le()?;
        self.selected_prims = reader.read_i32_le()?;
        self.parcel_prim_bonus = reader.read_f32_le()?;
        self.other_clean_time = reader.read_i32_le()?;
        self.parcel_flags = reader.read_u32_le()?;
        self.sale_price = reader.read_i32_le()?;
        self.name = reader.read_variable(1)?;
        self.desc = reader.read_variable(1)?;
        self.music_url = reader.read_variable(1)?;
        self.media_url = reader.read_variable(1)?;
        self.media_id = reader.read_uuid()?;
        self.media_auto_scale = reader.read_u8()?;
        self.group_id = reader.read_uuid()?;
        self.pass_price = reader.read_i32_le()?;
        self.pass_hours = reader.read_f32_le()?;
        self.category = reader.read_u8()?;
        self.auth_buyer_id = reader.read_uuid()?;
        self.snapshot_id = reader.read_uuid()?;
        self.user_location = reader.read_vector3()?;
        self.user_look_at = reader.read_vector3()?;
        self.landing_type = reader.read_u8()?;
        self.region_push_override = reader.read_u8()? != 0;
        self.region_deny_anonymous = reader.read_u8()? != 0;
        self.region_deny_identified = reader.read_u8()? != 0;
        self.region_deny_transacted = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.request_result)?;
        writer.write_i32_le(self.sequence_id)?;
        writer.write_u8(u8::from(self.snap_selection))?;
        writer.write_i32_le(self.self_count)?;
        writer.write_i32_le(self.other_count)?;
        writer.write_i32_le(self.public_count)?;
        writer.write_i32_le(self.local_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_u8(u8::from(self.is_group_owned))?;
        writer.write_u32_le(self.auction_id)?;
        writer.write_i32_le(self.claim_date)?;
        writer.write_i32_le(self.claim_price)?;
        writer.write_i32_le(self.rent_price)?;
        writer.write_vector3(&self.aabb_min)?;
        writer.write_vector3(&self.aabb_max)?;
        writer.write_variable(&self.bitmap, 2)?;
        writer.write_i32_le(self.area)?;
        writer.write_u8(self.status)?;
        writer.write_i32_le(self.sim_wide_max_prims)?;
        writer.write_i32_le(self.sim_wide_total_prims)?;
        writer.write_i32_le(self.max_prims)?;
        writer.write_i32_le(self.total_prims)?;
        writer.write_i32_le(self.owner_prims)?;
        writer.write_i32_le(self.group_prims)?;
        writer.write_i32_le(self.other_prims)?;
        writer.write_i32_le(self.selected_prims)?;
        writer.write_f32_le(self.parcel_prim_bonus)?;
        writer.write_i32_le(self.other_clean_time)?;
        writer.write_u32_le(self.parcel_flags)?;
        writer.write_i32_le(self.sale_price)?;
        writer.write_variable(&self.name, 1)?;
        writer.write_variable(&self.desc, 1)?;
        writer.write_variable(&self.music_url, 1)?;
        writer.write_variable(&self.media_url, 1)?;
        writer.write_uuid(&self.media_id)?;
        writer.write_u8(self.media_auto_scale)?;
        writer.write_uuid(&self.group_id)?;
        writer.write_i32_le(self.pass_price)?;
        writer.write_f32_le(self.pass_hours)?;
        writer.write_u8(self.category)?;
        writer.write_uuid(&self.auth_buyer_id)?;
        writer.write_uuid(&self.snapshot_id)?;
        writer.write_vector3(&self.user_location)?;
        writer.write_vector3(&self.user_look_at)?;
        writer.write_u8(self.landing_type)?;
        writer.write_u8(u8::from(self.region_push_override))?;
        writer.write_u8(u8::from(self.region_deny_anonymous))?;
        writer.write_u8(u8::from(self.region_deny_identified))?;
        writer.write_u8(u8::from(self.region_deny_transacted))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RequestResult".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.request_result),
        )?;
        map.add_with_string_osd(
            "SequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sequence_id),
        )?;
        map.add_with_string_osd(
            "SnapSelection".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.snap_selection),
        )?;
        map.add_with_string_osd(
            "SelfCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.self_count),
        )?;
        map.add_with_string_osd(
            "OtherCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.other_count),
        )?;
        map.add_with_string_osd(
            "PublicCount".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.public_count),
        )?;
        map.add_with_string_osd(
            "LocalID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.local_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "IsGroupOwned".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.is_group_owned),
        )?;
        map.add_with_string_osd(
            "AuctionID".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.auction_id.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ClaimDate".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.claim_date),
        )?;
        map.add_with_string_osd(
            "ClaimPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.claim_price),
        )?;
        map.add_with_string_osd(
            "RentPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.rent_price),
        )?;
        map.add_with_string_osd(
            "AABBMin".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.aabb_min)?,
        )?;
        map.add_with_string_osd(
            "AABBMax".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.aabb_max)?,
        )?;
        map.add_with_string_osd(
            "Bitmap".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.bitmap.clone()),
        )?;
        map.add_with_string_osd(
            "Area".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.area),
        )?;
        map.add_with_string_osd(
            "Status".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.status)),
        )?;
        map.add_with_string_osd(
            "SimWideMaxPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sim_wide_max_prims),
        )?;
        map.add_with_string_osd(
            "SimWideTotalPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sim_wide_total_prims),
        )?;
        map.add_with_string_osd(
            "MaxPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.max_prims),
        )?;
        map.add_with_string_osd(
            "TotalPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.total_prims),
        )?;
        map.add_with_string_osd(
            "OwnerPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.owner_prims),
        )?;
        map.add_with_string_osd(
            "GroupPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.group_prims),
        )?;
        map.add_with_string_osd(
            "OtherPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.other_prims),
        )?;
        map.add_with_string_osd(
            "SelectedPrims".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.selected_prims),
        )?;
        map.add_with_string_osd(
            "ParcelPrimBonus".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.parcel_prim_bonus)),
        )?;
        map.add_with_string_osd(
            "OtherCleanTime".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.other_clean_time),
        )?;
        map.add_with_string_osd(
            "ParcelFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.parcel_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "SalePrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.sale_price),
        )?;
        map.add_with_string_osd(
            "Name".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.name.clone()),
        )?;
        map.add_with_string_osd(
            "Desc".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.desc.clone()),
        )?;
        map.add_with_string_osd(
            "MusicURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.music_url.clone()),
        )?;
        map.add_with_string_osd(
            "MediaURL".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.media_url.clone()),
        )?;
        map.add_with_string_osd(
            "MediaID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.media_id),
        )?;
        map.add_with_string_osd(
            "MediaAutoScale".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.media_auto_scale),
            ),
        )?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "PassPrice".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.pass_price),
        )?;
        map.add_with_string_osd(
            "PassHours".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.pass_hours)),
        )?;
        map.add_with_string_osd(
            "Category".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.category)),
        )?;
        map.add_with_string_osd(
            "AuthBuyerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.auth_buyer_id),
        )?;
        map.add_with_string_osd(
            "SnapshotID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.snapshot_id),
        )?;
        map.add_with_string_osd(
            "UserLocation".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.user_location)?,
        )?;
        map.add_with_string_osd(
            "UserLookAt".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.user_look_at)?,
        )?;
        map.add_with_string_osd(
            "LandingType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.landing_type)),
        )?;
        map.add_with_string_osd(
            "RegionPushOverride".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.region_push_override),
        )?;
        map.add_with_string_osd(
            "RegionDenyAnonymous".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.region_deny_anonymous),
        )?;
        map.add_with_string_osd(
            "RegionDenyIdentified".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.region_deny_identified),
        )?;
        map.add_with_string_osd(
            "RegionDenyTransacted".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.region_deny_transacted),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RequestResult") {
            self.request_result = value.as_integer()?;
        }
        if let Some(value) = map.get("SequenceID") {
            self.sequence_id = value.as_integer()?;
        }
        if let Some(value) = map.get("SnapSelection") {
            self.snap_selection = value.as_boolean()?;
        }
        if let Some(value) = map.get("SelfCount") {
            self.self_count = value.as_integer()?;
        }
        if let Some(value) = map.get("OtherCount") {
            self.other_count = value.as_integer()?;
        }
        if let Some(value) = map.get("PublicCount") {
            self.public_count = value.as_integer()?;
        }
        if let Some(value) = map.get("LocalID") {
            self.local_id = value.as_integer()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("IsGroupOwned") {
            self.is_group_owned = value.as_boolean()?;
        }
        if let Some(value) = map.get("AuctionID") {
            self.auction_id = osd_u32(&value)?;
        }
        if let Some(value) = map.get("ClaimDate") {
            self.claim_date = value.as_integer()?;
        }
        if let Some(value) = map.get("ClaimPrice") {
            self.claim_price = value.as_integer()?;
        }
        if let Some(value) = map.get("RentPrice") {
            self.rent_price = value.as_integer()?;
        }
        if let Some(value) = map.get("AABBMin") {
            self.aabb_min = value.as_vector3()?;
        }
        if let Some(value) = map.get("AABBMax") {
            self.aabb_max = value.as_vector3()?;
        }
        if let Some(value) = map.get("Bitmap") {
            self.bitmap = value.as_binary()?;
        }
        if let Some(value) = map.get("Area") {
            self.area = value.as_integer()?;
        }
        if let Some(value) = map.get("Status") {
            self.status = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("SimWideMaxPrims") {
            self.sim_wide_max_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("SimWideTotalPrims") {
            self.sim_wide_total_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("MaxPrims") {
            self.max_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("TotalPrims") {
            self.total_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("OwnerPrims") {
            self.owner_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("GroupPrims") {
            self.group_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("OtherPrims") {
            self.other_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("SelectedPrims") {
            self.selected_prims = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelPrimBonus") {
            self.parcel_prim_bonus = value.as_real()? as f32;
        }
        if let Some(value) = map.get("OtherCleanTime") {
            self.other_clean_time = value.as_integer()?;
        }
        if let Some(value) = map.get("ParcelFlags") {
            self.parcel_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("SalePrice") {
            self.sale_price = value.as_integer()?;
        }
        if let Some(value) = map.get("Name") {
            self.name = value.as_binary()?;
        }
        if let Some(value) = map.get("Desc") {
            self.desc = value.as_binary()?;
        }
        if let Some(value) = map.get("MusicURL") {
            self.music_url = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaURL") {
            self.media_url = value.as_binary()?;
        }
        if let Some(value) = map.get("MediaID") {
            self.media_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("MediaAutoScale") {
            self.media_auto_scale = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("PassPrice") {
            self.pass_price = value.as_integer()?;
        }
        if let Some(value) = map.get("PassHours") {
            self.pass_hours = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Category") {
            self.category = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AuthBuyerID") {
            self.auth_buyer_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SnapshotID") {
            self.snapshot_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("UserLocation") {
            self.user_location = value.as_vector3()?;
        }
        if let Some(value) = map.get("UserLookAt") {
            self.user_look_at = value.as_vector3()?;
        }
        if let Some(value) = map.get("LandingType") {
            self.landing_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("RegionPushOverride") {
            self.region_push_override = value.as_boolean()?;
        }
        if let Some(value) = map.get("RegionDenyAnonymous") {
            self.region_deny_anonymous = value.as_boolean()?;
        }
        if let Some(value) = map.get("RegionDenyIdentified") {
            self.region_deny_identified = value.as_boolean()?;
        }
        if let Some(value) = map.get("RegionDenyTransacted") {
            self.region_deny_transacted = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ParcelPropertiesPacketAgeVerificationBlockBlock {
    fn new_generated() -> Self {
        Self {
            region_deny_age_unverified: false,
        }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_deny_age_unverified = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.region_deny_age_unverified))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionDenyAgeUnverified".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.region_deny_age_unverified),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionDenyAgeUnverified") {
            self.region_deny_age_unverified = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::ParcelPropertiesPacketRegionAllowAccessBlockBlock {
    fn new_generated() -> Self {
        Self {
            region_allow_access_override: false,
        }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_allow_access_override = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(u8::from(self.region_allow_access_override))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionAllowAccessOverride".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(
                self.region_allow_access_override,
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionAllowAccessOverride") {
            self.region_allow_access_override = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock
for crate::packets::ParcelPropertiesPacketParcelEnvironmentBlockBlock {
    fn new_generated() -> Self {
        Self {
            parcel_environment_version: 0,
            region_allow_environment_override: false,
        }
    }
    fn generated_length(&self) -> i32 {
        5_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.parcel_environment_version = reader.read_i32_le()?;
        self.region_allow_environment_override = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_i32_le(self.parcel_environment_version)?;
        writer.write_u8(u8::from(self.region_allow_environment_override))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParcelEnvironmentVersion".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.parcel_environment_version),
        )?;
        map.add_with_string_osd(
            "RegionAllowEnvironmentOverride".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(
                self.region_allow_environment_override,
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParcelEnvironmentVersion") {
            self.parcel_environment_version = value.as_integer()?;
        }
        if let Some(value) = map.get("RegionAllowEnvironmentOverride") {
            self.region_allow_environment_override = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::EdgeDataPacketPacketEdgeDataBlock {
    fn new_generated() -> Self {
        Self {
            layer_type: 0,
            direction: 0,
            layer_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 2_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.layer_data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.layer_type = reader.read_u8()?;
        self.direction = reader.read_u8()?;
        self.layer_data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.layer_type)?;
        writer.write_u8(self.direction)?;
        writer.write_variable(&self.layer_data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "LayerType".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.layer_type)),
        )?;
        map.add_with_string_osd(
            "Direction".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.direction)),
        )?;
        map.add_with_string_osd(
            "LayerData".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.layer_data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("LayerType") {
            self.layer_type = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Direction") {
            self.direction = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("LayerData") {
            self.layer_data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            viewer_circuit_code: 0,
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            agent_pos: libremetaverse_types::Vector3::zero(),
            agent_vel: libremetaverse_types::Vector3::zero(),
            center: libremetaverse_types::Vector3::zero(),
            size: libremetaverse_types::Vector3::zero(),
            at_axis: libremetaverse_types::Vector3::zero(),
            left_axis: libremetaverse_types::Vector3::zero(),
            up_axis: libremetaverse_types::Vector3::zero(),
            changed_grid: false,
            far: 0.0_f32,
            aspect: 0.0_f32,
            throttles: Vec::new(),
            locomotion_state: 0,
            head_rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            body_rotation: libremetaverse_types::Quaternion {
                x: 0.0,
                y: 0.0,
                z: 0.0,
                w: 0.0,
            },
            control_flags: 0,
            energy_level: 0.0_f32,
            god_level: 0,
            always_run: false,
            prey_agent: libremetaverse_types::UUID::zero(),
            agent_access: 0,
            agent_textures: Vec::new(),
            active_group_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 208_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.throttles.len()));
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.agent_textures.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.viewer_circuit_code = reader.read_u32_le()?;
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.agent_pos = reader.read_vector3()?;
        self.agent_vel = reader.read_vector3()?;
        self.center = reader.read_vector3()?;
        self.size = reader.read_vector3()?;
        self.at_axis = reader.read_vector3()?;
        self.left_axis = reader.read_vector3()?;
        self.up_axis = reader.read_vector3()?;
        self.changed_grid = reader.read_u8()? != 0;
        self.far = reader.read_f32_le()?;
        self.aspect = reader.read_f32_le()?;
        self.throttles = reader.read_variable(1)?;
        self.locomotion_state = reader.read_u32_le()?;
        self.head_rotation = reader.read_quaternion()?;
        self.body_rotation = reader.read_quaternion()?;
        self.control_flags = reader.read_u32_le()?;
        self.energy_level = reader.read_f32_le()?;
        self.god_level = reader.read_u8()?;
        self.always_run = reader.read_u8()? != 0;
        self.prey_agent = reader.read_uuid()?;
        self.agent_access = reader.read_u8()?;
        self.agent_textures = reader.read_variable(2)?;
        self.active_group_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u32_le(self.viewer_circuit_code)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_vector3(&self.agent_pos)?;
        writer.write_vector3(&self.agent_vel)?;
        writer.write_vector3(&self.center)?;
        writer.write_vector3(&self.size)?;
        writer.write_vector3(&self.at_axis)?;
        writer.write_vector3(&self.left_axis)?;
        writer.write_vector3(&self.up_axis)?;
        writer.write_u8(u8::from(self.changed_grid))?;
        writer.write_f32_le(self.far)?;
        writer.write_f32_le(self.aspect)?;
        writer.write_variable(&self.throttles, 1)?;
        writer.write_u32_le(self.locomotion_state)?;
        writer.write_quaternion(&self.head_rotation)?;
        writer.write_quaternion(&self.body_rotation)?;
        writer.write_u32_le(self.control_flags)?;
        writer.write_f32_le(self.energy_level)?;
        writer.write_u8(self.god_level)?;
        writer.write_u8(u8::from(self.always_run))?;
        writer.write_uuid(&self.prey_agent)?;
        writer.write_u8(self.agent_access)?;
        writer.write_variable(&self.agent_textures, 2)?;
        writer.write_uuid(&self.active_group_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ViewerCircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.viewer_circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AgentPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.agent_pos)?,
        )?;
        map.add_with_string_osd(
            "AgentVel".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.agent_vel)?,
        )?;
        map.add_with_string_osd(
            "Center".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.center)?,
        )?;
        map.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.size)?,
        )?;
        map.add_with_string_osd(
            "AtAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.at_axis)?,
        )?;
        map.add_with_string_osd(
            "LeftAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.left_axis)?,
        )?;
        map.add_with_string_osd(
            "UpAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.up_axis)?,
        )?;
        map.add_with_string_osd(
            "ChangedGrid".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.changed_grid),
        )?;
        map.add_with_string_osd(
            "Far".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.far)),
        )?;
        map.add_with_string_osd(
            "Aspect".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.aspect)),
        )?;
        map.add_with_string_osd(
            "Throttles".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.throttles.clone()),
        )?;
        map.add_with_string_osd(
            "LocomotionState".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.locomotion_state.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "HeadRotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.head_rotation)?,
        )?;
        map.add_with_string_osd(
            "BodyRotation".to_owned(),
            libremetaverse_structured_data::OSD::from_quaternion(self.body_rotation)?,
        )?;
        map.add_with_string_osd(
            "ControlFlags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.control_flags.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "EnergyLevel".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.energy_level)),
        )?;
        map.add_with_string_osd(
            "GodLevel".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.god_level)),
        )?;
        map.add_with_string_osd(
            "AlwaysRun".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.always_run),
        )?;
        map.add_with_string_osd(
            "PreyAgent".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.prey_agent),
        )?;
        map.add_with_string_osd(
            "AgentAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.agent_access)),
        )?;
        map.add_with_string_osd(
            "AgentTextures".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.agent_textures.clone()),
        )?;
        map.add_with_string_osd(
            "ActiveGroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.active_group_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("ViewerCircuitCode") {
            self.viewer_circuit_code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentPos") {
            self.agent_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("AgentVel") {
            self.agent_vel = value.as_vector3()?;
        }
        if let Some(value) = map.get("Center") {
            self.center = value.as_vector3()?;
        }
        if let Some(value) = map.get("Size") {
            self.size = value.as_vector3()?;
        }
        if let Some(value) = map.get("AtAxis") {
            self.at_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("LeftAxis") {
            self.left_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("UpAxis") {
            self.up_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("ChangedGrid") {
            self.changed_grid = value.as_boolean()?;
        }
        if let Some(value) = map.get("Far") {
            self.far = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Aspect") {
            self.aspect = value.as_real()? as f32;
        }
        if let Some(value) = map.get("Throttles") {
            self.throttles = value.as_binary()?;
        }
        if let Some(value) = map.get("LocomotionState") {
            self.locomotion_state = osd_u32(&value)?;
        }
        if let Some(value) = map.get("HeadRotation") {
            self.head_rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("BodyRotation") {
            self.body_rotation = value.as_quaternion()?;
        }
        if let Some(value) = map.get("ControlFlags") {
            self.control_flags = osd_u32(&value)?;
        }
        if let Some(value) = map.get("EnergyLevel") {
            self.energy_level = value.as_real()? as f32;
        }
        if let Some(value) = map.get("GodLevel") {
            self.god_level = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AlwaysRun") {
            self.always_run = value.as_boolean()?;
        }
        if let Some(value) = map.get("PreyAgent") {
            self.prey_agent = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentAccess") {
            self.agent_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AgentTextures") {
            self.agent_textures = value.as_binary()?;
        }
        if let Some(value) = map.get("ActiveGroupID") {
            self.active_group_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketGroupDataBlock {
    fn new_generated() -> Self {
        Self {
            group_id: libremetaverse_types::UUID::zero(),
            group_powers: 0,
            accept_notices: false,
        }
    }
    fn generated_length(&self) -> i32 {
        25_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.group_id = reader.read_uuid()?;
        self.group_powers = reader.read_u64_le()?;
        self.accept_notices = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.group_id)?;
        writer.write_u64_le(self.group_powers)?;
        writer.write_u8(u8::from(self.accept_notices))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GroupID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.group_id),
        )?;
        map.add_with_string_osd(
            "GroupPowers".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.group_powers.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AcceptNotices".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.accept_notices),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GroupID") {
            self.group_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("GroupPowers") {
            self.group_powers = osd_u64(&value)?;
        }
        if let Some(value) = map.get("AcceptNotices") {
            self.accept_notices = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketAnimationDataBlock {
    fn new_generated() -> Self {
        Self {
            animation: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.animation = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.animation)?;
        writer.write_uuid(&self.object_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Animation".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.animation),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Animation") {
            self.animation = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketGranterBlockBlock {
    fn new_generated() -> Self {
        Self {
            granter_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.granter_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.granter_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "GranterID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.granter_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("GranterID") {
            self.granter_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketNVPairDataBlock {
    fn new_generated() -> Self {
        Self { nv_pairs: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(2)
            .saturating_add(usize_to_i32(self.nv_pairs.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.nv_pairs = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.nv_pairs, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "NVPairs".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.nv_pairs.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("NVPairs") {
            self.nv_pairs = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketVisualParamBlock {
    fn new_generated() -> Self {
        Self { param_value: 0 }
    }
    fn generated_length(&self) -> i32 {
        1_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.param_value = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.param_value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ParamValue".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.param_value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ParamValue") {
            self.param_value = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketAgentAccessBlock {
    fn new_generated() -> Self {
        Self {
            agent_legacy_access: 0,
            agent_max_access: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        2_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_legacy_access = reader.read_u8()?;
        self.agent_max_access = reader.read_u8()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.agent_legacy_access)?;
        writer.write_u8(self.agent_max_access)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentLegacyAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.agent_legacy_access),
            ),
        )?;
        map.add_with_string_osd(
            "AgentMaxAccess".to_owned(),
            libremetaverse_structured_data::OSD::Integer(
                i32::from(self.agent_max_access),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentLegacyAccess") {
            self.agent_legacy_access = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("AgentMaxAccess") {
            self.agent_max_access = value.as_integer()? as u8;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketAgentInfoBlock {
    fn new_generated() -> Self {
        Self { flags: 0 }
    }
    fn generated_length(&self) -> i32 {
        4_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.flags = reader.read_u32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u32_le(self.flags)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Flags".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.flags.to_le_bytes().to_vec(),
            ),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Flags") {
            self.flags = osd_u32(&value)?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentUpdatePacketAgentInventoryHostBlock {
    fn new_generated() -> Self {
        Self { inventory_host: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length
            .saturating_add(1)
            .saturating_add(usize_to_i32(self.inventory_host.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.inventory_host = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.inventory_host, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "InventoryHost".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.inventory_host.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("InventoryHost") {
            self.inventory_host = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentAlivePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            viewer_circuit_code: 0,
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        44_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.viewer_circuit_code = reader.read_u32_le()?;
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u32_le(self.viewer_circuit_code)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ViewerCircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.viewer_circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("ViewerCircuitCode") {
            self.viewer_circuit_code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ChildAgentPositionUpdatePacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            region_handle: 0,
            viewer_circuit_code: 0,
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
            agent_pos: libremetaverse_types::Vector3::zero(),
            agent_vel: libremetaverse_types::Vector3::zero(),
            center: libremetaverse_types::Vector3::zero(),
            size: libremetaverse_types::Vector3::zero(),
            at_axis: libremetaverse_types::Vector3::zero(),
            left_axis: libremetaverse_types::Vector3::zero(),
            up_axis: libremetaverse_types::Vector3::zero(),
            changed_grid: false,
        }
    }
    fn generated_length(&self) -> i32 {
        129_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.region_handle = reader.read_u64_le()?;
        self.viewer_circuit_code = reader.read_u32_le()?;
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        self.agent_pos = reader.read_vector3()?;
        self.agent_vel = reader.read_vector3()?;
        self.center = reader.read_vector3()?;
        self.size = reader.read_vector3()?;
        self.at_axis = reader.read_vector3()?;
        self.left_axis = reader.read_vector3()?;
        self.up_axis = reader.read_vector3()?;
        self.changed_grid = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u64_le(self.region_handle)?;
        writer.write_u32_le(self.viewer_circuit_code)?;
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        writer.write_vector3(&self.agent_pos)?;
        writer.write_vector3(&self.agent_vel)?;
        writer.write_vector3(&self.center)?;
        writer.write_vector3(&self.size)?;
        writer.write_vector3(&self.at_axis)?;
        writer.write_vector3(&self.left_axis)?;
        writer.write_vector3(&self.up_axis)?;
        writer.write_u8(u8::from(self.changed_grid))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "RegionHandle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.region_handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "ViewerCircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.viewer_circuit_code.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        map.add_with_string_osd(
            "AgentPos".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.agent_pos)?,
        )?;
        map.add_with_string_osd(
            "AgentVel".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.agent_vel)?,
        )?;
        map.add_with_string_osd(
            "Center".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.center)?,
        )?;
        map.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.size)?,
        )?;
        map.add_with_string_osd(
            "AtAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.at_axis)?,
        )?;
        map.add_with_string_osd(
            "LeftAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.left_axis)?,
        )?;
        map.add_with_string_osd(
            "UpAxis".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.up_axis)?,
        )?;
        map.add_with_string_osd(
            "ChangedGrid".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.changed_grid),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("RegionHandle") {
            self.region_handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("ViewerCircuitCode") {
            self.viewer_circuit_code = osd_u32(&value)?;
        }
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AgentPos") {
            self.agent_pos = value.as_vector3()?;
        }
        if let Some(value) = map.get("AgentVel") {
            self.agent_vel = value.as_vector3()?;
        }
        if let Some(value) = map.get("Center") {
            self.center = value.as_vector3()?;
        }
        if let Some(value) = map.get("Size") {
            self.size = value.as_vector3()?;
        }
        if let Some(value) = map.get("AtAxis") {
            self.at_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("LeftAxis") {
            self.left_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("UpAxis") {
            self.up_axis = value.as_vector3()?;
        }
        if let Some(value) = map.get("ChangedGrid") {
            self.changed_grid = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::AtomicPassObjectPacketTaskDataBlock {
    fn new_generated() -> Self {
        Self {
            task_id: libremetaverse_types::UUID::zero(),
            attachment_needs_save: false,
        }
    }
    fn generated_length(&self) -> i32 {
        17_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.task_id = reader.read_uuid()?;
        self.attachment_needs_save = reader.read_u8()? != 0;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.task_id)?;
        writer.write_u8(u8::from(self.attachment_needs_save))?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "TaskID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.task_id),
        )?;
        map.add_with_string_osd(
            "AttachmentNeedsSave".to_owned(),
            libremetaverse_structured_data::OSD::Boolean(self.attachment_needs_save),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("TaskID") {
            self.task_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AttachmentNeedsSave") {
            self.attachment_needs_save = value.as_boolean()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GenericStreamingMessagePacketMethodDataBlock {
    fn new_generated() -> Self {
        Self { method: 0 }
    }
    fn generated_length(&self) -> i32 {
        2_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.method = reader.read_u16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u16_le(self.method)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Method".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.method)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Method") {
            self.method = value.as_integer()? as u16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GenericStreamingMessagePacketDataBlockBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(2).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(2)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 2)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::SoundTriggerPacketSoundDataBlock {
    fn new_generated() -> Self {
        Self {
            sound_id: libremetaverse_types::UUID::zero(),
            owner_id: libremetaverse_types::UUID::zero(),
            object_id: libremetaverse_types::UUID::zero(),
            parent_id: libremetaverse_types::UUID::zero(),
            handle: 0,
            position: libremetaverse_types::Vector3::zero(),
            gain: 0.0_f32,
        }
    }
    fn generated_length(&self) -> i32 {
        88_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.sound_id = reader.read_uuid()?;
        self.owner_id = reader.read_uuid()?;
        self.object_id = reader.read_uuid()?;
        self.parent_id = reader.read_uuid()?;
        self.handle = reader.read_u64_le()?;
        self.position = reader.read_vector3()?;
        self.gain = reader.read_f32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.sound_id)?;
        writer.write_uuid(&self.owner_id)?;
        writer.write_uuid(&self.object_id)?;
        writer.write_uuid(&self.parent_id)?;
        writer.write_u64_le(self.handle)?;
        writer.write_vector3(&self.position)?;
        writer.write_f32_le(self.gain)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "SoundID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.sound_id),
        )?;
        map.add_with_string_osd(
            "OwnerID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.owner_id),
        )?;
        map.add_with_string_osd(
            "ObjectID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.object_id),
        )?;
        map.add_with_string_osd(
            "ParentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.parent_id),
        )?;
        map.add_with_string_osd(
            "Handle".to_owned(),
            libremetaverse_structured_data::OSD::Binary(
                self.handle.to_le_bytes().to_vec(),
            ),
        )?;
        map.add_with_string_osd(
            "Position".to_owned(),
            libremetaverse_structured_data::OSD::from_vector3(self.position)?,
        )?;
        map.add_with_string_osd(
            "Gain".to_owned(),
            libremetaverse_structured_data::OSD::Real(f64::from(self.gain)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("SoundID") {
            self.sound_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("OwnerID") {
            self.owner_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ObjectID") {
            self.object_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("ParentID") {
            self.parent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("Handle") {
            self.handle = osd_u64(&value)?;
        }
        if let Some(value) = map.get("Position") {
            self.position = value.as_vector3()?;
        }
        if let Some(value) = map.get("Gain") {
            self.gain = value.as_real()? as f32;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAnimationPacketSenderBlock {
    fn new_generated() -> Self {
        Self {
            id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        16_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "ID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("ID") {
            self.id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::ObjectAnimationPacketAnimationListBlock {
    fn new_generated() -> Self {
        Self {
            anim_id: libremetaverse_types::UUID::zero(),
            anim_sequence_id: 0,
        }
    }
    fn generated_length(&self) -> i32 {
        20_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.anim_id = reader.read_uuid()?;
        self.anim_sequence_id = reader.read_i32_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.anim_id)?;
        writer.write_i32_le(self.anim_sequence_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AnimID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.anim_id),
        )?;
        map.add_with_string_osd(
            "AnimSequenceID".to_owned(),
            libremetaverse_structured_data::OSD::Integer(self.anim_sequence_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AnimID") {
            self.anim_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("AnimSequenceID") {
            self.anim_sequence_id = value.as_integer()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GameControlInputPacketAgentDataBlock {
    fn new_generated() -> Self {
        Self {
            agent_id: libremetaverse_types::UUID::zero(),
            session_id: libremetaverse_types::UUID::zero(),
        }
    }
    fn generated_length(&self) -> i32 {
        32_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.agent_id = reader.read_uuid()?;
        self.session_id = reader.read_uuid()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_uuid(&self.agent_id)?;
        writer.write_uuid(&self.session_id)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "AgentID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.agent_id),
        )?;
        map.add_with_string_osd(
            "SessionID".to_owned(),
            libremetaverse_structured_data::OSD::UUID(self.session_id),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("AgentID") {
            self.agent_id = value.as_uuid()?;
        }
        if let Some(value) = map.get("SessionID") {
            self.session_id = value.as_uuid()?;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GameControlInputPacketAxisDataBlock {
    fn new_generated() -> Self {
        Self { index: 0, value: 0 }
    }
    fn generated_length(&self) -> i32 {
        3_i32
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.index = reader.read_u8()?;
        self.value = reader.read_i16_le()?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_u8(self.index)?;
        writer.write_i16_le(self.value)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Index".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.index)),
        )?;
        map.add_with_string_osd(
            "Value".to_owned(),
            libremetaverse_structured_data::OSD::Integer(i32::from(self.value)),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Index") {
            self.index = value.as_integer()? as u8;
        }
        if let Some(value) = map.get("Value") {
            self.value = value.as_integer()? as i16;
        }
        Ok(())
    }
}
impl GeneratedBlock for crate::packets::GameControlInputPacketButtonDataBlock {
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 0_i32;
        length = length.saturating_add(1).saturating_add(usize_to_i32(self.data.len()));
        length
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        self.data = reader.read_variable(1)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer.write_variable(&self.data, 1)?;
        Ok(())
    }
    fn to_osd(&self) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let map = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        map.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Binary(self.data.clone()),
        )?;
        Ok(map)
    }
    fn from_osd(
        &mut self,
        map: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(value) = map.get("Data") {
            self.data = value.as_binary()?;
        }
        Ok(())
    }
}
impl GeneratedPacket for crate::packets::TestMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            base: crate::packets::Packet {
                has_variable_blocks: false,
                header: new_header(crate::PacketFrequency::Low, 1, true),
                type_: PacketType::TestMessage,
            },
            test_block1: <crate::packets::TestMessagePacketTestBlock1Block as GeneratedBlock>::new_generated(),
            neighbor_block: (0..4)
                .map(|_| <crate::packets::TestMessagePacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                .collect(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.test_block1));
        for block in &self.neighbor_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        crate::packet_wire::clone_header(&self.base.header)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        self.base.header = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.test_block1, reader)?;
        let mut neighbor_block = Vec::new();
        neighbor_block.try_reserve_exact(4).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..4 {
            let mut block = <crate::packets::TestMessagePacketNeighborBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            neighbor_block.push(block);
        }
        self.neighbor_block = neighbor_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.test_block1, writer)?;
        if self.neighbor_block.len() != 4 {
            return Err(crate::Error::Argument);
        }
        for block in &self.neighbor_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut test_block1_values = Vec::with_capacity(1);
        test_block1_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.test_block1)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TestBlock1".to_owned(),
            libremetaverse_structured_data::OSD::Array(test_block1_values),
        )?;
        let mut neighbor_block_values = Vec::with_capacity(self.neighbor_block.len());
        for block in &self.neighbor_block {
            neighbor_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NeighborBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(neighbor_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TestBlock1")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.test_block1, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NeighborBlock")
        {
            if self.neighbor_block.len() != 4 {
                self.neighbor_block = (0..4)
                    .map(|_| <crate::packets::TestMessagePacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                    .collect();
            }
            for (block, value) in self
                .neighbor_block
                .iter_mut()
                .zip(values.iter().take(4))
            {
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(block, &map)?;
                }
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PacketAckPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { packets: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.packets {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 65531, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let packets_count = usize::from(reader.read_u8()?);
        let mut packets = Vec::new();
        packets
            .try_reserve_exact(packets_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..packets_count {
            let mut block = <crate::packets::PacketAckPacketPacketsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            packets.push(block);
        }
        self.packets = packets;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.packets.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.packets {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut packets_values = Vec::with_capacity(self.packets.len());
        for block in &self.packets {
            packets_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Packets".to_owned(),
            libremetaverse_structured_data::OSD::Array(packets_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Packets")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::PacketAckPacketPacketsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.packets = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut packets_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut packets_count = 0_usize;
            while packets_start + packets_count < self.packets.len()
                && packets_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.packets[packets_start + packets_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || packets_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    packets_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(packets_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.packets[packets_start..packets_start + packets_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            packets_start += packets_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if packets_start >= self.packets.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::OpenCircuitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            circuit_info: <crate::packets::OpenCircuitPacketCircuitInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.circuit_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 65532, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.circuit_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.circuit_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut circuit_info_values = Vec::with_capacity(1);
        circuit_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.circuit_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "CircuitInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(circuit_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CircuitInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.circuit_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CloseCircuitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 65533, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AddCircuitCodePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            circuit_code: <crate::packets::AddCircuitCodePacketCircuitCodeBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.circuit_code));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 2, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.circuit_code, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.circuit_code, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut circuit_code_values = Vec::with_capacity(1);
        circuit_code_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.circuit_code)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Array(circuit_code_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CircuitCode")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.circuit_code, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UseCircuitCodePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            circuit_code: <crate::packets::UseCircuitCodePacketCircuitCodeBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.circuit_code));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 3, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.circuit_code, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.circuit_code, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut circuit_code_values = Vec::with_capacity(1);
        circuit_code_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.circuit_code)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "CircuitCode".to_owned(),
            libremetaverse_structured_data::OSD::Array(circuit_code_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CircuitCode")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.circuit_code, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarTextureUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarTextureUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
            texture_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.texture_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 4, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AvatarTextureUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        let texture_data_count = usize::from(reader.read_u8()?);
        let mut texture_data = Vec::new();
        texture_data
            .try_reserve_exact(texture_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..texture_data_count {
            let mut block = <crate::packets::AvatarTextureUpdatePacketTextureDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            texture_data.push(block);
        }
        self.texture_data = texture_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.texture_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.texture_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        let mut texture_data_values = Vec::with_capacity(self.texture_data.len());
        for block in &self.texture_data {
            texture_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "TextureData".to_owned(),
            libremetaverse_structured_data::OSD::Array(texture_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarTextureUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TextureData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarTextureUpdatePacketTextureDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.texture_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut wearable_data_start = 0_usize;
        let mut texture_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut wearable_data_count = 0_usize;
            while wearable_data_start + wearable_data_count < self.wearable_data.len()
                && wearable_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .wearable_data[wearable_data_start + wearable_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || wearable_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    wearable_data_count += 1;
                } else {
                    break;
                }
            }
            let mut texture_data_count = 0_usize;
            while texture_data_start + texture_data_count < self.texture_data.len()
                && texture_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.texture_data[texture_data_start + texture_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || texture_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    texture_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(wearable_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .wearable_data[wearable_data_start..wearable_data_start
                + wearable_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            wearable_data_start += wearable_data_count;
            writer
                .write_u8(
                    u8::try_from(texture_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .texture_data[texture_data_start..texture_data_start
                + texture_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            texture_data_start += texture_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if wearable_data_start >= self.wearable_data.len()
                && texture_data_start >= self.texture_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SimulatorMapUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            map_data: <crate::packets::SimulatorMapUpdatePacketMapDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.map_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 5, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.map_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.map_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut map_data_values = Vec::with_capacity(1);
        map_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.map_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MapData".to_owned(),
            libremetaverse_structured_data::OSD::Array(map_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MapData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.map_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimulatorSetMapPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            map_data: <crate::packets::SimulatorSetMapPacketMapDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.map_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 6, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.map_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.map_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut map_data_values = Vec::with_capacity(1);
        map_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.map_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MapData".to_owned(),
            libremetaverse_structured_data::OSD::Array(map_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MapData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.map_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SubscribeLoadPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 7, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UnsubscribeLoadPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 8, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimulatorReadyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            simulator_block: <crate::packets::SimulatorReadyPacketSimulatorBlockBlock as GeneratedBlock>::new_generated(),
            telehub_block: <crate::packets::SimulatorReadyPacketTelehubBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.simulator_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.telehub_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 9, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.simulator_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.telehub_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.simulator_block, writer)?;
        GeneratedBlock::encode_payload(&self.telehub_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut simulator_block_values = Vec::with_capacity(1);
        simulator_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(simulator_block_values),
        )?;
        let mut telehub_block_values = Vec::with_capacity(1);
        telehub_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.telehub_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TelehubBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(telehub_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TelehubBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.telehub_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TelehubInfoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            telehub_block: <crate::packets::TelehubInfoPacketTelehubBlockBlock as GeneratedBlock>::new_generated(),
            spawn_point_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.telehub_block));
        length = length.saturating_add(1);
        for block in &self.spawn_point_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 10, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.telehub_block, reader)?;
        let spawn_point_block_count = usize::from(reader.read_u8()?);
        let mut spawn_point_block = Vec::new();
        spawn_point_block
            .try_reserve_exact(spawn_point_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..spawn_point_block_count {
            let mut block = <crate::packets::TelehubInfoPacketSpawnPointBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            spawn_point_block.push(block);
        }
        self.spawn_point_block = spawn_point_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.telehub_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.spawn_point_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.spawn_point_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut telehub_block_values = Vec::with_capacity(1);
        telehub_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.telehub_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TelehubBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(telehub_block_values),
        )?;
        let mut spawn_point_block_values = Vec::with_capacity(
            self.spawn_point_block.len(),
        );
        for block in &self.spawn_point_block {
            spawn_point_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SpawnPointBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(spawn_point_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TelehubBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.telehub_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SpawnPointBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::TelehubInfoPacketSpawnPointBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.spawn_point_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut spawn_point_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.telehub_block),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut spawn_point_block_count = 0_usize;
            while spawn_point_block_start + spawn_point_block_count
                < self.spawn_point_block.len()
                && spawn_point_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .spawn_point_block[spawn_point_block_start
                                + spawn_point_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || spawn_point_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    spawn_point_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.telehub_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(spawn_point_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .spawn_point_block[spawn_point_block_start..spawn_point_block_start
                + spawn_point_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            spawn_point_block_start += spawn_point_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if spawn_point_block_start >= self.spawn_point_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SimulatorPresentAtLocationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            simulator_public_host_block: <crate::packets::SimulatorPresentAtLocationPacketSimulatorPublicHostBlockBlock as GeneratedBlock>::new_generated(),
            neighbor_block: (0..4)
                .map(|_| <crate::packets::SimulatorPresentAtLocationPacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                .collect(),
            simulator_block: <crate::packets::SimulatorPresentAtLocationPacketSimulatorBlockBlock as GeneratedBlock>::new_generated(),
            telehub_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.simulator_public_host_block),
            );
        for block in &self.neighbor_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.simulator_block));
        length = length.saturating_add(1);
        for block in &self.telehub_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 11, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.simulator_public_host_block, reader)?;
        let mut neighbor_block = Vec::new();
        neighbor_block.try_reserve_exact(4).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..4 {
            let mut block = <crate::packets::SimulatorPresentAtLocationPacketNeighborBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            neighbor_block.push(block);
        }
        self.neighbor_block = neighbor_block;
        GeneratedBlock::decode_payload(&mut self.simulator_block, reader)?;
        let telehub_block_count = usize::from(reader.read_u8()?);
        let mut telehub_block = Vec::new();
        telehub_block
            .try_reserve_exact(telehub_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..telehub_block_count {
            let mut block = <crate::packets::SimulatorPresentAtLocationPacketTelehubBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            telehub_block.push(block);
        }
        self.telehub_block = telehub_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.simulator_public_host_block, writer)?;
        if self.neighbor_block.len() != 4 {
            return Err(crate::Error::Argument);
        }
        for block in &self.neighbor_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.simulator_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.telehub_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.telehub_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut simulator_public_host_block_values = Vec::with_capacity(1);
        simulator_public_host_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_public_host_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorPublicHostBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(
                simulator_public_host_block_values,
            ),
        )?;
        let mut neighbor_block_values = Vec::with_capacity(self.neighbor_block.len());
        for block in &self.neighbor_block {
            neighbor_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NeighborBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(neighbor_block_values),
        )?;
        let mut simulator_block_values = Vec::with_capacity(1);
        simulator_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(simulator_block_values),
        )?;
        let mut telehub_block_values = Vec::with_capacity(self.telehub_block.len());
        for block in &self.telehub_block {
            telehub_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "TelehubBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(telehub_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorPublicHostBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_public_host_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NeighborBlock")
        {
            if self.neighbor_block.len() != 4 {
                self.neighbor_block = (0..4)
                    .map(|_| <crate::packets::SimulatorPresentAtLocationPacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                    .collect();
            }
            for (block, value) in self
                .neighbor_block
                .iter_mut()
                .zip(values.iter().take(4))
            {
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(block, &map)?;
                }
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TelehubBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SimulatorPresentAtLocationPacketTelehubBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.telehub_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut telehub_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(
                                &self.simulator_public_host_block,
                            ),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            for block in &self.neighbor_block {
                fixed_length = fixed_length
                    .checked_add(
                        usize::try_from(GeneratedBlock::generated_length(block))
                            .map_err(|_| crate::Error::Argument)?,
                    )
                    .ok_or(crate::Error::Argument)?;
            }
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.simulator_block),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut telehub_block_count = 0_usize;
            while telehub_block_start + telehub_block_count < self.telehub_block.len()
                && telehub_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .telehub_block[telehub_block_start + telehub_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || telehub_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    telehub_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(
                &self.simulator_public_host_block,
                &mut writer,
            )?;
            if self.neighbor_block.len() != 4 {
                return Err(crate::Error::Argument);
            }
            for block in &self.neighbor_block {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            GeneratedBlock::encode_payload(&self.simulator_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(telehub_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .telehub_block[telehub_block_start..telehub_block_start
                + telehub_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            telehub_block_start += telehub_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if telehub_block_start >= self.telehub_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SimulatorLoadPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            simulator_load: <crate::packets::SimulatorLoadPacketSimulatorLoadBlock as GeneratedBlock>::new_generated(),
            agent_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.simulator_load));
        length = length.saturating_add(1);
        for block in &self.agent_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 12, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.simulator_load, reader)?;
        let agent_list_count = usize::from(reader.read_u8()?);
        let mut agent_list = Vec::new();
        agent_list
            .try_reserve_exact(agent_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_list_count {
            let mut block = <crate::packets::SimulatorLoadPacketAgentListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_list.push(block);
        }
        self.agent_list = agent_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.simulator_load, writer)?;
        writer
            .write_u8(
                u8::try_from(self.agent_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut simulator_load_values = Vec::with_capacity(1);
        simulator_load_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_load)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorLoad".to_owned(),
            libremetaverse_structured_data::OSD::Array(simulator_load_values),
        )?;
        let mut agent_list_values = Vec::with_capacity(self.agent_list.len());
        for block in &self.agent_list {
            agent_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentList".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorLoad")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_load, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SimulatorLoadPacketAgentListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut agent_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.simulator_load),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut agent_list_count = 0_usize;
            while agent_list_start + agent_list_count < self.agent_list.len()
                && agent_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_list[agent_list_start + agent_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.simulator_load, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(agent_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_list[agent_list_start..agent_list_start + agent_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_list_start += agent_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if agent_list_start >= self.agent_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SimulatorShutdownRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 13, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RegionPresenceRequestByRegionIDPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { region_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.region_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 14, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let region_data_count = usize::from(reader.read_u8()?);
        let mut region_data = Vec::new();
        region_data
            .try_reserve_exact(region_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_data_count {
            let mut block = <crate::packets::RegionPresenceRequestByRegionIDPacketRegionDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_data.push(block);
        }
        self.region_data = region_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.region_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(self.region_data.len());
        for block in &self.region_data {
            region_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionPresenceRequestByRegionIDPacketRegionDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_data_count = 0_usize;
            while region_data_start + region_data_count < self.region_data.len()
                && region_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_data[region_data_start + region_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_data[region_data_start..region_data_start + region_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_data_start += region_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_data_start >= self.region_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RegionPresenceRequestByHandlePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { region_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.region_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 15, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let region_data_count = usize::from(reader.read_u8()?);
        let mut region_data = Vec::new();
        region_data
            .try_reserve_exact(region_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_data_count {
            let mut block = <crate::packets::RegionPresenceRequestByHandlePacketRegionDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_data.push(block);
        }
        self.region_data = region_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.region_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(self.region_data.len());
        for block in &self.region_data {
            region_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionPresenceRequestByHandlePacketRegionDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_data_count = 0_usize;
            while region_data_start + region_data_count < self.region_data.len()
                && region_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_data[region_data_start + region_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_data[region_data_start..region_data_start + region_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_data_start += region_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_data_start >= self.region_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RegionPresenceResponsePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { region_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.region_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 16, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let region_data_count = usize::from(reader.read_u8()?);
        let mut region_data = Vec::new();
        region_data
            .try_reserve_exact(region_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_data_count {
            let mut block = <crate::packets::RegionPresenceResponsePacketRegionDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_data.push(block);
        }
        self.region_data = region_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.region_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(self.region_data.len());
        for block in &self.region_data {
            region_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionPresenceResponsePacketRegionDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_data_count = 0_usize;
            while region_data_start + region_data_count < self.region_data.len()
                && region_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_data[region_data_start + region_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_data[region_data_start..region_data_start + region_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_data_start += region_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_data_start >= self.region_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UpdateSimulatorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            simulator_info: <crate::packets::UpdateSimulatorPacketSimulatorInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.simulator_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 17, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.simulator_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.simulator_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut simulator_info_values = Vec::with_capacity(1);
        simulator_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(simulator_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LogDwellTimePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            dwell_info: <crate::packets::LogDwellTimePacketDwellInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.dwell_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 18, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.dwell_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.dwell_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut dwell_info_values = Vec::with_capacity(1);
        dwell_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.dwell_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DwellInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(dwell_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DwellInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.dwell_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::FeatureDisabledPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            failure_info: <crate::packets::FeatureDisabledPacketFailureInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.failure_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 19, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.failure_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.failure_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut failure_info_values = Vec::with_capacity(1);
        failure_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.failure_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FailureInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(failure_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FailureInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.failure_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LogFailedMoneyTransactionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transaction_data: <crate::packets::LogFailedMoneyTransactionPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 20, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UserReportInternalPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            report_data: <crate::packets::UserReportInternalPacketReportDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.report_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 21, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.report_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.report_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut report_data_values = Vec::with_capacity(1);
        report_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.report_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ReportData".to_owned(),
            libremetaverse_structured_data::OSD::Array(report_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReportData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.report_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetSimStatusInDatabasePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::SetSimStatusInDatabasePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 22, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetSimPresenceInDatabasePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            sim_data: <crate::packets::SetSimPresenceInDatabasePacketSimDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.sim_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 23, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sim_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sim_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sim_data_values = Vec::with_capacity(1);
        sim_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sim_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimData".to_owned(),
            libremetaverse_structured_data::OSD::Array(sim_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sim_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EconomyDataRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 24, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EconomyDataPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::EconomyDataPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 25, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPickerRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPickerRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::AvatarPickerRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 26, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPickerRequestBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPickerRequestBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::AvatarPickerRequestBackendPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 27, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPickerReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPickerReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 28, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::AvatarPickerReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarPickerReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::PlacesQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PlacesQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::PlacesQueryPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::PlacesQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 29, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PlacesReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PlacesReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::PlacesReplyPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
            query_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length = length.saturating_add(1);
        for block in &self.query_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 30, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        let query_data_count = usize::from(reader.read_u8()?);
        let mut query_data = Vec::new();
        query_data
            .try_reserve_exact(query_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_data_count {
            let mut block = <crate::packets::PlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_data.push(block);
        }
        self.query_data = query_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(self.query_data.len());
        for block in &self.query_data {
            query_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::PlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.transaction_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_data_count = 0_usize;
            while query_data_start + query_data_count < self.query_data.len()
                && query_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.query_data[query_data_start + query_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.transaction_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_data[query_data_start..query_data_start + query_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_data_start += query_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_data_start >= self.query_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirFindQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirFindQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirFindQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 31, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirFindQueryBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirFindQueryBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirFindQueryBackendPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 32, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirPlacesQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPlacesQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPlacesQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 33, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirPlacesQueryBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPlacesQueryBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPlacesQueryBackendPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 34, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirPlacesReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            base: crate::packets::Packet {
                has_variable_blocks: true,
                header: new_header(crate::PacketFrequency::Low, 35, true),
                type_: PacketType::DirPlacesReply,
            },
            agent_data: <crate::packets::DirPlacesReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: Vec::new(),
            query_replies: Vec::new(),
            status_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.query_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.status_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        crate::packet_wire::clone_header(&self.base.header)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        self.base.header = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let query_data_count = usize::from(reader.read_u8()?);
        let mut query_data = Vec::new();
        query_data
            .try_reserve_exact(query_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_data_count {
            let mut block = <crate::packets::DirPlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_data.push(block);
        }
        self.query_data = query_data;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirPlacesReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        let status_data_count = usize::from(reader.read_u8()?);
        let mut status_data = Vec::new();
        status_data
            .try_reserve_exact(status_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..status_data_count {
            let mut block = <crate::packets::DirPlacesReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            status_data.push(block);
        }
        self.status_data = status_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.status_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.status_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(self.query_data.len());
        for block in &self.query_data {
            query_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        let mut status_data_values = Vec::with_capacity(self.status_data.len());
        for block in &self.status_data {
            status_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "StatusData".to_owned(),
            libremetaverse_structured_data::OSD::Array(status_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirPlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirPlacesReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("StatusData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirPlacesReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.status_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_data_start = 0_usize;
        let mut query_replies_start = 0_usize;
        let mut status_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(3).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_data_count = 0_usize;
            while query_data_start + query_data_count < self.query_data.len()
                && query_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.query_data[query_data_start + query_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_data_count += 1;
                } else {
                    break;
                }
            }
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let mut status_data_count = 0_usize;
            while status_data_start + status_data_count < self.status_data.len()
                && status_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.status_data[status_data_start + status_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || status_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    status_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_data[query_data_start..query_data_start + query_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_data_start += query_data_count;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            writer
                .write_u8(
                    u8::try_from(status_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .status_data[status_data_start..status_data_start + status_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            status_data_start += status_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_data_start >= self.query_data.len()
                && query_replies_start >= self.query_replies.len()
                && status_data_start >= self.status_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirPeopleReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPeopleReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPeopleReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 36, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirPeopleReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirPeopleReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirEventsReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirEventsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirEventsReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
            status_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.status_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 37, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirEventsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        let status_data_count = usize::from(reader.read_u8()?);
        let mut status_data = Vec::new();
        status_data
            .try_reserve_exact(status_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..status_data_count {
            let mut block = <crate::packets::DirEventsReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            status_data.push(block);
        }
        self.status_data = status_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.status_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.status_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        let mut status_data_values = Vec::with_capacity(self.status_data.len());
        for block in &self.status_data {
            status_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "StatusData".to_owned(),
            libremetaverse_structured_data::OSD::Array(status_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirEventsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("StatusData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirEventsReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.status_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        let mut status_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let mut status_data_count = 0_usize;
            while status_data_start + status_data_count < self.status_data.len()
                && status_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.status_data[status_data_start + status_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || status_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    status_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            writer
                .write_u8(
                    u8::try_from(status_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .status_data[status_data_start..status_data_start + status_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            status_data_start += status_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len()
                && status_data_start >= self.status_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirGroupsReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirGroupsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirGroupsReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 38, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirGroupsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirGroupsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirClassifiedQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirClassifiedQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirClassifiedQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 39, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirClassifiedQueryBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirClassifiedQueryBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirClassifiedQueryBackendPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 40, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirClassifiedReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirClassifiedReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirClassifiedReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
            status_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.status_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 41, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirClassifiedReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        let status_data_count = usize::from(reader.read_u8()?);
        let mut status_data = Vec::new();
        status_data
            .try_reserve_exact(status_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..status_data_count {
            let mut block = <crate::packets::DirClassifiedReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            status_data.push(block);
        }
        self.status_data = status_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.status_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.status_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        let mut status_data_values = Vec::with_capacity(self.status_data.len());
        for block in &self.status_data {
            status_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "StatusData".to_owned(),
            libremetaverse_structured_data::OSD::Array(status_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirClassifiedReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("StatusData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirClassifiedReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.status_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        let mut status_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let mut status_data_count = 0_usize;
            while status_data_start + status_data_count < self.status_data.len()
                && status_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.status_data[status_data_start + status_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || status_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    status_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            writer
                .write_u8(
                    u8::try_from(status_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .status_data[status_data_start..status_data_start + status_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            status_data_start += status_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len()
                && status_data_start >= self.status_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AvatarClassifiedReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarClassifiedReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 42, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::AvatarClassifiedReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarClassifiedReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ClassifiedInfoRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ClassifiedInfoRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ClassifiedInfoRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 43, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ClassifiedInfoReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ClassifiedInfoReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ClassifiedInfoReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 44, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ClassifiedInfoUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ClassifiedInfoUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ClassifiedInfoUpdatePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 45, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ClassifiedDeletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ClassifiedDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ClassifiedDeletePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 46, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ClassifiedGodDeletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ClassifiedGodDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ClassifiedGodDeletePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 47, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirLandQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirLandQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirLandQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 48, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirLandQueryBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirLandQueryBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirLandQueryBackendPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 49, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirLandReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirLandReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirLandReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 50, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirLandReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirLandReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DirPopularQueryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPopularQueryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPopularQueryPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 51, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirPopularQueryBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPopularQueryBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPopularQueryBackendPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 52, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DirPopularReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DirPopularReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::DirPopularReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            query_replies: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length.saturating_add(1);
        for block in &self.query_replies {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 53, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        let query_replies_count = usize::from(reader.read_u8()?);
        let mut query_replies = Vec::new();
        query_replies
            .try_reserve_exact(query_replies_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..query_replies_count {
            let mut block = <crate::packets::DirPopularReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            query_replies.push(block);
        }
        self.query_replies = query_replies;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.query_replies.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.query_replies {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut query_replies_values = Vec::with_capacity(self.query_replies.len());
        for block in &self.query_replies {
            query_replies_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "QueryReplies".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_replies_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryReplies")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DirPopularReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.query_replies = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut query_replies_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.query_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut query_replies_count = 0_usize;
            while query_replies_start + query_replies_count < self.query_replies.len()
                && query_replies_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .query_replies[query_replies_start + query_replies_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || query_replies_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    query_replies_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.query_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(query_replies_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .query_replies[query_replies_start..query_replies_start
                + query_replies_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            query_replies_start += query_replies_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if query_replies_start >= self.query_replies.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelInfoRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelInfoRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelInfoRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 54, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelInfoReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelInfoReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelInfoReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 55, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelObjectOwnersRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelObjectOwnersRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelObjectOwnersRequestPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 56, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelObjectOwnersReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 57, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::ParcelObjectOwnersReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelObjectOwnersReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupNoticesListRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupNoticesListRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::GroupNoticesListRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 58, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupNoticesListReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupNoticesListReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 59, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::GroupNoticesListReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupNoticesListReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupNoticeRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupNoticeRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::GroupNoticeRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 60, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupNoticeAddPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupNoticeAddPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            message_block: <crate::packets::GroupNoticeAddPacketMessageBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.message_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 61, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.message_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.message_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut message_block_values = Vec::with_capacity(1);
        message_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.message_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MessageBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(message_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MessageBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.message_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::TeleportRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            info: <crate::packets::TeleportRequestPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 62, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportLocationRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::TeleportLocationRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            info: <crate::packets::TeleportLocationRequestPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 63, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportLocalPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportLocalPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 64, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportLandmarkRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportLandmarkRequestPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 65, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportProgressPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::TeleportProgressPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            info: <crate::packets::TeleportProgressPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 66, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DataHomeLocationRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::DataHomeLocationRequestPacketInfoBlock as GeneratedBlock>::new_generated(),
            agent_info: <crate::packets::DataHomeLocationRequestPacketAgentInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 67, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        GeneratedBlock::decode_payload(&mut self.agent_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        GeneratedBlock::encode_payload(&self.agent_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        let mut agent_info_values = Vec::with_capacity(1);
        agent_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DataHomeLocationReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::DataHomeLocationReplyPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 68, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportFinishPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportFinishPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 69, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::StartLurePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::StartLurePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            info: <crate::packets::StartLurePacketInfoBlock as GeneratedBlock>::new_generated(),
            target_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length = length.saturating_add(1);
        for block in &self.target_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 70, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        let target_data_count = usize::from(reader.read_u8()?);
        let mut target_data = Vec::new();
        target_data
            .try_reserve_exact(target_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..target_data_count {
            let mut block = <crate::packets::StartLurePacketTargetDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            target_data.push(block);
        }
        self.target_data = target_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.info, writer)?;
        writer
            .write_u8(
                u8::try_from(self.target_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.target_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        let mut target_data_values = Vec::with_capacity(self.target_data.len());
        for block in &self.target_data {
            target_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "TargetData".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::StartLurePacketTargetDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.target_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut target_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.info))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut target_data_count = 0_usize;
            while target_data_start + target_data_count < self.target_data.len()
                && target_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.target_data[target_data_start + target_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || target_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    target_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.info, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(target_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .target_data[target_data_start..target_data_start + target_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            target_data_start += target_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if target_data_start >= self.target_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::TeleportLureRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportLureRequestPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 71, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportCancelPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportCancelPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 72, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportStartPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportStartPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 73, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportFailedPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            info: <crate::packets::TeleportFailedPacketInfoBlock as GeneratedBlock>::new_generated(),
            alert_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length = length.saturating_add(1);
        for block in &self.alert_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 74, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        let alert_info_count = usize::from(reader.read_u8()?);
        let mut alert_info = Vec::new();
        alert_info
            .try_reserve_exact(alert_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..alert_info_count {
            let mut block = <crate::packets::TeleportFailedPacketAlertInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            alert_info.push(block);
        }
        self.alert_info = alert_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info, writer)?;
        writer
            .write_u8(
                u8::try_from(self.alert_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.alert_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        let mut alert_info_values = Vec::with_capacity(self.alert_info.len());
        for block in &self.alert_info {
            alert_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AlertInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(alert_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AlertInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::TeleportFailedPacketAlertInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.alert_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut alert_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.info))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut alert_info_count = 0_usize;
            while alert_info_start + alert_info_count < self.alert_info.len()
                && alert_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.alert_info[alert_info_start + alert_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || alert_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    alert_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.info, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(alert_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .alert_info[alert_info_start..alert_info_start + alert_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            alert_info_start += alert_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if alert_info_start >= self.alert_info.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UndoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UndoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 75, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::UndoPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UndoPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RedoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RedoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 76, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::RedoPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RedoPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UndoLandPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UndoLandPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 77, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentPausePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentPausePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 78, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentResumePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentResumePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 79, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChatFromViewerPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChatFromViewerPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            chat_data: <crate::packets::ChatFromViewerPacketChatDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.chat_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 80, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.chat_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.chat_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut chat_data_values = Vec::with_capacity(1);
        chat_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.chat_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ChatData".to_owned(),
            libremetaverse_structured_data::OSD::Array(chat_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ChatData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.chat_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentThrottlePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentThrottlePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            throttle: <crate::packets::AgentThrottlePacketThrottleBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.throttle));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 81, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.throttle, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.throttle, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut throttle_values = Vec::with_capacity(1);
        throttle_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.throttle)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Throttle".to_owned(),
            libremetaverse_structured_data::OSD::Array(throttle_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Throttle")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.throttle, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentFOVPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentFOVPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            fov_block: <crate::packets::AgentFOVPacketFOVBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.fov_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 82, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.fov_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.fov_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut fov_block_values = Vec::with_capacity(1);
        fov_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.fov_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FOVBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(fov_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FOVBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.fov_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentHeightWidthPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentHeightWidthPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            height_width_block: <crate::packets::AgentHeightWidthPacketHeightWidthBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.height_width_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 83, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.height_width_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.height_width_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut height_width_block_values = Vec::with_capacity(1);
        height_width_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.height_width_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HeightWidthBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(height_width_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HeightWidthBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.height_width_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentSetAppearancePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentSetAppearancePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
            object_data: <crate::packets::AgentSetAppearancePacketObjectDataBlock as GeneratedBlock>::new_generated(),
            visual_param: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.visual_param {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 84, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AgentSetAppearancePacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let visual_param_count = usize::from(reader.read_u8()?);
        let mut visual_param = Vec::new();
        visual_param
            .try_reserve_exact(visual_param_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..visual_param_count {
            let mut block = <crate::packets::AgentSetAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            visual_param.push(block);
        }
        self.visual_param = visual_param;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.visual_param.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.visual_param {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut visual_param_values = Vec::with_capacity(self.visual_param.len());
        for block in &self.visual_param {
            visual_param_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "VisualParam".to_owned(),
            libremetaverse_structured_data::OSD::Array(visual_param_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentSetAppearancePacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("VisualParam")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentSetAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.visual_param = blocks;
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentQuitCopyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentQuitCopyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            fuse_block: <crate::packets::AgentQuitCopyPacketFuseBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.fuse_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 85, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.fuse_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.fuse_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut fuse_block_values = Vec::with_capacity(1);
        fuse_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.fuse_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FuseBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(fuse_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FuseBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.fuse_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ImageNotInDatabasePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            image_id: <crate::packets::ImageNotInDatabasePacketImageIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.image_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 86, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.image_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.image_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut image_id_values = Vec::with_capacity(1);
        image_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.image_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::Array(image_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ImageID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.image_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RebakeAvatarTexturesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            texture_data: <crate::packets::RebakeAvatarTexturesPacketTextureDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.texture_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 87, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.texture_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.texture_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut texture_data_values = Vec::with_capacity(1);
        texture_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.texture_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TextureData".to_owned(),
            libremetaverse_structured_data::OSD::Array(texture_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TextureData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.texture_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetAlwaysRunPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SetAlwaysRunPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 88, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectDeletePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 89, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDeletePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDeletePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDuplicatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDuplicatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            shared_data: <crate::packets::ObjectDuplicatePacketSharedDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.shared_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 90, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.shared_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDuplicatePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.shared_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut shared_data_values = Vec::with_capacity(1);
        shared_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.shared_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SharedData".to_owned(),
            libremetaverse_structured_data::OSD::Array(shared_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SharedData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.shared_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDuplicatePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.shared_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.shared_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDuplicateOnRayPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDuplicateOnRayPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 91, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDuplicateOnRayPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDuplicateOnRayPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectScalePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectScalePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 92, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectScalePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectScalePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectRotationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectRotationPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 93, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectRotationPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectRotationPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectFlagUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectFlagUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            extra_physics: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.extra_physics {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 94, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let extra_physics_count = usize::from(reader.read_u8()?);
        let mut extra_physics = Vec::new();
        extra_physics
            .try_reserve_exact(extra_physics_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..extra_physics_count {
            let mut block = <crate::packets::ObjectFlagUpdatePacketExtraPhysicsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            extra_physics.push(block);
        }
        self.extra_physics = extra_physics;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.extra_physics.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.extra_physics {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut extra_physics_values = Vec::with_capacity(self.extra_physics.len());
        for block in &self.extra_physics {
            extra_physics_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ExtraPhysics".to_owned(),
            libremetaverse_structured_data::OSD::Array(extra_physics_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ExtraPhysics")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectFlagUpdatePacketExtraPhysicsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.extra_physics = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut extra_physics_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut extra_physics_count = 0_usize;
            while extra_physics_start + extra_physics_count < self.extra_physics.len()
                && extra_physics_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .extra_physics[extra_physics_start + extra_physics_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || extra_physics_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    extra_physics_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(extra_physics_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .extra_physics[extra_physics_start..extra_physics_start
                + extra_physics_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            extra_physics_start += extra_physics_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if extra_physics_start >= self.extra_physics.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectClickActionPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectClickActionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 95, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectClickActionPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectClickActionPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectImagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectImagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 96, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectImagePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectImagePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectBypassModUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectBypassModUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 431, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectBypassModUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectBypassModUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectMaterialPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectMaterialPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 97, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectMaterialPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectMaterialPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectShapePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectShapePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 98, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectShapePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectShapePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectExtraParamsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectExtraParamsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 99, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectExtraParamsPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectExtraParamsPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectOwnerPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectOwnerPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            header_data: <crate::packets::ObjectOwnerPacketHeaderDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.header_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 100, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.header_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectOwnerPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.header_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut header_data_values = Vec::with_capacity(1);
        header_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.header_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HeaderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(header_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HeaderData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.header_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectOwnerPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.header_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.header_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectGroupPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectGroupPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 101, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectGroupPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectGroupPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectBuyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectBuyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 102, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectBuyPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectBuyPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::BuyObjectInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::BuyObjectInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::BuyObjectInventoryPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 103, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DerezContainerPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::DerezContainerPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 104, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectPermissionsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectPermissionsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            header_data: <crate::packets::ObjectPermissionsPacketHeaderDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.header_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 105, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.header_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectPermissionsPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.header_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut header_data_values = Vec::with_capacity(1);
        header_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.header_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HeaderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(header_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HeaderData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.header_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectPermissionsPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.header_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.header_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectSaleInfoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectSaleInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 106, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectSaleInfoPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectSaleInfoPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectNamePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectNamePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 107, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectNamePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectNamePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDescriptionPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDescriptionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 108, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDescriptionPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDescriptionPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectCategoryPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectCategoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 109, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectCategoryPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectCategoryPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectSelectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectSelectPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 110, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectSelectPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectSelectPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDeselectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDeselectPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 111, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDeselectPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDeselectPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectAttachPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectAttachPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 112, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectAttachPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectAttachPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDetachPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDetachPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 113, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDetachPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDetachPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDropPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDropPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 114, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDropPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDropPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectLinkPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectLinkPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 115, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectLinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectLinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDelinkPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDelinkPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 116, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectDelinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDelinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectGrabPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectGrabPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectGrabPacketObjectDataBlock as GeneratedBlock>::new_generated(),
            surface_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.surface_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 117, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let surface_info_count = usize::from(reader.read_u8()?);
        let mut surface_info = Vec::new();
        surface_info
            .try_reserve_exact(surface_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..surface_info_count {
            let mut block = <crate::packets::ObjectGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            surface_info.push(block);
        }
        self.surface_info = surface_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.surface_info.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.surface_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut surface_info_values = Vec::with_capacity(self.surface_info.len());
        for block in &self.surface_info {
            surface_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SurfaceInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(surface_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SurfaceInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.surface_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut surface_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut surface_info_count = 0_usize;
            while surface_info_start + surface_info_count < self.surface_info.len()
                && surface_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.surface_info[surface_info_start + surface_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || surface_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    surface_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(surface_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .surface_info[surface_info_start..surface_info_start
                + surface_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            surface_info_start += surface_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if surface_info_start >= self.surface_info.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectGrabUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectGrabUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectGrabUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated(),
            surface_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.surface_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 118, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let surface_info_count = usize::from(reader.read_u8()?);
        let mut surface_info = Vec::new();
        surface_info
            .try_reserve_exact(surface_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..surface_info_count {
            let mut block = <crate::packets::ObjectGrabUpdatePacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            surface_info.push(block);
        }
        self.surface_info = surface_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.surface_info.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.surface_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut surface_info_values = Vec::with_capacity(self.surface_info.len());
        for block in &self.surface_info {
            surface_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SurfaceInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(surface_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SurfaceInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectGrabUpdatePacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.surface_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut surface_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut surface_info_count = 0_usize;
            while surface_info_start + surface_info_count < self.surface_info.len()
                && surface_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.surface_info[surface_info_start + surface_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || surface_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    surface_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(surface_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .surface_info[surface_info_start..surface_info_start
                + surface_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            surface_info_start += surface_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if surface_info_start >= self.surface_info.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectDeGrabPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectDeGrabPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectDeGrabPacketObjectDataBlock as GeneratedBlock>::new_generated(),
            surface_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.surface_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 119, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let surface_info_count = usize::from(reader.read_u8()?);
        let mut surface_info = Vec::new();
        surface_info
            .try_reserve_exact(surface_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..surface_info_count {
            let mut block = <crate::packets::ObjectDeGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            surface_info.push(block);
        }
        self.surface_info = surface_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.surface_info.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.surface_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut surface_info_values = Vec::with_capacity(self.surface_info.len());
        for block in &self.surface_info {
            surface_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SurfaceInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(surface_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SurfaceInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectDeGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.surface_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut surface_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut surface_info_count = 0_usize;
            while surface_info_start + surface_info_count < self.surface_info.len()
                && surface_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.surface_info[surface_info_start + surface_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || surface_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    surface_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(surface_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .surface_info[surface_info_start..surface_info_start
                + surface_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            surface_info_start += surface_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if surface_info_start >= self.surface_info.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectSpinStartPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectSpinStartPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectSpinStartPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 120, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectSpinUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectSpinUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectSpinUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 121, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectSpinStopPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectSpinStopPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectSpinStopPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 122, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectExportSelectedPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectExportSelectedPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 123, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectExportSelectedPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectExportSelectedPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ModifyLandPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ModifyLandPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            modify_block: <crate::packets::ModifyLandPacketModifyBlockBlock as GeneratedBlock>::new_generated(),
            parcel_data: Vec::new(),
            modify_block_extended: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.modify_block));
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.modify_block_extended {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 124, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.modify_block, reader)?;
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::ModifyLandPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        let modify_block_extended_count = usize::from(reader.read_u8()?);
        let mut modify_block_extended = Vec::new();
        modify_block_extended
            .try_reserve_exact(modify_block_extended_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..modify_block_extended_count {
            let mut block = <crate::packets::ModifyLandPacketModifyBlockExtendedBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            modify_block_extended.push(block);
        }
        self.modify_block_extended = modify_block_extended;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.modify_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.modify_block_extended.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.modify_block_extended {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut modify_block_values = Vec::with_capacity(1);
        modify_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.modify_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ModifyBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(modify_block_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        let mut modify_block_extended_values = Vec::with_capacity(
            self.modify_block_extended.len(),
        );
        for block in &self.modify_block_extended {
            modify_block_extended_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ModifyBlockExtended".to_owned(),
            libremetaverse_structured_data::OSD::Array(modify_block_extended_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ModifyBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.modify_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ModifyLandPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ModifyBlockExtended")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ModifyLandPacketModifyBlockExtendedBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.modify_block_extended = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        let mut modify_block_extended_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.modify_block))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let mut modify_block_extended_count = 0_usize;
            while modify_block_extended_start + modify_block_extended_count
                < self.modify_block_extended.len()
                && modify_block_extended_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .modify_block_extended[modify_block_extended_start
                                + modify_block_extended_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || modify_block_extended_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    modify_block_extended_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.modify_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            writer
                .write_u8(
                    u8::try_from(modify_block_extended_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .modify_block_extended[modify_block_extended_start..modify_block_extended_start
                + modify_block_extended_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            modify_block_extended_start += modify_block_extended_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len()
                && modify_block_extended_start >= self.modify_block_extended.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::VelocityInterpolateOnPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::VelocityInterpolateOnPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 125, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::VelocityInterpolateOffPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::VelocityInterpolateOffPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 126, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::StateSavePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::StateSavePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data_block: <crate::packets::StateSavePacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 127, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ReportAutosaveCrashPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            autosave_data: <crate::packets::ReportAutosaveCrashPacketAutosaveDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.autosave_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 128, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.autosave_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.autosave_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut autosave_data_values = Vec::with_capacity(1);
        autosave_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.autosave_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AutosaveData".to_owned(),
            libremetaverse_structured_data::OSD::Array(autosave_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AutosaveData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.autosave_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimWideDeletesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SimWideDeletesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data_block: <crate::packets::SimWideDeletesPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 129, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TrackAgentPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::TrackAgentPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            target_data: <crate::packets::TrackAgentPacketTargetDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.target_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 130, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.target_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.target_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut target_data_values = Vec::with_capacity(1);
        target_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.target_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TargetData".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.target_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ViewerStatsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ViewerStatsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            download_totals: <crate::packets::ViewerStatsPacketDownloadTotalsBlock as GeneratedBlock>::new_generated(),
            net_stats: (0..2)
                .map(|_| <crate::packets::ViewerStatsPacketNetStatsBlock as GeneratedBlock>::new_generated())
                .collect(),
            fail_stats: <crate::packets::ViewerStatsPacketFailStatsBlock as GeneratedBlock>::new_generated(),
            misc_stats: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.download_totals));
        for block in &self.net_stats {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.fail_stats));
        length = length.saturating_add(1);
        for block in &self.misc_stats {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 131, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.download_totals, reader)?;
        let mut net_stats = Vec::new();
        net_stats.try_reserve_exact(2).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..2 {
            let mut block = <crate::packets::ViewerStatsPacketNetStatsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            net_stats.push(block);
        }
        self.net_stats = net_stats;
        GeneratedBlock::decode_payload(&mut self.fail_stats, reader)?;
        let misc_stats_count = usize::from(reader.read_u8()?);
        let mut misc_stats = Vec::new();
        misc_stats
            .try_reserve_exact(misc_stats_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..misc_stats_count {
            let mut block = <crate::packets::ViewerStatsPacketMiscStatsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            misc_stats.push(block);
        }
        self.misc_stats = misc_stats;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.download_totals, writer)?;
        if self.net_stats.len() != 2 {
            return Err(crate::Error::Argument);
        }
        for block in &self.net_stats {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.fail_stats, writer)?;
        writer
            .write_u8(
                u8::try_from(self.misc_stats.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.misc_stats {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut download_totals_values = Vec::with_capacity(1);
        download_totals_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.download_totals)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DownloadTotals".to_owned(),
            libremetaverse_structured_data::OSD::Array(download_totals_values),
        )?;
        let mut net_stats_values = Vec::with_capacity(self.net_stats.len());
        for block in &self.net_stats {
            net_stats_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NetStats".to_owned(),
            libremetaverse_structured_data::OSD::Array(net_stats_values),
        )?;
        let mut fail_stats_values = Vec::with_capacity(1);
        fail_stats_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.fail_stats)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FailStats".to_owned(),
            libremetaverse_structured_data::OSD::Array(fail_stats_values),
        )?;
        let mut misc_stats_values = Vec::with_capacity(self.misc_stats.len());
        for block in &self.misc_stats {
            misc_stats_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "MiscStats".to_owned(),
            libremetaverse_structured_data::OSD::Array(misc_stats_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DownloadTotals")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.download_totals, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NetStats")
        {
            if self.net_stats.len() != 2 {
                self.net_stats = (0..2)
                    .map(|_| <crate::packets::ViewerStatsPacketNetStatsBlock as GeneratedBlock>::new_generated())
                    .collect();
            }
            for (block, value) in self.net_stats.iter_mut().zip(values.iter().take(2)) {
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(block, &map)?;
                }
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FailStats")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.fail_stats, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MiscStats")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ViewerStatsPacketMiscStatsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.misc_stats = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut misc_stats_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.download_totals),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            for block in &self.net_stats {
                fixed_length = fixed_length
                    .checked_add(
                        usize::try_from(GeneratedBlock::generated_length(block))
                            .map_err(|_| crate::Error::Argument)?,
                    )
                    .ok_or(crate::Error::Argument)?;
            }
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.fail_stats))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut misc_stats_count = 0_usize;
            while misc_stats_start + misc_stats_count < self.misc_stats.len()
                && misc_stats_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.misc_stats[misc_stats_start + misc_stats_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || misc_stats_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    misc_stats_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.download_totals, &mut writer)?;
            if self.net_stats.len() != 2 {
                return Err(crate::Error::Argument);
            }
            for block in &self.net_stats {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            GeneratedBlock::encode_payload(&self.fail_stats, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(misc_stats_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .misc_stats[misc_stats_start..misc_stats_start + misc_stats_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            misc_stats_start += misc_stats_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if misc_stats_start >= self.misc_stats.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ScriptAnswerYesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ScriptAnswerYesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ScriptAnswerYesPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 132, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UserReportPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UserReportPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            report_data: <crate::packets::UserReportPacketReportDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.report_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 133, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.report_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.report_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut report_data_values = Vec::with_capacity(1);
        report_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.report_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ReportData".to_owned(),
            libremetaverse_structured_data::OSD::Array(report_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReportData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.report_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AlertMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            alert_data: <crate::packets::AlertMessagePacketAlertDataBlock as GeneratedBlock>::new_generated(),
            alert_info: Vec::new(),
            agent_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.alert_data));
        length = length.saturating_add(1);
        for block in &self.alert_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.agent_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 134, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.alert_data, reader)?;
        let alert_info_count = usize::from(reader.read_u8()?);
        let mut alert_info = Vec::new();
        alert_info
            .try_reserve_exact(alert_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..alert_info_count {
            let mut block = <crate::packets::AlertMessagePacketAlertInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            alert_info.push(block);
        }
        self.alert_info = alert_info;
        let agent_info_count = usize::from(reader.read_u8()?);
        let mut agent_info = Vec::new();
        agent_info
            .try_reserve_exact(agent_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_info_count {
            let mut block = <crate::packets::AlertMessagePacketAgentInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_info.push(block);
        }
        self.agent_info = agent_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.alert_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.alert_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.alert_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.agent_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut alert_data_values = Vec::with_capacity(1);
        alert_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.alert_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AlertData".to_owned(),
            libremetaverse_structured_data::OSD::Array(alert_data_values),
        )?;
        let mut alert_info_values = Vec::with_capacity(self.alert_info.len());
        for block in &self.alert_info {
            alert_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AlertInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(alert_info_values),
        )?;
        let mut agent_info_values = Vec::with_capacity(self.agent_info.len());
        for block in &self.agent_info {
            agent_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AlertData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.alert_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AlertInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AlertMessagePacketAlertInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.alert_info = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AlertMessagePacketAgentInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut alert_info_start = 0_usize;
        let mut agent_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.alert_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut alert_info_count = 0_usize;
            while alert_info_start + alert_info_count < self.alert_info.len()
                && alert_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.alert_info[alert_info_start + alert_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || alert_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    alert_info_count += 1;
                } else {
                    break;
                }
            }
            let mut agent_info_count = 0_usize;
            while agent_info_start + agent_info_count < self.agent_info.len()
                && agent_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_info[agent_info_start + agent_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.alert_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(alert_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .alert_info[alert_info_start..alert_info_start + alert_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            alert_info_start += alert_info_count;
            writer
                .write_u8(
                    u8::try_from(agent_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_info[agent_info_start..agent_info_start + agent_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_info_start += agent_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if alert_info_start >= self.alert_info.len()
                && agent_info_start >= self.agent_info.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentAlertMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentAlertMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            alert_data: <crate::packets::AgentAlertMessagePacketAlertDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.alert_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 135, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.alert_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.alert_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut alert_data_values = Vec::with_capacity(1);
        alert_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.alert_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AlertData".to_owned(),
            libremetaverse_structured_data::OSD::Array(alert_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AlertData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.alert_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MeanCollisionAlertPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { mean_collision: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.mean_collision {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 136, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let mean_collision_count = usize::from(reader.read_u8()?);
        let mut mean_collision = Vec::new();
        mean_collision
            .try_reserve_exact(mean_collision_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..mean_collision_count {
            let mut block = <crate::packets::MeanCollisionAlertPacketMeanCollisionBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            mean_collision.push(block);
        }
        self.mean_collision = mean_collision;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.mean_collision.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.mean_collision {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut mean_collision_values = Vec::with_capacity(self.mean_collision.len());
        for block in &self.mean_collision {
            mean_collision_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "MeanCollision".to_owned(),
            libremetaverse_structured_data::OSD::Array(mean_collision_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MeanCollision")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MeanCollisionAlertPacketMeanCollisionBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.mean_collision = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut mean_collision_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut mean_collision_count = 0_usize;
            while mean_collision_start + mean_collision_count < self.mean_collision.len()
                && mean_collision_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .mean_collision[mean_collision_start + mean_collision_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || mean_collision_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    mean_collision_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(mean_collision_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .mean_collision[mean_collision_start..mean_collision_start
                + mean_collision_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            mean_collision_start += mean_collision_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if mean_collision_start >= self.mean_collision.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ViewerFrozenMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            frozen_data: <crate::packets::ViewerFrozenMessagePacketFrozenDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.frozen_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 137, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.frozen_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.frozen_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut frozen_data_values = Vec::with_capacity(1);
        frozen_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.frozen_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FrozenData".to_owned(),
            libremetaverse_structured_data::OSD::Array(frozen_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FrozenData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.frozen_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::HealthMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            health_data: <crate::packets::HealthMessagePacketHealthDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.health_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 138, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.health_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.health_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut health_data_values = Vec::with_capacity(1);
        health_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.health_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HealthData".to_owned(),
            libremetaverse_structured_data::OSD::Array(health_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HealthData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.health_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChatFromSimulatorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            chat_data: <crate::packets::ChatFromSimulatorPacketChatDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.chat_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 139, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.chat_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.chat_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut chat_data_values = Vec::with_capacity(1);
        chat_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.chat_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ChatData".to_owned(),
            libremetaverse_structured_data::OSD::Array(chat_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ChatData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.chat_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimStatsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region: <crate::packets::SimStatsPacketRegionBlock as GeneratedBlock>::new_generated(),
            stat: Vec::new(),
            pid_stat: <crate::packets::SimStatsPacketPidStatBlock as GeneratedBlock>::new_generated(),
            region_info: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.region));
        length = length.saturating_add(1);
        for block in &self.stat {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(GeneratedBlock::generated_length(&self.pid_stat));
        length = length.saturating_add(1);
        for block in &self.region_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 140, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region, reader)?;
        let stat_count = usize::from(reader.read_u8()?);
        let mut stat = Vec::new();
        stat.try_reserve_exact(stat_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..stat_count {
            let mut block = <crate::packets::SimStatsPacketStatBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            stat.push(block);
        }
        self.stat = stat;
        GeneratedBlock::decode_payload(&mut self.pid_stat, reader)?;
        let region_info_count = usize::from(reader.read_u8()?);
        let mut region_info = Vec::new();
        region_info
            .try_reserve_exact(region_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_info_count {
            let mut block = <crate::packets::SimStatsPacketRegionInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_info.push(block);
        }
        self.region_info = region_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region, writer)?;
        writer
            .write_u8(
                u8::try_from(self.stat.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.stat {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.pid_stat, writer)?;
        writer
            .write_u8(
                u8::try_from(self.region_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_values = Vec::with_capacity(1);
        region_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Region".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_values),
        )?;
        let mut stat_values = Vec::with_capacity(self.stat.len());
        for block in &self.stat {
            stat_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Stat".to_owned(),
            libremetaverse_structured_data::OSD::Array(stat_values),
        )?;
        let mut pid_stat_values = Vec::with_capacity(1);
        pid_stat_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.pid_stat)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PidStat".to_owned(),
            libremetaverse_structured_data::OSD::Array(pid_stat_values),
        )?;
        let mut region_info_values = Vec::with_capacity(self.region_info.len());
        for block in &self.region_info {
            region_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Region")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Stat")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SimStatsPacketStatBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.stat = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PidStat")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.pid_stat, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SimStatsPacketRegionInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_info = blocks;
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestRegionInfoPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestRegionInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 141, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RegionInfoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RegionInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            region_info: <crate::packets::RegionInfoPacketRegionInfoBlock as GeneratedBlock>::new_generated(),
            region_info2: <crate::packets::RegionInfoPacketRegionInfo2Block as GeneratedBlock>::new_generated(),
            region_info3: Vec::new(),
            region_info5: Vec::new(),
            combat_settings: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info2));
        length = length.saturating_add(1);
        for block in &self.region_info3 {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.region_info5 {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.combat_settings {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 142, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info2, reader)?;
        let region_info3_count = usize::from(reader.read_u8()?);
        let mut region_info3 = Vec::new();
        region_info3
            .try_reserve_exact(region_info3_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_info3_count {
            let mut block = <crate::packets::RegionInfoPacketRegionInfo3Block as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_info3.push(block);
        }
        self.region_info3 = region_info3;
        let region_info5_count = usize::from(reader.read_u8()?);
        let mut region_info5 = Vec::new();
        region_info5
            .try_reserve_exact(region_info5_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_info5_count {
            let mut block = <crate::packets::RegionInfoPacketRegionInfo5Block as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_info5.push(block);
        }
        self.region_info5 = region_info5;
        let combat_settings_count = usize::from(reader.read_u8()?);
        let mut combat_settings = Vec::new();
        combat_settings
            .try_reserve_exact(combat_settings_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..combat_settings_count {
            let mut block = <crate::packets::RegionInfoPacketCombatSettingsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            combat_settings.push(block);
        }
        self.combat_settings = combat_settings;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.region_info, writer)?;
        GeneratedBlock::encode_payload(&self.region_info2, writer)?;
        writer
            .write_u8(
                u8::try_from(self.region_info3.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_info3 {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.region_info5.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_info5 {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.combat_settings.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.combat_settings {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut region_info_values = Vec::with_capacity(1);
        region_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info_values),
        )?;
        let mut region_info2_values = Vec::with_capacity(1);
        region_info2_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info2)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo2".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info2_values),
        )?;
        let mut region_info3_values = Vec::with_capacity(self.region_info3.len());
        for block in &self.region_info3 {
            region_info3_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionInfo3".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info3_values),
        )?;
        let mut region_info5_values = Vec::with_capacity(self.region_info5.len());
        for block in &self.region_info5 {
            region_info5_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionInfo5".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info5_values),
        )?;
        let mut combat_settings_values = Vec::with_capacity(self.combat_settings.len());
        for block in &self.combat_settings {
            combat_settings_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "CombatSettings".to_owned(),
            libremetaverse_structured_data::OSD::Array(combat_settings_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo2")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info2, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo3")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionInfoPacketRegionInfo3Block as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_info3 = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo5")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionInfoPacketRegionInfo5Block as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_info5 = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CombatSettings")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionInfoPacketCombatSettingsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.combat_settings = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_info3_start = 0_usize;
        let mut region_info5_start = 0_usize;
        let mut combat_settings_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info2))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(3).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_info3_count = 0_usize;
            while region_info3_start + region_info3_count < self.region_info3.len()
                && region_info3_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_info3[region_info3_start + region_info3_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_info3_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_info3_count += 1;
                } else {
                    break;
                }
            }
            let mut region_info5_count = 0_usize;
            while region_info5_start + region_info5_count < self.region_info5.len()
                && region_info5_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_info5[region_info5_start + region_info5_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_info5_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_info5_count += 1;
                } else {
                    break;
                }
            }
            let mut combat_settings_count = 0_usize;
            while combat_settings_start + combat_settings_count
                < self.combat_settings.len()
                && combat_settings_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .combat_settings[combat_settings_start
                                + combat_settings_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || combat_settings_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    combat_settings_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info2, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_info3_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_info3[region_info3_start..region_info3_start
                + region_info3_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_info3_start += region_info3_count;
            writer
                .write_u8(
                    u8::try_from(region_info5_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_info5[region_info5_start..region_info5_start
                + region_info5_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_info5_start += region_info5_count;
            writer
                .write_u8(
                    u8::try_from(combat_settings_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .combat_settings[combat_settings_start..combat_settings_start
                + combat_settings_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            combat_settings_start += combat_settings_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_info3_start >= self.region_info3.len()
                && region_info5_start >= self.region_info5.len()
                && combat_settings_start >= self.combat_settings.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GodUpdateRegionInfoPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GodUpdateRegionInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            region_info: <crate::packets::GodUpdateRegionInfoPacketRegionInfoBlock as GeneratedBlock>::new_generated(),
            region_info2: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info));
        length = length.saturating_add(1);
        for block in &self.region_info2 {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 143, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info, reader)?;
        let region_info2_count = usize::from(reader.read_u8()?);
        let mut region_info2 = Vec::new();
        region_info2
            .try_reserve_exact(region_info2_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_info2_count {
            let mut block = <crate::packets::GodUpdateRegionInfoPacketRegionInfo2Block as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_info2.push(block);
        }
        self.region_info2 = region_info2;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.region_info, writer)?;
        writer
            .write_u8(
                u8::try_from(self.region_info2.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_info2 {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut region_info_values = Vec::with_capacity(1);
        region_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info_values),
        )?;
        let mut region_info2_values = Vec::with_capacity(self.region_info2.len());
        for block in &self.region_info2 {
            region_info2_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionInfo2".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info2_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo2")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GodUpdateRegionInfoPacketRegionInfo2Block as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_info2 = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_info2_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_info2_count = 0_usize;
            while region_info2_start + region_info2_count < self.region_info2.len()
                && region_info2_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_info2[region_info2_start + region_info2_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_info2_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_info2_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_info2_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_info2[region_info2_start..region_info2_start
                + region_info2_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_info2_start += region_info2_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_info2_start >= self.region_info2.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::NearestLandingRegionRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            requesting_region_data: <crate::packets::NearestLandingRegionRequestPacketRequestingRegionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.requesting_region_data),
            );
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 144, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.requesting_region_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.requesting_region_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut requesting_region_data_values = Vec::with_capacity(1);
        requesting_region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.requesting_region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestingRegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(requesting_region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestingRegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.requesting_region_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::NearestLandingRegionReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            landing_region_data: <crate::packets::NearestLandingRegionReplyPacketLandingRegionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.landing_region_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 145, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.landing_region_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.landing_region_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut landing_region_data_values = Vec::with_capacity(1);
        landing_region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.landing_region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "LandingRegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(landing_region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("LandingRegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.landing_region_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::NearestLandingRegionUpdatedPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::NearestLandingRegionUpdatedPacketRegionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 146, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TeleportLandingStatusChangedPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::TeleportLandingStatusChangedPacketRegionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 147, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RegionHandshakePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region_info: <crate::packets::RegionHandshakePacketRegionInfoBlock as GeneratedBlock>::new_generated(),
            region_info2: <crate::packets::RegionHandshakePacketRegionInfo2Block as GeneratedBlock>::new_generated(),
            region_info3: <crate::packets::RegionHandshakePacketRegionInfo3Block as GeneratedBlock>::new_generated(),
            region_info4: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info2));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info3));
        length = length.saturating_add(1);
        for block in &self.region_info4 {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 148, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_info, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info2, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info3, reader)?;
        let region_info4_count = usize::from(reader.read_u8()?);
        let mut region_info4 = Vec::new();
        region_info4
            .try_reserve_exact(region_info4_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_info4_count {
            let mut block = <crate::packets::RegionHandshakePacketRegionInfo4Block as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_info4.push(block);
        }
        self.region_info4 = region_info4;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_info, writer)?;
        GeneratedBlock::encode_payload(&self.region_info2, writer)?;
        GeneratedBlock::encode_payload(&self.region_info3, writer)?;
        writer
            .write_u8(
                u8::try_from(self.region_info4.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_info4 {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_info_values = Vec::with_capacity(1);
        region_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info_values),
        )?;
        let mut region_info2_values = Vec::with_capacity(1);
        region_info2_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info2)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo2".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info2_values),
        )?;
        let mut region_info3_values = Vec::with_capacity(1);
        region_info3_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info3)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo3".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info3_values),
        )?;
        let mut region_info4_values = Vec::with_capacity(self.region_info4.len());
        for block in &self.region_info4 {
            region_info4_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionInfo4".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info4_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo2")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info2, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo3")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info3, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo4")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RegionHandshakePacketRegionInfo4Block as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_info4 = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_info4_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info2))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_info3))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_info4_count = 0_usize;
            while region_info4_start + region_info4_count < self.region_info4.len()
                && region_info4_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_info4[region_info4_start + region_info4_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_info4_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_info4_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info2, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_info3, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_info4_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_info4[region_info4_start..region_info4_start
                + region_info4_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_info4_start += region_info4_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_info4_start >= self.region_info4.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RegionHandshakeReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RegionHandshakeReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            region_info: <crate::packets::RegionHandshakeReplyPacketRegionInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 149, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.region_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut region_info_values = Vec::with_capacity(1);
        region_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimulatorViewerTimeMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            time_info: <crate::packets::SimulatorViewerTimeMessagePacketTimeInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.time_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 150, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.time_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.time_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut time_info_values = Vec::with_capacity(1);
        time_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.time_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TimeInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(time_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TimeInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.time_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EnableSimulatorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            simulator_info: <crate::packets::EnableSimulatorPacketSimulatorInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.simulator_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 151, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.simulator_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.simulator_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut simulator_info_values = Vec::with_capacity(1);
        simulator_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.simulator_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimulatorInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(simulator_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimulatorInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.simulator_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DisableSimulatorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 152, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TransferRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transfer_info: <crate::packets::TransferRequestPacketTransferInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transfer_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 153, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transfer_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transfer_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transfer_info_values = Vec::with_capacity(1);
        transfer_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transfer_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransferInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(transfer_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransferInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transfer_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TransferInfoPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transfer_info: <crate::packets::TransferInfoPacketTransferInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transfer_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 154, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transfer_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transfer_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transfer_info_values = Vec::with_capacity(1);
        transfer_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transfer_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransferInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(transfer_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransferInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transfer_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TransferAbortPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transfer_info: <crate::packets::TransferAbortPacketTransferInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transfer_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 155, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transfer_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transfer_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transfer_info_values = Vec::with_capacity(1);
        transfer_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transfer_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransferInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(transfer_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransferInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transfer_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestXferPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            xfer_id: <crate::packets::RequestXferPacketXferIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.xfer_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 156, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.xfer_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.xfer_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut xfer_id_values = Vec::with_capacity(1);
        xfer_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.xfer_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "XferID".to_owned(),
            libremetaverse_structured_data::OSD::Array(xfer_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("XferID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.xfer_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AbortXferPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            xfer_id: <crate::packets::AbortXferPacketXferIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.xfer_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 157, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.xfer_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.xfer_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut xfer_id_values = Vec::with_capacity(1);
        xfer_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.xfer_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "XferID".to_owned(),
            libremetaverse_structured_data::OSD::Array(xfer_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("XferID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.xfer_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarAppearancePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            sender: <crate::packets::AvatarAppearancePacketSenderBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::AvatarAppearancePacketObjectDataBlock as GeneratedBlock>::new_generated(),
            visual_param: Vec::new(),
            appearance_data: Vec::new(),
            appearance_hover: Vec::new(),
            attachment_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.sender));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.visual_param {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.appearance_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.appearance_hover {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.attachment_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 158, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sender, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let visual_param_count = usize::from(reader.read_u8()?);
        let mut visual_param = Vec::new();
        visual_param
            .try_reserve_exact(visual_param_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..visual_param_count {
            let mut block = <crate::packets::AvatarAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            visual_param.push(block);
        }
        self.visual_param = visual_param;
        let appearance_data_count = usize::from(reader.read_u8()?);
        let mut appearance_data = Vec::new();
        appearance_data
            .try_reserve_exact(appearance_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..appearance_data_count {
            let mut block = <crate::packets::AvatarAppearancePacketAppearanceDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            appearance_data.push(block);
        }
        self.appearance_data = appearance_data;
        let appearance_hover_count = usize::from(reader.read_u8()?);
        let mut appearance_hover = Vec::new();
        appearance_hover
            .try_reserve_exact(appearance_hover_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..appearance_hover_count {
            let mut block = <crate::packets::AvatarAppearancePacketAppearanceHoverBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            appearance_hover.push(block);
        }
        self.appearance_hover = appearance_hover;
        let attachment_block_count = usize::from(reader.read_u8()?);
        let mut attachment_block = Vec::new();
        attachment_block
            .try_reserve_exact(attachment_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..attachment_block_count {
            let mut block = <crate::packets::AvatarAppearancePacketAttachmentBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            attachment_block.push(block);
        }
        self.attachment_block = attachment_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sender, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.visual_param.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.visual_param {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.appearance_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.appearance_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.appearance_hover.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.appearance_hover {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.attachment_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.attachment_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sender_values = Vec::with_capacity(1);
        sender_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sender)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Sender".to_owned(),
            libremetaverse_structured_data::OSD::Array(sender_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut visual_param_values = Vec::with_capacity(self.visual_param.len());
        for block in &self.visual_param {
            visual_param_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "VisualParam".to_owned(),
            libremetaverse_structured_data::OSD::Array(visual_param_values),
        )?;
        let mut appearance_data_values = Vec::with_capacity(self.appearance_data.len());
        for block in &self.appearance_data {
            appearance_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AppearanceData".to_owned(),
            libremetaverse_structured_data::OSD::Array(appearance_data_values),
        )?;
        let mut appearance_hover_values = Vec::with_capacity(
            self.appearance_hover.len(),
        );
        for block in &self.appearance_hover {
            appearance_hover_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AppearanceHover".to_owned(),
            libremetaverse_structured_data::OSD::Array(appearance_hover_values),
        )?;
        let mut attachment_block_values = Vec::with_capacity(
            self.attachment_block.len(),
        );
        for block in &self.attachment_block {
            attachment_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AttachmentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(attachment_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Sender")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sender, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("VisualParam")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.visual_param = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AppearanceData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAppearancePacketAppearanceDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.appearance_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AppearanceHover")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAppearancePacketAppearanceHoverBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.appearance_hover = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AttachmentBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAppearancePacketAttachmentBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.attachment_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut visual_param_start = 0_usize;
        let mut appearance_data_start = 0_usize;
        let mut appearance_hover_start = 0_usize;
        let mut attachment_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.sender))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(4).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut visual_param_count = 0_usize;
            while visual_param_start + visual_param_count < self.visual_param.len()
                && visual_param_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.visual_param[visual_param_start + visual_param_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || visual_param_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    visual_param_count += 1;
                } else {
                    break;
                }
            }
            let mut appearance_data_count = 0_usize;
            while appearance_data_start + appearance_data_count
                < self.appearance_data.len()
                && appearance_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .appearance_data[appearance_data_start
                                + appearance_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || appearance_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    appearance_data_count += 1;
                } else {
                    break;
                }
            }
            let mut appearance_hover_count = 0_usize;
            while appearance_hover_start + appearance_hover_count
                < self.appearance_hover.len()
                && appearance_hover_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .appearance_hover[appearance_hover_start
                                + appearance_hover_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || appearance_hover_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    appearance_hover_count += 1;
                } else {
                    break;
                }
            }
            let mut attachment_block_count = 0_usize;
            while attachment_block_start + attachment_block_count
                < self.attachment_block.len()
                && attachment_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .attachment_block[attachment_block_start
                                + attachment_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || attachment_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    attachment_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.sender, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(visual_param_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .visual_param[visual_param_start..visual_param_start
                + visual_param_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            visual_param_start += visual_param_count;
            writer
                .write_u8(
                    u8::try_from(appearance_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .appearance_data[appearance_data_start..appearance_data_start
                + appearance_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            appearance_data_start += appearance_data_count;
            writer
                .write_u8(
                    u8::try_from(appearance_hover_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .appearance_hover[appearance_hover_start..appearance_hover_start
                + appearance_hover_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            appearance_hover_start += appearance_hover_count;
            writer
                .write_u8(
                    u8::try_from(attachment_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .attachment_block[attachment_block_start..attachment_block_start
                + attachment_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            attachment_block_start += attachment_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if visual_param_start >= self.visual_param.len()
                && appearance_data_start >= self.appearance_data.len()
                && appearance_hover_start >= self.appearance_hover.len()
                && attachment_block_start >= self.attachment_block.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SetFollowCamPropertiesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::SetFollowCamPropertiesPacketObjectDataBlock as GeneratedBlock>::new_generated(),
            camera_property: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.camera_property {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 159, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let camera_property_count = usize::from(reader.read_u8()?);
        let mut camera_property = Vec::new();
        camera_property
            .try_reserve_exact(camera_property_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..camera_property_count {
            let mut block = <crate::packets::SetFollowCamPropertiesPacketCameraPropertyBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            camera_property.push(block);
        }
        self.camera_property = camera_property;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.camera_property.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.camera_property {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut camera_property_values = Vec::with_capacity(self.camera_property.len());
        for block in &self.camera_property {
            camera_property_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "CameraProperty".to_owned(),
            libremetaverse_structured_data::OSD::Array(camera_property_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CameraProperty")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SetFollowCamPropertiesPacketCameraPropertyBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.camera_property = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut camera_property_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut camera_property_count = 0_usize;
            while camera_property_start + camera_property_count
                < self.camera_property.len()
                && camera_property_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .camera_property[camera_property_start
                                + camera_property_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || camera_property_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    camera_property_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(camera_property_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .camera_property[camera_property_start..camera_property_start
                + camera_property_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            camera_property_start += camera_property_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if camera_property_start >= self.camera_property.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ClearFollowCamPropertiesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::ClearFollowCamPropertiesPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 160, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestPayPricePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::RequestPayPricePacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 161, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PayPriceReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::PayPriceReplyPacketObjectDataBlock as GeneratedBlock>::new_generated(),
            button_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length = length.saturating_add(1);
        for block in &self.button_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 162, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        let button_data_count = usize::from(reader.read_u8()?);
        let mut button_data = Vec::new();
        button_data
            .try_reserve_exact(button_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..button_data_count {
            let mut block = <crate::packets::PayPriceReplyPacketButtonDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            button_data.push(block);
        }
        self.button_data = button_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.button_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.button_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        let mut button_data_values = Vec::with_capacity(self.button_data.len());
        for block in &self.button_data {
            button_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ButtonData".to_owned(),
            libremetaverse_structured_data::OSD::Array(button_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ButtonData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::PayPriceReplyPacketButtonDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.button_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut button_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.object_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut button_data_count = 0_usize;
            while button_data_start + button_data_count < self.button_data.len()
                && button_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.button_data[button_data_start + button_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || button_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    button_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.object_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(button_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .button_data[button_data_start..button_data_start + button_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            button_data_start += button_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if button_data_start >= self.button_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::KickUserPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            target_block: <crate::packets::KickUserPacketTargetBlockBlock as GeneratedBlock>::new_generated(),
            user_info: <crate::packets::KickUserPacketUserInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.target_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 163, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.target_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.user_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.target_block, writer)?;
        GeneratedBlock::encode_payload(&self.user_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut target_block_values = Vec::with_capacity(1);
        target_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.target_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TargetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_block_values),
        )?;
        let mut user_info_values = Vec::with_capacity(1);
        user_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.target_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::KickUserAckPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            user_info: <crate::packets::KickUserAckPacketUserInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 164, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.user_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.user_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut user_info_values = Vec::with_capacity(1);
        user_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GodKickUserPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            user_info: <crate::packets::GodKickUserPacketUserInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 165, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.user_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.user_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut user_info_values = Vec::with_capacity(1);
        user_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SystemKickUserPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { agent_info: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.agent_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 166, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let agent_info_count = usize::from(reader.read_u8()?);
        let mut agent_info = Vec::new();
        agent_info
            .try_reserve_exact(agent_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_info_count {
            let mut block = <crate::packets::SystemKickUserPacketAgentInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_info.push(block);
        }
        self.agent_info = agent_info;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.agent_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_info_values = Vec::with_capacity(self.agent_info.len());
        for block in &self.agent_info {
            agent_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SystemKickUserPacketAgentInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_info = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut agent_info_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut agent_info_count = 0_usize;
            while agent_info_start + agent_info_count < self.agent_info.len()
                && agent_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_info[agent_info_start + agent_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_info_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(agent_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_info[agent_info_start..agent_info_start + agent_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_info_start += agent_info_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if agent_info_start >= self.agent_info.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::EjectUserPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EjectUserPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::EjectUserPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 167, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::FreezeUserPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::FreezeUserPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::FreezeUserPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 168, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPropertiesRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPropertiesRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 169, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPropertiesRequestBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPropertiesRequestBackendPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 170, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPropertiesReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPropertiesReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            properties_data: <crate::packets::AvatarPropertiesReplyPacketPropertiesDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.properties_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 171, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.properties_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.properties_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut properties_data_values = Vec::with_capacity(1);
        properties_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.properties_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PropertiesData".to_owned(),
            libremetaverse_structured_data::OSD::Array(properties_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PropertiesData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.properties_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarInterestsReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarInterestsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            properties_data: <crate::packets::AvatarInterestsReplyPacketPropertiesDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.properties_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 172, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.properties_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.properties_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut properties_data_values = Vec::with_capacity(1);
        properties_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.properties_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PropertiesData".to_owned(),
            libremetaverse_structured_data::OSD::Array(properties_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PropertiesData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.properties_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarGroupsReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarGroupsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: Vec::new(),
            new_group_data: <crate::packets::AvatarGroupsReplyPacketNewGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.group_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.new_group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 173, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let group_data_count = usize::from(reader.read_u8()?);
        let mut group_data = Vec::new();
        group_data
            .try_reserve_exact(group_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..group_data_count {
            let mut block = <crate::packets::AvatarGroupsReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            group_data.push(block);
        }
        self.group_data = group_data;
        GeneratedBlock::decode_payload(&mut self.new_group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.group_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.group_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.new_group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(self.group_data.len());
        for block in &self.group_data {
            group_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut new_group_data_values = Vec::with_capacity(1);
        new_group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.new_group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NewGroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(new_group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarGroupsReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.group_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NewGroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.new_group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPropertiesUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPropertiesUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            properties_data: <crate::packets::AvatarPropertiesUpdatePacketPropertiesDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.properties_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 174, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.properties_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.properties_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut properties_data_values = Vec::with_capacity(1);
        properties_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.properties_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PropertiesData".to_owned(),
            libremetaverse_structured_data::OSD::Array(properties_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PropertiesData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.properties_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarInterestsUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarInterestsUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            properties_data: <crate::packets::AvatarInterestsUpdatePacketPropertiesDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.properties_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 175, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.properties_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.properties_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut properties_data_values = Vec::with_capacity(1);
        properties_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.properties_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PropertiesData".to_owned(),
            libremetaverse_structured_data::OSD::Array(properties_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PropertiesData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.properties_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarNotesReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarNotesReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::AvatarNotesReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 176, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarNotesUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarNotesUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::AvatarNotesUpdatePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 177, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarPicksReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AvatarPicksReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 178, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::AvatarPicksReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarPicksReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::EventInfoRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EventInfoRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventInfoRequestPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 179, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventInfoReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EventInfoReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventInfoReplyPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 180, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventNotificationAddRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EventNotificationAddRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventNotificationAddRequestPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 181, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventNotificationRemoveRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EventNotificationRemoveRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventNotificationRemoveRequestPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 182, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventGodDeletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EventGodDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventGodDeletePacketEventDataBlock as GeneratedBlock>::new_generated(),
            query_data: <crate::packets::EventGodDeletePacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 183, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PickInfoReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PickInfoReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::PickInfoReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 184, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PickInfoUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PickInfoUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::PickInfoUpdatePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 185, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PickDeletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PickDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::PickDeletePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 186, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PickGodDeletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PickGodDeletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::PickGodDeletePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 187, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptQuestionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::ScriptQuestionPacketDataBlock as GeneratedBlock>::new_generated(),
            experience: <crate::packets::ScriptQuestionPacketExperienceBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.experience));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 188, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        GeneratedBlock::decode_payload(&mut self.experience, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        GeneratedBlock::encode_payload(&self.experience, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut experience_values = Vec::with_capacity(1);
        experience_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.experience)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Experience".to_owned(),
            libremetaverse_structured_data::OSD::Array(experience_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Experience")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.experience, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptControlChangePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 189, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::ScriptControlChangePacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptControlChangePacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ScriptDialogPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::ScriptDialogPacketDataBlock as GeneratedBlock>::new_generated(),
            buttons: Vec::new(),
            owner_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.buttons {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.owner_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 190, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let buttons_count = usize::from(reader.read_u8()?);
        let mut buttons = Vec::new();
        buttons
            .try_reserve_exact(buttons_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..buttons_count {
            let mut block = <crate::packets::ScriptDialogPacketButtonsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            buttons.push(block);
        }
        self.buttons = buttons;
        let owner_data_count = usize::from(reader.read_u8()?);
        let mut owner_data = Vec::new();
        owner_data
            .try_reserve_exact(owner_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..owner_data_count {
            let mut block = <crate::packets::ScriptDialogPacketOwnerDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            owner_data.push(block);
        }
        self.owner_data = owner_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.buttons.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.buttons {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.owner_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.owner_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut buttons_values = Vec::with_capacity(self.buttons.len());
        for block in &self.buttons {
            buttons_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Buttons".to_owned(),
            libremetaverse_structured_data::OSD::Array(buttons_values),
        )?;
        let mut owner_data_values = Vec::with_capacity(self.owner_data.len());
        for block in &self.owner_data {
            owner_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "OwnerData".to_owned(),
            libremetaverse_structured_data::OSD::Array(owner_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Buttons")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptDialogPacketButtonsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.buttons = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("OwnerData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptDialogPacketOwnerDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.owner_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut buttons_start = 0_usize;
        let mut owner_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut buttons_count = 0_usize;
            while buttons_start + buttons_count < self.buttons.len()
                && buttons_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.buttons[buttons_start + buttons_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || buttons_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    buttons_count += 1;
                } else {
                    break;
                }
            }
            let mut owner_data_count = 0_usize;
            while owner_data_start + owner_data_count < self.owner_data.len()
                && owner_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.owner_data[owner_data_start + owner_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || owner_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    owner_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(buttons_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.buttons[buttons_start..buttons_start + buttons_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            buttons_start += buttons_count;
            writer
                .write_u8(
                    u8::try_from(owner_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .owner_data[owner_data_start..owner_data_start + owner_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            owner_data_start += owner_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if buttons_start >= self.buttons.len()
                && owner_data_start >= self.owner_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ScriptDialogReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ScriptDialogReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ScriptDialogReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 191, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ForceScriptControlReleasePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ForceScriptControlReleasePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 192, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RevokePermissionsPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RevokePermissionsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::RevokePermissionsPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 193, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LoadURLPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::LoadURLPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 194, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptTeleportRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::ScriptTeleportRequestPacketDataBlock as GeneratedBlock>::new_generated(),
            options: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.options {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 195, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let options_count = usize::from(reader.read_u8()?);
        let mut options = Vec::new();
        options
            .try_reserve_exact(options_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..options_count {
            let mut block = <crate::packets::ScriptTeleportRequestPacketOptionsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            options.push(block);
        }
        self.options = options;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.options.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.options {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut options_values = Vec::with_capacity(self.options.len());
        for block in &self.options {
            options_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Options".to_owned(),
            libremetaverse_structured_data::OSD::Array(options_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Options")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptTeleportRequestPacketOptionsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.options = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut options_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut options_count = 0_usize;
            while options_start + options_count < self.options.len()
                && options_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.options[options_start + options_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || options_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    options_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(options_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.options[options_start..options_start + options_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            options_start += options_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if options_start >= self.options.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelOverlayPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            parcel_data: <crate::packets::ParcelOverlayPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 196, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelPropertiesRequestByIDPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelPropertiesRequestByIDPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelPropertiesRequestByIDPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 197, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelPropertiesUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelPropertiesUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelPropertiesUpdatePacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 198, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelReturnObjectsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelReturnObjectsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelReturnObjectsPacketParcelDataBlock as GeneratedBlock>::new_generated(),
            task_i_ds: Vec::new(),
            owner_i_ds: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length = length.saturating_add(1);
        for block in &self.task_i_ds {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.owner_i_ds {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 199, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        let task_i_ds_count = usize::from(reader.read_u8()?);
        let mut task_i_ds = Vec::new();
        task_i_ds
            .try_reserve_exact(task_i_ds_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..task_i_ds_count {
            let mut block = <crate::packets::ParcelReturnObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            task_i_ds.push(block);
        }
        self.task_i_ds = task_i_ds;
        let owner_i_ds_count = usize::from(reader.read_u8()?);
        let mut owner_i_ds = Vec::new();
        owner_i_ds
            .try_reserve_exact(owner_i_ds_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..owner_i_ds_count {
            let mut block = <crate::packets::ParcelReturnObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            owner_i_ds.push(block);
        }
        self.owner_i_ds = owner_i_ds;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.task_i_ds.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.task_i_ds {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.owner_i_ds.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.owner_i_ds {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        let mut task_i_ds_values = Vec::with_capacity(self.task_i_ds.len());
        for block in &self.task_i_ds {
            task_i_ds_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "TaskIDs".to_owned(),
            libremetaverse_structured_data::OSD::Array(task_i_ds_values),
        )?;
        let mut owner_i_ds_values = Vec::with_capacity(self.owner_i_ds.len());
        for block in &self.owner_i_ds {
            owner_i_ds_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "OwnerIDs".to_owned(),
            libremetaverse_structured_data::OSD::Array(owner_i_ds_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TaskIDs")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelReturnObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.task_i_ds = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("OwnerIDs")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelReturnObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.owner_i_ds = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut task_i_ds_start = 0_usize;
        let mut owner_i_ds_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.parcel_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut task_i_ds_count = 0_usize;
            while task_i_ds_start + task_i_ds_count < self.task_i_ds.len()
                && task_i_ds_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.task_i_ds[task_i_ds_start + task_i_ds_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || task_i_ds_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    task_i_ds_count += 1;
                } else {
                    break;
                }
            }
            let mut owner_i_ds_count = 0_usize;
            while owner_i_ds_start + owner_i_ds_count < self.owner_i_ds.len()
                && owner_i_ds_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.owner_i_ds[owner_i_ds_start + owner_i_ds_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || owner_i_ds_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    owner_i_ds_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.parcel_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(task_i_ds_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .task_i_ds[task_i_ds_start..task_i_ds_start + task_i_ds_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            task_i_ds_start += task_i_ds_count;
            writer
                .write_u8(
                    u8::try_from(owner_i_ds_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .owner_i_ds[owner_i_ds_start..owner_i_ds_start + owner_i_ds_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            owner_i_ds_start += owner_i_ds_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if task_i_ds_start >= self.task_i_ds.len()
                && owner_i_ds_start >= self.owner_i_ds.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelSetOtherCleanTimePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelSetOtherCleanTimePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelSetOtherCleanTimePacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 200, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelDisableObjectsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelDisableObjectsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelDisableObjectsPacketParcelDataBlock as GeneratedBlock>::new_generated(),
            task_i_ds: Vec::new(),
            owner_i_ds: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length = length.saturating_add(1);
        for block in &self.task_i_ds {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.owner_i_ds {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 201, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        let task_i_ds_count = usize::from(reader.read_u8()?);
        let mut task_i_ds = Vec::new();
        task_i_ds
            .try_reserve_exact(task_i_ds_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..task_i_ds_count {
            let mut block = <crate::packets::ParcelDisableObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            task_i_ds.push(block);
        }
        self.task_i_ds = task_i_ds;
        let owner_i_ds_count = usize::from(reader.read_u8()?);
        let mut owner_i_ds = Vec::new();
        owner_i_ds
            .try_reserve_exact(owner_i_ds_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..owner_i_ds_count {
            let mut block = <crate::packets::ParcelDisableObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            owner_i_ds.push(block);
        }
        self.owner_i_ds = owner_i_ds;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.task_i_ds.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.task_i_ds {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.owner_i_ds.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.owner_i_ds {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        let mut task_i_ds_values = Vec::with_capacity(self.task_i_ds.len());
        for block in &self.task_i_ds {
            task_i_ds_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "TaskIDs".to_owned(),
            libremetaverse_structured_data::OSD::Array(task_i_ds_values),
        )?;
        let mut owner_i_ds_values = Vec::with_capacity(self.owner_i_ds.len());
        for block in &self.owner_i_ds {
            owner_i_ds_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "OwnerIDs".to_owned(),
            libremetaverse_structured_data::OSD::Array(owner_i_ds_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TaskIDs")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelDisableObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.task_i_ds = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("OwnerIDs")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelDisableObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.owner_i_ds = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut task_i_ds_start = 0_usize;
        let mut owner_i_ds_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.parcel_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut task_i_ds_count = 0_usize;
            while task_i_ds_start + task_i_ds_count < self.task_i_ds.len()
                && task_i_ds_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.task_i_ds[task_i_ds_start + task_i_ds_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || task_i_ds_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    task_i_ds_count += 1;
                } else {
                    break;
                }
            }
            let mut owner_i_ds_count = 0_usize;
            while owner_i_ds_start + owner_i_ds_count < self.owner_i_ds.len()
                && owner_i_ds_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.owner_i_ds[owner_i_ds_start + owner_i_ds_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || owner_i_ds_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    owner_i_ds_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.parcel_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(task_i_ds_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .task_i_ds[task_i_ds_start..task_i_ds_start + task_i_ds_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            task_i_ds_start += task_i_ds_count;
            writer
                .write_u8(
                    u8::try_from(owner_i_ds_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .owner_i_ds[owner_i_ds_start..owner_i_ds_start + owner_i_ds_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            owner_i_ds_start += owner_i_ds_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if task_i_ds_start >= self.task_i_ds.len()
                && owner_i_ds_start >= self.owner_i_ds.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelSelectObjectsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelSelectObjectsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelSelectObjectsPacketParcelDataBlock as GeneratedBlock>::new_generated(),
            return_i_ds: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length = length.saturating_add(1);
        for block in &self.return_i_ds {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 202, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        let return_i_ds_count = usize::from(reader.read_u8()?);
        let mut return_i_ds = Vec::new();
        return_i_ds
            .try_reserve_exact(return_i_ds_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..return_i_ds_count {
            let mut block = <crate::packets::ParcelSelectObjectsPacketReturnIDsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            return_i_ds.push(block);
        }
        self.return_i_ds = return_i_ds;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.return_i_ds.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.return_i_ds {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        let mut return_i_ds_values = Vec::with_capacity(self.return_i_ds.len());
        for block in &self.return_i_ds {
            return_i_ds_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ReturnIDs".to_owned(),
            libremetaverse_structured_data::OSD::Array(return_i_ds_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReturnIDs")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelSelectObjectsPacketReturnIDsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.return_i_ds = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut return_i_ds_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.parcel_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut return_i_ds_count = 0_usize;
            while return_i_ds_start + return_i_ds_count < self.return_i_ds.len()
                && return_i_ds_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.return_i_ds[return_i_ds_start + return_i_ds_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || return_i_ds_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    return_i_ds_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.parcel_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(return_i_ds_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .return_i_ds[return_i_ds_start..return_i_ds_start + return_i_ds_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            return_i_ds_start += return_i_ds_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if return_i_ds_start >= self.return_i_ds.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::EstateCovenantRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EstateCovenantRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 203, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EstateCovenantReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::EstateCovenantReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 204, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ForceObjectSelectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            header: <crate::packets::ForceObjectSelectPacketHeaderBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.header));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 205, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.header, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::ForceObjectSelectPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.header, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut header_values = Vec::with_capacity(1);
        header_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.header)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Header".to_owned(),
            libremetaverse_structured_data::OSD::Array(header_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Header")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.header, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ForceObjectSelectPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.header))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelBuyPassPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelBuyPassPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelBuyPassPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 206, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelDeedToGroupPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelDeedToGroupPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelDeedToGroupPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 207, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelReclaimPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelReclaimPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelReclaimPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 208, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelClaimPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelClaimPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelClaimPacketDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 209, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::ParcelClaimPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelClaimPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelJoinPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelJoinPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelJoinPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 210, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelDividePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelDividePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelDividePacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 211, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelReleasePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelReleasePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelReleasePacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 212, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelBuyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelBuyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelBuyPacketDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelBuyPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 213, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelGodForceOwnerPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelGodForceOwnerPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelGodForceOwnerPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 214, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelAccessListRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelAccessListRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelAccessListRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 215, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelAccessListReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::ParcelAccessListReplyPacketDataBlock as GeneratedBlock>::new_generated(),
            list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 216, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let list_count = usize::from(reader.read_u8()?);
        let mut list = Vec::new();
        list.try_reserve_exact(list_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..list_count {
            let mut block = <crate::packets::ParcelAccessListReplyPacketListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            list.push(block);
        }
        self.list = list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut list_values = Vec::with_capacity(self.list.len());
        for block in &self.list {
            list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "List".to_owned(),
            libremetaverse_structured_data::OSD::Array(list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("List")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelAccessListReplyPacketListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut list_count = 0_usize;
            while list_start + list_count < self.list.len()
                && list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.list[list_start + list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.list[list_start..list_start + list_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            list_start += list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if list_start >= self.list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelAccessListUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelAccessListUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelAccessListUpdatePacketDataBlock as GeneratedBlock>::new_generated(),
            list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 217, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let list_count = usize::from(reader.read_u8()?);
        let mut list = Vec::new();
        list.try_reserve_exact(list_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..list_count {
            let mut block = <crate::packets::ParcelAccessListUpdatePacketListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            list.push(block);
        }
        self.list = list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut list_values = Vec::with_capacity(self.list.len());
        for block in &self.list {
            list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "List".to_owned(),
            libremetaverse_structured_data::OSD::Array(list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("List")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelAccessListUpdatePacketListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut list_count = 0_usize;
            while list_start + list_count < self.list.len()
                && list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.list[list_start + list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.list[list_start..list_start + list_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            list_start += list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if list_start >= self.list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelDwellRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelDwellRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelDwellRequestPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 218, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelDwellReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelDwellReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ParcelDwellReplyPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 219, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestParcelTransferPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::RequestParcelTransferPacketDataBlock as GeneratedBlock>::new_generated(),
            region_data: <crate::packets::RequestParcelTransferPacketRegionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 220, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateParcelPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            parcel_data: <crate::packets::UpdateParcelPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 221, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RemoveParcelPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 222, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::RemoveParcelPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveParcelPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MergeParcelPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            master_parcel_data: <crate::packets::MergeParcelPacketMasterParcelDataBlock as GeneratedBlock>::new_generated(),
            slave_parcel_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.master_parcel_data));
        length = length.saturating_add(1);
        for block in &self.slave_parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 223, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.master_parcel_data, reader)?;
        let slave_parcel_data_count = usize::from(reader.read_u8()?);
        let mut slave_parcel_data = Vec::new();
        slave_parcel_data
            .try_reserve_exact(slave_parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..slave_parcel_data_count {
            let mut block = <crate::packets::MergeParcelPacketSlaveParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            slave_parcel_data.push(block);
        }
        self.slave_parcel_data = slave_parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.master_parcel_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.slave_parcel_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.slave_parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut master_parcel_data_values = Vec::with_capacity(1);
        master_parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.master_parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MasterParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(master_parcel_data_values),
        )?;
        let mut slave_parcel_data_values = Vec::with_capacity(
            self.slave_parcel_data.len(),
        );
        for block in &self.slave_parcel_data {
            slave_parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SlaveParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(slave_parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MasterParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.master_parcel_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SlaveParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MergeParcelPacketSlaveParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.slave_parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut slave_parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.master_parcel_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut slave_parcel_data_count = 0_usize;
            while slave_parcel_data_start + slave_parcel_data_count
                < self.slave_parcel_data.len()
                && slave_parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .slave_parcel_data[slave_parcel_data_start
                                + slave_parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || slave_parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    slave_parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.master_parcel_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(slave_parcel_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .slave_parcel_data[slave_parcel_data_start..slave_parcel_data_start
                + slave_parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            slave_parcel_data_start += slave_parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if slave_parcel_data_start >= self.slave_parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::LogParcelChangesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LogParcelChangesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            region_data: <crate::packets::LogParcelChangesPacketRegionDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 224, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::LogParcelChangesPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::LogParcelChangesPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CheckParcelSalesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { region_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.region_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 225, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let region_data_count = usize::from(reader.read_u8()?);
        let mut region_data = Vec::new();
        region_data
            .try_reserve_exact(region_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_data_count {
            let mut block = <crate::packets::CheckParcelSalesPacketRegionDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_data.push(block);
        }
        self.region_data = region_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.region_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(self.region_data.len());
        for block in &self.region_data {
            region_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CheckParcelSalesPacketRegionDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_data_count = 0_usize;
            while region_data_start + region_data_count < self.region_data.len()
                && region_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_data[region_data_start + region_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_data[region_data_start..region_data_start + region_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_data_start += region_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_data_start >= self.region_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelSalesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 226, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::ParcelSalesPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelSalesPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelGodMarkAsContentPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelGodMarkAsContentPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelGodMarkAsContentPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 227, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ViewerStartAuctionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ViewerStartAuctionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ViewerStartAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 228, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::StartAuctionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::StartAuctionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::StartAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 229, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ConfirmAuctionStartPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            auction_data: <crate::packets::ConfirmAuctionStartPacketAuctionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.auction_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 230, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.auction_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.auction_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut auction_data_values = Vec::with_capacity(1);
        auction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.auction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AuctionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(auction_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AuctionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.auction_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CompleteAuctionPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 231, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::CompleteAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CompleteAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CancelAuctionPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 232, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::CancelAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CancelAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CheckParcelAuctionsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { region_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.region_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 233, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let region_data_count = usize::from(reader.read_u8()?);
        let mut region_data = Vec::new();
        region_data
            .try_reserve_exact(region_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..region_data_count {
            let mut block = <crate::packets::CheckParcelAuctionsPacketRegionDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            region_data.push(block);
        }
        self.region_data = region_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.region_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.region_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(self.region_data.len());
        for block in &self.region_data {
            region_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CheckParcelAuctionsPacketRegionDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.region_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut region_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut region_data_count = 0_usize;
            while region_data_start + region_data_count < self.region_data.len()
                && region_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.region_data[region_data_start + region_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || region_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    region_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(region_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .region_data[region_data_start..region_data_start + region_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            region_data_start += region_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if region_data_start >= self.region_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ParcelAuctionsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 234, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::ParcelAuctionsPacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelAuctionsPacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UUIDNameRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            uuid_name_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.uuid_name_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 235, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let uuid_name_block_count = usize::from(reader.read_u8()?);
        let mut uuid_name_block = Vec::new();
        uuid_name_block
            .try_reserve_exact(uuid_name_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..uuid_name_block_count {
            let mut block = <crate::packets::UUIDNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            uuid_name_block.push(block);
        }
        self.uuid_name_block = uuid_name_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.uuid_name_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.uuid_name_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut uuid_name_block_values = Vec::with_capacity(self.uuid_name_block.len());
        for block in &self.uuid_name_block {
            uuid_name_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "UUIDNameBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(uuid_name_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UUIDNameBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UUIDNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.uuid_name_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut uuid_name_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut uuid_name_block_count = 0_usize;
            while uuid_name_block_start + uuid_name_block_count
                < self.uuid_name_block.len()
                && uuid_name_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .uuid_name_block[uuid_name_block_start
                                + uuid_name_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || uuid_name_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    uuid_name_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(uuid_name_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .uuid_name_block[uuid_name_block_start..uuid_name_block_start
                + uuid_name_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            uuid_name_block_start += uuid_name_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if uuid_name_block_start >= self.uuid_name_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UUIDNameReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            uuid_name_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.uuid_name_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 236, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let uuid_name_block_count = usize::from(reader.read_u8()?);
        let mut uuid_name_block = Vec::new();
        uuid_name_block
            .try_reserve_exact(uuid_name_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..uuid_name_block_count {
            let mut block = <crate::packets::UUIDNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            uuid_name_block.push(block);
        }
        self.uuid_name_block = uuid_name_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.uuid_name_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.uuid_name_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut uuid_name_block_values = Vec::with_capacity(self.uuid_name_block.len());
        for block in &self.uuid_name_block {
            uuid_name_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "UUIDNameBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(uuid_name_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UUIDNameBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UUIDNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.uuid_name_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut uuid_name_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut uuid_name_block_count = 0_usize;
            while uuid_name_block_start + uuid_name_block_count
                < self.uuid_name_block.len()
                && uuid_name_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .uuid_name_block[uuid_name_block_start
                                + uuid_name_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || uuid_name_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    uuid_name_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(uuid_name_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .uuid_name_block[uuid_name_block_start..uuid_name_block_start
                + uuid_name_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            uuid_name_block_start += uuid_name_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if uuid_name_block_start >= self.uuid_name_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UUIDGroupNameRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            uuid_name_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.uuid_name_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 237, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let uuid_name_block_count = usize::from(reader.read_u8()?);
        let mut uuid_name_block = Vec::new();
        uuid_name_block
            .try_reserve_exact(uuid_name_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..uuid_name_block_count {
            let mut block = <crate::packets::UUIDGroupNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            uuid_name_block.push(block);
        }
        self.uuid_name_block = uuid_name_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.uuid_name_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.uuid_name_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut uuid_name_block_values = Vec::with_capacity(self.uuid_name_block.len());
        for block in &self.uuid_name_block {
            uuid_name_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "UUIDNameBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(uuid_name_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UUIDNameBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UUIDGroupNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.uuid_name_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut uuid_name_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut uuid_name_block_count = 0_usize;
            while uuid_name_block_start + uuid_name_block_count
                < self.uuid_name_block.len()
                && uuid_name_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .uuid_name_block[uuid_name_block_start
                                + uuid_name_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || uuid_name_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    uuid_name_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(uuid_name_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .uuid_name_block[uuid_name_block_start..uuid_name_block_start
                + uuid_name_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            uuid_name_block_start += uuid_name_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if uuid_name_block_start >= self.uuid_name_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UUIDGroupNameReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            uuid_name_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.uuid_name_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 238, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let uuid_name_block_count = usize::from(reader.read_u8()?);
        let mut uuid_name_block = Vec::new();
        uuid_name_block
            .try_reserve_exact(uuid_name_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..uuid_name_block_count {
            let mut block = <crate::packets::UUIDGroupNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            uuid_name_block.push(block);
        }
        self.uuid_name_block = uuid_name_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.uuid_name_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.uuid_name_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut uuid_name_block_values = Vec::with_capacity(self.uuid_name_block.len());
        for block in &self.uuid_name_block {
            uuid_name_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "UUIDNameBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(uuid_name_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UUIDNameBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UUIDGroupNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.uuid_name_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut uuid_name_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut uuid_name_block_count = 0_usize;
            while uuid_name_block_start + uuid_name_block_count
                < self.uuid_name_block.len()
                && uuid_name_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .uuid_name_block[uuid_name_block_start
                                + uuid_name_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || uuid_name_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    uuid_name_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(uuid_name_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .uuid_name_block[uuid_name_block_start..uuid_name_block_start
                + uuid_name_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            uuid_name_block_start += uuid_name_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if uuid_name_block_start >= self.uuid_name_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ChatPassPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            chat_data: <crate::packets::ChatPassPacketChatDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.chat_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 239, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.chat_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.chat_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut chat_data_values = Vec::with_capacity(1);
        chat_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.chat_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ChatData".to_owned(),
            libremetaverse_structured_data::OSD::Array(chat_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ChatData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.chat_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChildAgentDyingPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChildAgentDyingPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 240, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChildAgentUnknownPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChildAgentUnknownPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 241, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::KillChildAgentsPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            id_block: <crate::packets::KillChildAgentsPacketIDBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.id_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 242, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.id_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.id_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut id_block_values = Vec::with_capacity(1);
        id_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.id_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "IDBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(id_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("IDBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.id_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GetScriptRunningPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            script: <crate::packets::GetScriptRunningPacketScriptBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.script));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 243, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.script, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.script, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut script_values = Vec::with_capacity(1);
        script_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.script)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Script".to_owned(),
            libremetaverse_structured_data::OSD::Array(script_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Script")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.script, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptRunningReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            script: <crate::packets::ScriptRunningReplyPacketScriptBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.script));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 244, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.script, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.script, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut script_values = Vec::with_capacity(1);
        script_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.script)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Script".to_owned(),
            libremetaverse_structured_data::OSD::Array(script_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Script")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.script, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetScriptRunningPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SetScriptRunningPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            script: <crate::packets::SetScriptRunningPacketScriptBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.script));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 245, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.script, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.script, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut script_values = Vec::with_capacity(1);
        script_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.script)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Script".to_owned(),
            libremetaverse_structured_data::OSD::Array(script_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Script")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.script, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptResetPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ScriptResetPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            script: <crate::packets::ScriptResetPacketScriptBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.script));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 246, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.script, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.script, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut script_values = Vec::with_capacity(1);
        script_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.script)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Script".to_owned(),
            libremetaverse_structured_data::OSD::Array(script_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Script")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.script, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptSensorRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            requester: <crate::packets::ScriptSensorRequestPacketRequesterBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.requester));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 247, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.requester, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.requester, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut requester_values = Vec::with_capacity(1);
        requester_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.requester)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Requester".to_owned(),
            libremetaverse_structured_data::OSD::Array(requester_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Requester")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.requester, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptSensorReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            requester: <crate::packets::ScriptSensorReplyPacketRequesterBlock as GeneratedBlock>::new_generated(),
            sensed_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.requester));
        length = length.saturating_add(1);
        for block in &self.sensed_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 248, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.requester, reader)?;
        let sensed_data_count = usize::from(reader.read_u8()?);
        let mut sensed_data = Vec::new();
        sensed_data
            .try_reserve_exact(sensed_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..sensed_data_count {
            let mut block = <crate::packets::ScriptSensorReplyPacketSensedDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            sensed_data.push(block);
        }
        self.sensed_data = sensed_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.requester, writer)?;
        writer
            .write_u8(
                u8::try_from(self.sensed_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.sensed_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut requester_values = Vec::with_capacity(1);
        requester_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.requester)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Requester".to_owned(),
            libremetaverse_structured_data::OSD::Array(requester_values),
        )?;
        let mut sensed_data_values = Vec::with_capacity(self.sensed_data.len());
        for block in &self.sensed_data {
            sensed_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "SensedData".to_owned(),
            libremetaverse_structured_data::OSD::Array(sensed_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Requester")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.requester, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SensedData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptSensorReplyPacketSensedDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.sensed_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut sensed_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.requester))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut sensed_data_count = 0_usize;
            while sensed_data_start + sensed_data_count < self.sensed_data.len()
                && sensed_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.sensed_data[sensed_data_start + sensed_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || sensed_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    sensed_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.requester, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(sensed_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .sensed_data[sensed_data_start..sensed_data_start + sensed_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            sensed_data_start += sensed_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if sensed_data_start >= self.sensed_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CompleteAgentMovementPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CompleteAgentMovementPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 249, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentMovementCompletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentMovementCompletePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::AgentMovementCompletePacketDataBlock as GeneratedBlock>::new_generated(),
            sim_data: <crate::packets::AgentMovementCompletePacketSimDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.sim_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 250, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        GeneratedBlock::decode_payload(&mut self.sim_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        GeneratedBlock::encode_payload(&self.sim_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut sim_data_values = Vec::with_capacity(1);
        sim_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sim_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimData".to_owned(),
            libremetaverse_structured_data::OSD::Array(sim_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sim_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DataServerLogoutPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            user_data: <crate::packets::DataServerLogoutPacketUserDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 251, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.user_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.user_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut user_data_values = Vec::with_capacity(1);
        user_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserData".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LogoutRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LogoutRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 252, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LogoutReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LogoutReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 253, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::LogoutReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::LogoutReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ImprovedInstantMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ImprovedInstantMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            message_block: <crate::packets::ImprovedInstantMessagePacketMessageBlockBlock as GeneratedBlock>::new_generated(),
            estate_block: <crate::packets::ImprovedInstantMessagePacketEstateBlockBlock as GeneratedBlock>::new_generated(),
            meta_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.message_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.estate_block));
        length = length.saturating_add(1);
        for block in &self.meta_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 254, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.message_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.estate_block, reader)?;
        let meta_data_count = usize::from(reader.read_u8()?);
        let mut meta_data = Vec::new();
        meta_data
            .try_reserve_exact(meta_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..meta_data_count {
            let mut block = <crate::packets::ImprovedInstantMessagePacketMetaDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            meta_data.push(block);
        }
        self.meta_data = meta_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.message_block, writer)?;
        GeneratedBlock::encode_payload(&self.estate_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.meta_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.meta_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut message_block_values = Vec::with_capacity(1);
        message_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.message_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MessageBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(message_block_values),
        )?;
        let mut estate_block_values = Vec::with_capacity(1);
        estate_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.estate_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EstateBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(estate_block_values),
        )?;
        let mut meta_data_values = Vec::with_capacity(self.meta_data.len());
        for block in &self.meta_data {
            meta_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "MetaData".to_owned(),
            libremetaverse_structured_data::OSD::Array(meta_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MessageBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.message_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EstateBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.estate_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MetaData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ImprovedInstantMessagePacketMetaDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.meta_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut meta_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.message_block),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.estate_block))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut meta_data_count = 0_usize;
            while meta_data_start + meta_data_count < self.meta_data.len()
                && meta_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.meta_data[meta_data_start + meta_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || meta_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    meta_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.message_block, &mut writer)?;
            GeneratedBlock::encode_payload(&self.estate_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(meta_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .meta_data[meta_data_start..meta_data_start + meta_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            meta_data_start += meta_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if meta_data_start >= self.meta_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RetrieveInstantMessagesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RetrieveInstantMessagesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 255, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::FindAgentPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_block: <crate::packets::FindAgentPacketAgentBlockBlock as GeneratedBlock>::new_generated(),
            location_block: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_block));
        length = length.saturating_add(1);
        for block in &self.location_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 256, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_block, reader)?;
        let location_block_count = usize::from(reader.read_u8()?);
        let mut location_block = Vec::new();
        location_block
            .try_reserve_exact(location_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..location_block_count {
            let mut block = <crate::packets::FindAgentPacketLocationBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            location_block.push(block);
        }
        self.location_block = location_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.location_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.location_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_block_values = Vec::with_capacity(1);
        agent_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        let mut location_block_values = Vec::with_capacity(self.location_block.len());
        for block in &self.location_block {
            location_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "LocationBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(location_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("LocationBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::FindAgentPacketLocationBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.location_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut location_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_block))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut location_block_count = 0_usize;
            while location_block_start + location_block_count < self.location_block.len()
                && location_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .location_block[location_block_start + location_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || location_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    location_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(location_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .location_block[location_block_start..location_block_start
                + location_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            location_block_start += location_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if location_block_start >= self.location_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RequestGodlikePowersPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestGodlikePowersPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            request_block: <crate::packets::RequestGodlikePowersPacketRequestBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 257, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.request_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.request_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut request_block_values = Vec::with_capacity(1);
        request_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GrantGodlikePowersPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GrantGodlikePowersPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            grant_data: <crate::packets::GrantGodlikePowersPacketGrantDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.grant_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 258, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.grant_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.grant_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut grant_data_values = Vec::with_capacity(1);
        grant_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.grant_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GrantData".to_owned(),
            libremetaverse_structured_data::OSD::Array(grant_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GrantData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.grant_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GodlikeMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GodlikeMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            method_data: <crate::packets::GodlikeMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            param_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length.saturating_add(1);
        for block in &self.param_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 259, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        let param_list_count = usize::from(reader.read_u8()?);
        let mut param_list = Vec::new();
        param_list
            .try_reserve_exact(param_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..param_list_count {
            let mut block = <crate::packets::GodlikeMessagePacketParamListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            param_list.push(block);
        }
        self.param_list = param_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.param_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.param_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut param_list_values = Vec::with_capacity(self.param_list.len());
        for block in &self.param_list {
            param_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParamList".to_owned(),
            libremetaverse_structured_data::OSD::Array(param_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParamList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GodlikeMessagePacketParamListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.param_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut param_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.method_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut param_list_count = 0_usize;
            while param_list_start + param_list_count < self.param_list.len()
                && param_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.param_list[param_list_start + param_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || param_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    param_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.method_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(param_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .param_list[param_list_start..param_list_start + param_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            param_list_start += param_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if param_list_start >= self.param_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::EstateOwnerMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EstateOwnerMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            method_data: <crate::packets::EstateOwnerMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            param_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length.saturating_add(1);
        for block in &self.param_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 260, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        let param_list_count = usize::from(reader.read_u8()?);
        let mut param_list = Vec::new();
        param_list
            .try_reserve_exact(param_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..param_list_count {
            let mut block = <crate::packets::EstateOwnerMessagePacketParamListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            param_list.push(block);
        }
        self.param_list = param_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.param_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.param_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut param_list_values = Vec::with_capacity(self.param_list.len());
        for block in &self.param_list {
            param_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParamList".to_owned(),
            libremetaverse_structured_data::OSD::Array(param_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParamList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::EstateOwnerMessagePacketParamListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.param_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut param_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.method_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut param_list_count = 0_usize;
            while param_list_start + param_list_count < self.param_list.len()
                && param_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.param_list[param_list_start + param_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || param_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    param_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.method_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(param_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .param_list[param_list_start..param_list_start + param_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            param_list_start += param_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if param_list_start >= self.param_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GenericMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GenericMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            method_data: <crate::packets::GenericMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            param_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length.saturating_add(1);
        for block in &self.param_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 261, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        let param_list_count = usize::from(reader.read_u8()?);
        let mut param_list = Vec::new();
        param_list
            .try_reserve_exact(param_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..param_list_count {
            let mut block = <crate::packets::GenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            param_list.push(block);
        }
        self.param_list = param_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.param_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.param_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut param_list_values = Vec::with_capacity(self.param_list.len());
        for block in &self.param_list {
            param_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParamList".to_owned(),
            libremetaverse_structured_data::OSD::Array(param_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParamList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.param_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut param_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.method_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut param_list_count = 0_usize;
            while param_list_start + param_list_count < self.param_list.len()
                && param_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.param_list[param_list_start + param_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || param_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    param_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.method_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(param_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .param_list[param_list_start..param_list_start + param_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            param_list_start += param_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if param_list_start >= self.param_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::LargeGenericMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LargeGenericMessagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            method_data: <crate::packets::LargeGenericMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            param_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length.saturating_add(1);
        for block in &self.param_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 430, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        let param_list_count = usize::from(reader.read_u8()?);
        let mut param_list = Vec::new();
        param_list
            .try_reserve_exact(param_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..param_list_count {
            let mut block = <crate::packets::LargeGenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            param_list.push(block);
        }
        self.param_list = param_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.param_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.param_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut param_list_values = Vec::with_capacity(self.param_list.len());
        for block in &self.param_list {
            param_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParamList".to_owned(),
            libremetaverse_structured_data::OSD::Array(param_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParamList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::LargeGenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.param_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut param_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.method_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut param_list_count = 0_usize;
            while param_list_start + param_list_count < self.param_list.len()
                && param_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.param_list[param_list_start + param_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || param_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    param_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.method_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(param_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .param_list[param_list_start..param_list_start + param_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            param_list_start += param_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if param_list_start >= self.param_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MuteListRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MuteListRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            mute_data: <crate::packets::MuteListRequestPacketMuteDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.mute_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 262, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.mute_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.mute_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut mute_data_values = Vec::with_capacity(1);
        mute_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.mute_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MuteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(mute_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MuteData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.mute_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateMuteListEntryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateMuteListEntryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            mute_data: <crate::packets::UpdateMuteListEntryPacketMuteDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.mute_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 263, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.mute_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.mute_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut mute_data_values = Vec::with_capacity(1);
        mute_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.mute_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MuteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(mute_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MuteData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.mute_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RemoveMuteListEntryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveMuteListEntryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            mute_data: <crate::packets::RemoveMuteListEntryPacketMuteDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.mute_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 264, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.mute_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.mute_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut mute_data_values = Vec::with_capacity(1);
        mute_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.mute_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MuteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(mute_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MuteData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.mute_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CopyInventoryFromNotecardPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CopyInventoryFromNotecardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            notecard_data: <crate::packets::CopyInventoryFromNotecardPacketNotecardDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.notecard_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 265, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.notecard_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::CopyInventoryFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.notecard_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut notecard_data_values = Vec::with_capacity(1);
        notecard_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.notecard_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NotecardData".to_owned(),
            libremetaverse_structured_data::OSD::Array(notecard_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NotecardData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.notecard_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CopyInventoryFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.notecard_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.notecard_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UpdateInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 266, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::UpdateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UpdateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UpdateCreateInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateCreateInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 267, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::UpdateCreateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UpdateCreateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MoveInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MoveInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 268, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::MoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CopyInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CopyInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 269, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::CopyInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CopyInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RemoveInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 270, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::RemoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ChangeInventoryItemFlagsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChangeInventoryItemFlagsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 271, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::ChangeInventoryItemFlagsPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChangeInventoryItemFlagsPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SaveAssetIntoInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SaveAssetIntoInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::SaveAssetIntoInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 272, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateInventoryFolderPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateInventoryFolderPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: <crate::packets::CreateInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.folder_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 273, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.folder_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.folder_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(1);
        folder_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.folder_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.folder_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateInventoryFolderPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateInventoryFolderPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 274, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::UpdateInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::UpdateInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MoveInventoryFolderPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MoveInventoryFolderPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 275, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::MoveInventoryFolderPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MoveInventoryFolderPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RemoveInventoryFolderPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveInventoryFolderPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 276, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::RemoveInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::FetchInventoryDescendentsPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::FetchInventoryDescendentsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::FetchInventoryDescendentsPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 277, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::InventoryDescendentsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::InventoryDescendentsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
            item_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.item_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 278, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::InventoryDescendentsPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        let item_data_count = usize::from(reader.read_u8()?);
        let mut item_data = Vec::new();
        item_data
            .try_reserve_exact(item_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..item_data_count {
            let mut block = <crate::packets::InventoryDescendentsPacketItemDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            item_data.push(block);
        }
        self.item_data = item_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.item_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.item_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        let mut item_data_values = Vec::with_capacity(self.item_data.len());
        for block in &self.item_data {
            item_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ItemData".to_owned(),
            libremetaverse_structured_data::OSD::Array(item_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::InventoryDescendentsPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ItemData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::InventoryDescendentsPacketItemDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.item_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        let mut item_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let mut item_data_count = 0_usize;
            while item_data_start + item_data_count < self.item_data.len()
                && item_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.item_data[item_data_start + item_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || item_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    item_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            writer
                .write_u8(
                    u8::try_from(item_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .item_data[item_data_start..item_data_start + item_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            item_data_start += item_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len()
                && item_data_start >= self.item_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::FetchInventoryPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::FetchInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 279, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::FetchInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::FetchInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::FetchInventoryReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::FetchInventoryReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 280, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::FetchInventoryReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::FetchInventoryReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::BulkUpdateInventoryPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::BulkUpdateInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
            item_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.item_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 281, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::BulkUpdateInventoryPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        let item_data_count = usize::from(reader.read_u8()?);
        let mut item_data = Vec::new();
        item_data
            .try_reserve_exact(item_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..item_data_count {
            let mut block = <crate::packets::BulkUpdateInventoryPacketItemDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            item_data.push(block);
        }
        self.item_data = item_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.item_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.item_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        let mut item_data_values = Vec::with_capacity(self.item_data.len());
        for block in &self.item_data {
            item_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ItemData".to_owned(),
            libremetaverse_structured_data::OSD::Array(item_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::BulkUpdateInventoryPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ItemData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::BulkUpdateInventoryPacketItemDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.item_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        let mut item_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let mut item_data_count = 0_usize;
            while item_data_start + item_data_count < self.item_data.len()
                && item_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.item_data[item_data_start + item_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || item_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    item_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            writer
                .write_u8(
                    u8::try_from(item_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .item_data[item_data_start..item_data_start + item_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            item_data_start += item_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len()
                && item_data_start >= self.item_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RequestInventoryAssetPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            query_data: <crate::packets::RequestInventoryAssetPacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 282, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::InventoryAssetResponsePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            query_data: <crate::packets::InventoryAssetResponsePacketQueryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 283, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RemoveInventoryObjectsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveInventoryObjectsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
            item_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.item_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 284, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::RemoveInventoryObjectsPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        let item_data_count = usize::from(reader.read_u8()?);
        let mut item_data = Vec::new();
        item_data
            .try_reserve_exact(item_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..item_data_count {
            let mut block = <crate::packets::RemoveInventoryObjectsPacketItemDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            item_data.push(block);
        }
        self.item_data = item_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.item_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.item_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        let mut item_data_values = Vec::with_capacity(self.item_data.len());
        for block in &self.item_data {
            item_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ItemData".to_owned(),
            libremetaverse_structured_data::OSD::Array(item_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveInventoryObjectsPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ItemData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveInventoryObjectsPacketItemDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.item_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        let mut item_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let mut item_data_count = 0_usize;
            while item_data_start + item_data_count < self.item_data.len()
                && item_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.item_data[item_data_start + item_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || item_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    item_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            writer
                .write_u8(
                    u8::try_from(item_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .item_data[item_data_start..item_data_start + item_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            item_data_start += item_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len()
                && item_data_start >= self.item_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::PurgeInventoryDescendentsPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::PurgeInventoryDescendentsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::PurgeInventoryDescendentsPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 285, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateTaskInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateTaskInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            update_data: <crate::packets::UpdateTaskInventoryPacketUpdateDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::UpdateTaskInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.update_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 286, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.update_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.update_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut update_data_values = Vec::with_capacity(1);
        update_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.update_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UpdateData".to_owned(),
            libremetaverse_structured_data::OSD::Array(update_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UpdateData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.update_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RemoveTaskInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveTaskInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::RemoveTaskInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 287, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MoveTaskInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MoveTaskInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::MoveTaskInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 288, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestTaskInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestTaskInventoryPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::RequestTaskInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 289, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ReplyTaskInventoryPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            inventory_data: <crate::packets::ReplyTaskInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 290, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DeRezObjectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DeRezObjectPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            agent_block: <crate::packets::DeRezObjectPacketAgentBlockBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_block));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 291, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.agent_block, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::DeRezObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.agent_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut agent_block_values = Vec::with_capacity(1);
        agent_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DeRezObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_block))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DeRezAckPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transaction_data: <crate::packets::DeRezAckPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 292, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RezObjectPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezObjectPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            rez_data: <crate::packets::RezObjectPacketRezDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::RezObjectPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.rez_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 293, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.rez_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.rez_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut rez_data_values = Vec::with_capacity(1);
        rez_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.rez_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RezData".to_owned(),
            libremetaverse_structured_data::OSD::Array(rez_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RezData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.rez_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RezObjectFromNotecardPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezObjectFromNotecardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            rez_data: <crate::packets::RezObjectFromNotecardPacketRezDataBlock as GeneratedBlock>::new_generated(),
            notecard_data: <crate::packets::RezObjectFromNotecardPacketNotecardDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.rez_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.notecard_data));
        length = length.saturating_add(1);
        for block in &self.inventory_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 294, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.rez_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.notecard_data, reader)?;
        let inventory_data_count = usize::from(reader.read_u8()?);
        let mut inventory_data = Vec::new();
        inventory_data
            .try_reserve_exact(inventory_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_data_count {
            let mut block = <crate::packets::RezObjectFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_data.push(block);
        }
        self.inventory_data = inventory_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.rez_data, writer)?;
        GeneratedBlock::encode_payload(&self.notecard_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut rez_data_values = Vec::with_capacity(1);
        rez_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.rez_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RezData".to_owned(),
            libremetaverse_structured_data::OSD::Array(rez_data_values),
        )?;
        let mut notecard_data_values = Vec::with_capacity(1);
        notecard_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.notecard_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NotecardData".to_owned(),
            libremetaverse_structured_data::OSD::Array(notecard_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(self.inventory_data.len());
        for block in &self.inventory_data {
            inventory_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RezData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.rez_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NotecardData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.notecard_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RezObjectFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut inventory_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.rez_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.notecard_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut inventory_data_count = 0_usize;
            while inventory_data_start + inventory_data_count < self.inventory_data.len()
                && inventory_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .inventory_data[inventory_data_start + inventory_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || inventory_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    inventory_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.rez_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.notecard_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(inventory_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .inventory_data[inventory_data_start..inventory_data_start
                + inventory_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            inventory_data_start += inventory_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if inventory_data_start >= self.inventory_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::TransferInventoryPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            info_block: <crate::packets::TransferInventoryPacketInfoBlockBlock as GeneratedBlock>::new_generated(),
            inventory_block: Vec::new(),
            validation_block: <crate::packets::TransferInventoryPacketValidationBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.info_block));
        length = length.saturating_add(1);
        for block in &self.inventory_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.validation_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 295, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info_block, reader)?;
        let inventory_block_count = usize::from(reader.read_u8()?);
        let mut inventory_block = Vec::new();
        inventory_block
            .try_reserve_exact(inventory_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..inventory_block_count {
            let mut block = <crate::packets::TransferInventoryPacketInventoryBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            inventory_block.push(block);
        }
        self.inventory_block = inventory_block;
        GeneratedBlock::decode_payload(&mut self.validation_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.inventory_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.inventory_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.validation_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_block_values = Vec::with_capacity(1);
        info_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InfoBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_block_values),
        )?;
        let mut inventory_block_values = Vec::with_capacity(self.inventory_block.len());
        for block in &self.inventory_block {
            inventory_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InventoryBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_block_values),
        )?;
        let mut validation_block_values = Vec::with_capacity(1);
        validation_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.validation_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ValidationBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(validation_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InfoBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::TransferInventoryPacketInventoryBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.inventory_block = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ValidationBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.validation_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TransferInventoryAckPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            info_block: <crate::packets::TransferInventoryAckPacketInfoBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.info_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 296, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.info_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.info_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut info_block_values = Vec::with_capacity(1);
        info_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InfoBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InfoBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AcceptFriendshipPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AcceptFriendshipPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_block: <crate::packets::AcceptFriendshipPacketTransactionBlockBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_block));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 297, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_block, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::AcceptFriendshipPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_block_values = Vec::with_capacity(1);
        transaction_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_block_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AcceptFriendshipPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.transaction_block),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.transaction_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DeclineFriendshipPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DeclineFriendshipPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_block: <crate::packets::DeclineFriendshipPacketTransactionBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 298, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_block_values = Vec::with_capacity(1);
        transaction_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::FormFriendshipPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_block: <crate::packets::FormFriendshipPacketAgentBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 299, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_block_values = Vec::with_capacity(1);
        agent_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TerminateFriendshipPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::TerminateFriendshipPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            ex_block: <crate::packets::TerminateFriendshipPacketExBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.ex_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 300, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.ex_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.ex_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut ex_block_values = Vec::with_capacity(1);
        ex_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.ex_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ExBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(ex_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ExBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.ex_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::OfferCallingCardPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::OfferCallingCardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            agent_block: <crate::packets::OfferCallingCardPacketAgentBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 301, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.agent_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.agent_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut agent_block_values = Vec::with_capacity(1);
        agent_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AcceptCallingCardPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AcceptCallingCardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_block: <crate::packets::AcceptCallingCardPacketTransactionBlockBlock as GeneratedBlock>::new_generated(),
            folder_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_block));
        length = length.saturating_add(1);
        for block in &self.folder_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 302, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_block, reader)?;
        let folder_data_count = usize::from(reader.read_u8()?);
        let mut folder_data = Vec::new();
        folder_data
            .try_reserve_exact(folder_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..folder_data_count {
            let mut block = <crate::packets::AcceptCallingCardPacketFolderDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            folder_data.push(block);
        }
        self.folder_data = folder_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_block, writer)?;
        writer
            .write_u8(
                u8::try_from(self.folder_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.folder_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_block_values = Vec::with_capacity(1);
        transaction_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_block_values),
        )?;
        let mut folder_data_values = Vec::with_capacity(self.folder_data.len());
        for block in &self.folder_data {
            folder_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "FolderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(folder_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FolderData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AcceptCallingCardPacketFolderDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.folder_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut folder_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.transaction_block),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut folder_data_count = 0_usize;
            while folder_data_start + folder_data_count < self.folder_data.len()
                && folder_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.folder_data[folder_data_start + folder_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || folder_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    folder_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.transaction_block, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(folder_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .folder_data[folder_data_start..folder_data_start + folder_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            folder_data_start += folder_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if folder_data_start >= self.folder_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DeclineCallingCardPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DeclineCallingCardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_block: <crate::packets::DeclineCallingCardPacketTransactionBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 303, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_block_values = Vec::with_capacity(1);
        transaction_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RezScriptPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezScriptPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            update_block: <crate::packets::RezScriptPacketUpdateBlockBlock as GeneratedBlock>::new_generated(),
            inventory_block: <crate::packets::RezScriptPacketInventoryBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.update_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 304, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.update_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.update_block, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut update_block_values = Vec::with_capacity(1);
        update_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.update_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UpdateBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(update_block_values),
        )?;
        let mut inventory_block_values = Vec::with_capacity(1);
        inventory_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UpdateBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.update_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_block: <crate::packets::CreateInventoryItemPacketInventoryBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 305, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_block_values = Vec::with_capacity(1);
        inventory_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateLandmarkForEventPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateLandmarkForEventPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::CreateLandmarkForEventPacketEventDataBlock as GeneratedBlock>::new_generated(),
            inventory_block: <crate::packets::CreateLandmarkForEventPacketInventoryBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 306, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        let mut inventory_block_values = Vec::with_capacity(1);
        inventory_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventLocationRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            query_data: <crate::packets::EventLocationRequestPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventLocationRequestPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 307, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EventLocationReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            query_data: <crate::packets::EventLocationReplyPacketQueryDataBlock as GeneratedBlock>::new_generated(),
            event_data: <crate::packets::EventLocationReplyPacketEventDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.query_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.event_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 308, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.query_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.event_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.query_data, writer)?;
        GeneratedBlock::encode_payload(&self.event_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut query_data_values = Vec::with_capacity(1);
        query_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.query_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "QueryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(query_data_values),
        )?;
        let mut event_data_values = Vec::with_capacity(1);
        event_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.event_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EventData".to_owned(),
            libremetaverse_structured_data::OSD::Array(event_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("QueryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.query_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EventData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.event_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RegionHandleRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            request_block: <crate::packets::RegionHandleRequestPacketRequestBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 309, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.request_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.request_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut request_block_values = Vec::with_capacity(1);
        request_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RegionIDAndHandleReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            reply_block: <crate::packets::RegionIDAndHandleReplyPacketReplyBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.reply_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 310, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.reply_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.reply_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut reply_block_values = Vec::with_capacity(1);
        reply_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.reply_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ReplyBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(reply_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReplyBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.reply_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MoneyTransferRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MoneyTransferRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::MoneyTransferRequestPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 311, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MoneyTransferBackendPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            money_data: <crate::packets::MoneyTransferBackendPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 312, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MoneyBalanceRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MoneyBalanceRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::MoneyBalanceRequestPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 313, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MoneyBalanceReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            money_data: <crate::packets::MoneyBalanceReplyPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
            transaction_info: <crate::packets::MoneyBalanceReplyPacketTransactionInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 314, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        let mut transaction_info_values = Vec::with_capacity(1);
        transaction_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RoutedMoneyBalanceReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            target_block: <crate::packets::RoutedMoneyBalanceReplyPacketTargetBlockBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::RoutedMoneyBalanceReplyPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
            transaction_info: <crate::packets::RoutedMoneyBalanceReplyPacketTransactionInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.target_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 315, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.target_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.target_block, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut target_block_values = Vec::with_capacity(1);
        target_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.target_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TargetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_block_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        let mut transaction_info_values = Vec::with_capacity(1);
        transaction_info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.target_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionInfo")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ActivateGesturesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ActivateGesturesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 316, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::ActivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ActivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DeactivateGesturesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::DeactivateGesturesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 317, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::DeactivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::DeactivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MuteListUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            mute_data: <crate::packets::MuteListUpdatePacketMuteDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.mute_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 318, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.mute_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.mute_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut mute_data_values = Vec::with_capacity(1);
        mute_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.mute_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MuteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(mute_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MuteData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.mute_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UseCachedMuteListPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UseCachedMuteListPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 319, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GrantUserRightsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GrantUserRightsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            rights: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.rights {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 320, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let rights_count = usize::from(reader.read_u8()?);
        let mut rights = Vec::new();
        rights
            .try_reserve_exact(rights_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..rights_count {
            let mut block = <crate::packets::GrantUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            rights.push(block);
        }
        self.rights = rights;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.rights.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.rights {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut rights_values = Vec::with_capacity(self.rights.len());
        for block in &self.rights {
            rights_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Rights".to_owned(),
            libremetaverse_structured_data::OSD::Array(rights_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Rights")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GrantUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.rights = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut rights_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut rights_count = 0_usize;
            while rights_start + rights_count < self.rights.len()
                && rights_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.rights[rights_start + rights_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || rights_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    rights_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(rights_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.rights[rights_start..rights_start + rights_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            rights_start += rights_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if rights_start >= self.rights.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ChangeUserRightsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChangeUserRightsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            rights: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.rights {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 321, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let rights_count = usize::from(reader.read_u8()?);
        let mut rights = Vec::new();
        rights
            .try_reserve_exact(rights_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..rights_count {
            let mut block = <crate::packets::ChangeUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            rights.push(block);
        }
        self.rights = rights;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.rights.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.rights {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut rights_values = Vec::with_capacity(self.rights.len());
        for block in &self.rights {
            rights_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Rights".to_owned(),
            libremetaverse_structured_data::OSD::Array(rights_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Rights")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChangeUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.rights = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut rights_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut rights_count = 0_usize;
            while rights_start + rights_count < self.rights.len()
                && rights_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.rights[rights_start + rights_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || rights_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    rights_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(rights_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.rights[rights_start..rights_start + rights_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            rights_start += rights_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if rights_start >= self.rights.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::OnlineNotificationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { agent_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.agent_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 322, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let agent_block_count = usize::from(reader.read_u8()?);
        let mut agent_block = Vec::new();
        agent_block
            .try_reserve_exact(agent_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_block_count {
            let mut block = <crate::packets::OnlineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_block.push(block);
        }
        self.agent_block = agent_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.agent_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_block_values = Vec::with_capacity(self.agent_block.len());
        for block in &self.agent_block {
            agent_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::OnlineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut agent_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut agent_block_count = 0_usize;
            while agent_block_start + agent_block_count < self.agent_block.len()
                && agent_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_block[agent_block_start + agent_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(agent_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_block[agent_block_start..agent_block_start + agent_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_block_start += agent_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if agent_block_start >= self.agent_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::OfflineNotificationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { agent_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.agent_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 323, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let agent_block_count = usize::from(reader.read_u8()?);
        let mut agent_block = Vec::new();
        agent_block
            .try_reserve_exact(agent_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_block_count {
            let mut block = <crate::packets::OfflineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_block.push(block);
        }
        self.agent_block = agent_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.agent_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_block_values = Vec::with_capacity(self.agent_block.len());
        for block in &self.agent_block {
            agent_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::OfflineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut agent_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut agent_block_count = 0_usize;
            while agent_block_start + agent_block_count < self.agent_block.len()
                && agent_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_block[agent_block_start + agent_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(agent_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_block[agent_block_start..agent_block_start + agent_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_block_start += agent_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if agent_block_start >= self.agent_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SetStartLocationRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SetStartLocationRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            start_location_data: <crate::packets::SetStartLocationRequestPacketStartLocationDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.start_location_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 324, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.start_location_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.start_location_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut start_location_data_values = Vec::with_capacity(1);
        start_location_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.start_location_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "StartLocationData".to_owned(),
            libremetaverse_structured_data::OSD::Array(start_location_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("StartLocationData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.start_location_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetStartLocationPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            start_location_data: <crate::packets::SetStartLocationPacketStartLocationDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.start_location_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 325, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.start_location_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.start_location_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut start_location_data_values = Vec::with_capacity(1);
        start_location_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.start_location_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "StartLocationData".to_owned(),
            libremetaverse_structured_data::OSD::Array(start_location_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("StartLocationData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.start_location_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::NetTestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            net_block: <crate::packets::NetTestPacketNetBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.net_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 326, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.net_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.net_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut net_block_values = Vec::with_capacity(1);
        net_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.net_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(net_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.net_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetCPURatioPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::SetCPURatioPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 327, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimCrashedPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            data: <crate::packets::SimCrashedPacketDataBlock as GeneratedBlock>::new_generated(),
            users: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(1);
        for block in &self.users {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 328, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        let users_count = usize::from(reader.read_u8()?);
        let mut users = Vec::new();
        users
            .try_reserve_exact(users_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..users_count {
            let mut block = <crate::packets::SimCrashedPacketUsersBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            users.push(block);
        }
        self.users = users;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.users.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.users {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut users_values = Vec::with_capacity(self.users.len());
        for block in &self.users {
            users_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Users".to_owned(),
            libremetaverse_structured_data::OSD::Array(users_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Users")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SimCrashedPacketUsersBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.users = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut users_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut users_count = 0_usize;
            while users_start + users_count < self.users.len()
                && users_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.users[users_start + users_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || users_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    users_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(users_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.users[users_start..users_start + users_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            users_start += users_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if users_start >= self.users.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::NameValuePairPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            task_data: <crate::packets::NameValuePairPacketTaskDataBlock as GeneratedBlock>::new_generated(),
            name_value_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.task_data));
        length = length.saturating_add(1);
        for block in &self.name_value_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 329, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.task_data, reader)?;
        let name_value_data_count = usize::from(reader.read_u8()?);
        let mut name_value_data = Vec::new();
        name_value_data
            .try_reserve_exact(name_value_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..name_value_data_count {
            let mut block = <crate::packets::NameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            name_value_data.push(block);
        }
        self.name_value_data = name_value_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.task_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.name_value_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.name_value_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut task_data_values = Vec::with_capacity(1);
        task_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.task_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TaskData".to_owned(),
            libremetaverse_structured_data::OSD::Array(task_data_values),
        )?;
        let mut name_value_data_values = Vec::with_capacity(self.name_value_data.len());
        for block in &self.name_value_data {
            name_value_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NameValueData".to_owned(),
            libremetaverse_structured_data::OSD::Array(name_value_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TaskData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.task_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NameValueData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::NameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.name_value_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut name_value_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.task_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut name_value_data_count = 0_usize;
            while name_value_data_start + name_value_data_count
                < self.name_value_data.len()
                && name_value_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .name_value_data[name_value_data_start
                                + name_value_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || name_value_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    name_value_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.task_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(name_value_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .name_value_data[name_value_data_start..name_value_data_start
                + name_value_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            name_value_data_start += name_value_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if name_value_data_start >= self.name_value_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RemoveNameValuePairPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            task_data: <crate::packets::RemoveNameValuePairPacketTaskDataBlock as GeneratedBlock>::new_generated(),
            name_value_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.task_data));
        length = length.saturating_add(1);
        for block in &self.name_value_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 330, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.task_data, reader)?;
        let name_value_data_count = usize::from(reader.read_u8()?);
        let mut name_value_data = Vec::new();
        name_value_data
            .try_reserve_exact(name_value_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..name_value_data_count {
            let mut block = <crate::packets::RemoveNameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            name_value_data.push(block);
        }
        self.name_value_data = name_value_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.task_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.name_value_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.name_value_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut task_data_values = Vec::with_capacity(1);
        task_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.task_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TaskData".to_owned(),
            libremetaverse_structured_data::OSD::Array(task_data_values),
        )?;
        let mut name_value_data_values = Vec::with_capacity(self.name_value_data.len());
        for block in &self.name_value_data {
            name_value_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NameValueData".to_owned(),
            libremetaverse_structured_data::OSD::Array(name_value_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TaskData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.task_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NameValueData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RemoveNameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.name_value_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut name_value_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.task_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut name_value_data_count = 0_usize;
            while name_value_data_start + name_value_data_count
                < self.name_value_data.len()
                && name_value_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .name_value_data[name_value_data_start
                                + name_value_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || name_value_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    name_value_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.task_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(name_value_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .name_value_data[name_value_data_start..name_value_data_start
                + name_value_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            name_value_data_start += name_value_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if name_value_data_start >= self.name_value_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UpdateAttachmentPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateAttachmentPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            attachment_block: <crate::packets::UpdateAttachmentPacketAttachmentBlockBlock as GeneratedBlock>::new_generated(),
            operation_data: <crate::packets::UpdateAttachmentPacketOperationDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::UpdateAttachmentPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.attachment_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.operation_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 331, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.attachment_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.operation_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.attachment_block, writer)?;
        GeneratedBlock::encode_payload(&self.operation_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut attachment_block_values = Vec::with_capacity(1);
        attachment_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.attachment_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AttachmentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(attachment_block_values),
        )?;
        let mut operation_data_values = Vec::with_capacity(1);
        operation_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.operation_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "OperationData".to_owned(),
            libremetaverse_structured_data::OSD::Array(operation_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AttachmentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.attachment_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("OperationData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.operation_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RemoveAttachmentPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RemoveAttachmentPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            attachment_block: <crate::packets::RemoveAttachmentPacketAttachmentBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.attachment_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 332, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.attachment_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.attachment_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut attachment_block_values = Vec::with_capacity(1);
        attachment_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.attachment_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AttachmentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(attachment_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AttachmentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.attachment_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AssetUploadRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            asset_block: <crate::packets::AssetUploadRequestPacketAssetBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.asset_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 333, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.asset_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.asset_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut asset_block_values = Vec::with_capacity(1);
        asset_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.asset_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AssetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(asset_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AssetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.asset_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AssetUploadCompletePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            asset_block: <crate::packets::AssetUploadCompletePacketAssetBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.asset_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 334, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.asset_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.asset_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut asset_block_values = Vec::with_capacity(1);
        asset_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.asset_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AssetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(asset_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AssetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.asset_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EmailMessageRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::EmailMessageRequestPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 335, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EmailMessageReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::EmailMessageReplyPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 336, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptDataRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.data_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 337, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_block_count = usize::from(reader.read_u8()?);
        let mut data_block = Vec::new();
        data_block
            .try_reserve_exact(data_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_block_count {
            let mut block = <crate::packets::ScriptDataRequestPacketDataBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data_block.push(block);
        }
        self.data_block = data_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(self.data_block.len());
        for block in &self.data_block {
            data_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptDataRequestPacketDataBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_block_count = 0_usize;
            while data_block_start + data_block_count < self.data_block.len()
                && data_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data_block[data_block_start + data_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .data_block[data_block_start..data_block_start + data_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_block_start += data_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_block_start >= self.data_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ScriptDataReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.data_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 338, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_block_count = usize::from(reader.read_u8()?);
        let mut data_block = Vec::new();
        data_block
            .try_reserve_exact(data_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_block_count {
            let mut block = <crate::packets::ScriptDataReplyPacketDataBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data_block.push(block);
        }
        self.data_block = data_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(self.data_block.len());
        for block in &self.data_block {
            data_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ScriptDataReplyPacketDataBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_block_count = 0_usize;
            while data_block_start + data_block_count < self.data_block.len()
                && data_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data_block[data_block_start + data_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .data_block[data_block_start..data_block_start + data_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_block_start += data_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_block_start >= self.data_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CreateGroupRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateGroupRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::CreateGroupRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 339, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateGroupReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateGroupReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            reply_data: <crate::packets::CreateGroupReplyPacketReplyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.reply_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 340, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.reply_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.reply_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut reply_data_values = Vec::with_capacity(1);
        reply_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.reply_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ReplyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(reply_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReplyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.reply_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateGroupInfoPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateGroupInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::UpdateGroupInfoPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 341, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupRoleChangesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleChangesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            role_change: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.role_change {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 342, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let role_change_count = usize::from(reader.read_u8()?);
        let mut role_change = Vec::new();
        role_change
            .try_reserve_exact(role_change_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..role_change_count {
            let mut block = <crate::packets::GroupRoleChangesPacketRoleChangeBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            role_change.push(block);
        }
        self.role_change = role_change;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.role_change.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.role_change {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut role_change_values = Vec::with_capacity(self.role_change.len());
        for block in &self.role_change {
            role_change_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RoleChange".to_owned(),
            libremetaverse_structured_data::OSD::Array(role_change_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RoleChange")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupRoleChangesPacketRoleChangeBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.role_change = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut role_change_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut role_change_count = 0_usize;
            while role_change_start + role_change_count < self.role_change.len()
                && role_change_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.role_change[role_change_start + role_change_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || role_change_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    role_change_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(role_change_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .role_change[role_change_start..role_change_start + role_change_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            role_change_start += role_change_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if role_change_start >= self.role_change.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::JoinGroupRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::JoinGroupRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::JoinGroupRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 343, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::JoinGroupReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::JoinGroupReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::JoinGroupReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 344, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EjectGroupMemberRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EjectGroupMemberRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::EjectGroupMemberRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            eject_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length.saturating_add(1);
        for block in &self.eject_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 345, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        let eject_data_count = usize::from(reader.read_u8()?);
        let mut eject_data = Vec::new();
        eject_data
            .try_reserve_exact(eject_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..eject_data_count {
            let mut block = <crate::packets::EjectGroupMemberRequestPacketEjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            eject_data.push(block);
        }
        self.eject_data = eject_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.eject_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.eject_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut eject_data_values = Vec::with_capacity(self.eject_data.len());
        for block in &self.eject_data {
            eject_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "EjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(eject_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::EjectGroupMemberRequestPacketEjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.eject_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut eject_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.group_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut eject_data_count = 0_usize;
            while eject_data_start + eject_data_count < self.eject_data.len()
                && eject_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.eject_data[eject_data_start + eject_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || eject_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    eject_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.group_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(eject_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .eject_data[eject_data_start..eject_data_start + eject_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            eject_data_start += eject_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if eject_data_start >= self.eject_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::EjectGroupMemberReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::EjectGroupMemberReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::EjectGroupMemberReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            eject_data: <crate::packets::EjectGroupMemberReplyPacketEjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.eject_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 346, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.eject_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        GeneratedBlock::encode_payload(&self.eject_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut eject_data_values = Vec::with_capacity(1);
        eject_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.eject_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(eject_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.eject_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LeaveGroupRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LeaveGroupRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::LeaveGroupRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 347, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LeaveGroupReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LeaveGroupReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::LeaveGroupReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 348, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::InviteGroupRequestPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::InviteGroupRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::InviteGroupRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            invite_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length.saturating_add(1);
        for block in &self.invite_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 349, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        let invite_data_count = usize::from(reader.read_u8()?);
        let mut invite_data = Vec::new();
        invite_data
            .try_reserve_exact(invite_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..invite_data_count {
            let mut block = <crate::packets::InviteGroupRequestPacketInviteDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            invite_data.push(block);
        }
        self.invite_data = invite_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.invite_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.invite_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut invite_data_values = Vec::with_capacity(self.invite_data.len());
        for block in &self.invite_data {
            invite_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "InviteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(invite_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InviteData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::InviteGroupRequestPacketInviteDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.invite_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut invite_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.group_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut invite_data_count = 0_usize;
            while invite_data_start + invite_data_count < self.invite_data.len()
                && invite_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.invite_data[invite_data_start + invite_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || invite_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    invite_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.group_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(invite_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .invite_data[invite_data_start..invite_data_start + invite_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            invite_data_start += invite_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if invite_data_start >= self.invite_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::InviteGroupResponsePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            invite_data: <crate::packets::InviteGroupResponsePacketInviteDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::InviteGroupResponsePacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.invite_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 350, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.invite_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.invite_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut invite_data_values = Vec::with_capacity(1);
        invite_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.invite_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InviteData".to_owned(),
            libremetaverse_structured_data::OSD::Array(invite_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InviteData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.invite_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupProfileRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupProfileRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupProfileRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 351, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupProfileReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupProfileReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupProfileReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 352, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupAccountSummaryRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountSummaryRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountSummaryRequestPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 353, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupAccountSummaryReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountSummaryReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountSummaryReplyPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 354, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupAccountDetailsRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountDetailsRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountDetailsRequestPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 355, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupAccountDetailsReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountDetailsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountDetailsReplyPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
            history_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length = length.saturating_add(1);
        for block in &self.history_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 356, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        let history_data_count = usize::from(reader.read_u8()?);
        let mut history_data = Vec::new();
        history_data
            .try_reserve_exact(history_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..history_data_count {
            let mut block = <crate::packets::GroupAccountDetailsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            history_data.push(block);
        }
        self.history_data = history_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.history_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.history_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        let mut history_data_values = Vec::with_capacity(self.history_data.len());
        for block in &self.history_data {
            history_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "HistoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(history_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HistoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupAccountDetailsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.history_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut history_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.money_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut history_data_count = 0_usize;
            while history_data_start + history_data_count < self.history_data.len()
                && history_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.history_data[history_data_start + history_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || history_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    history_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.money_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(history_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .history_data[history_data_start..history_data_start
                + history_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            history_data_start += history_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if history_data_start >= self.history_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupAccountTransactionsRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountTransactionsRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountTransactionsRequestPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 357, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupAccountTransactionsReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupAccountTransactionsReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            money_data: <crate::packets::GroupAccountTransactionsReplyPacketMoneyDataBlock as GeneratedBlock>::new_generated(),
            history_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.money_data));
        length = length.saturating_add(1);
        for block in &self.history_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 358, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.money_data, reader)?;
        let history_data_count = usize::from(reader.read_u8()?);
        let mut history_data = Vec::new();
        history_data
            .try_reserve_exact(history_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..history_data_count {
            let mut block = <crate::packets::GroupAccountTransactionsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            history_data.push(block);
        }
        self.history_data = history_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.money_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.history_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.history_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut money_data_values = Vec::with_capacity(1);
        money_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.money_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MoneyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(money_data_values),
        )?;
        let mut history_data_values = Vec::with_capacity(self.history_data.len());
        for block in &self.history_data {
            history_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "HistoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(history_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MoneyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.money_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HistoryData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupAccountTransactionsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.history_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut history_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.money_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut history_data_count = 0_usize;
            while history_data_start + history_data_count < self.history_data.len()
                && history_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.history_data[history_data_start + history_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || history_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    history_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.money_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(history_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .history_data[history_data_start..history_data_start
                + history_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            history_data_start += history_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if history_data_start >= self.history_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupActiveProposalsRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupActiveProposalsRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupActiveProposalsRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::GroupActiveProposalsRequestPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 359, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupActiveProposalItemReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupActiveProposalItemReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::GroupActiveProposalItemReplyPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
            proposal_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length = length.saturating_add(1);
        for block in &self.proposal_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 360, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        let proposal_data_count = usize::from(reader.read_u8()?);
        let mut proposal_data = Vec::new();
        proposal_data
            .try_reserve_exact(proposal_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..proposal_data_count {
            let mut block = <crate::packets::GroupActiveProposalItemReplyPacketProposalDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            proposal_data.push(block);
        }
        self.proposal_data = proposal_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.proposal_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.proposal_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        let mut proposal_data_values = Vec::with_capacity(self.proposal_data.len());
        for block in &self.proposal_data {
            proposal_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ProposalData".to_owned(),
            libremetaverse_structured_data::OSD::Array(proposal_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ProposalData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupActiveProposalItemReplyPacketProposalDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.proposal_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut proposal_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.transaction_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut proposal_data_count = 0_usize;
            while proposal_data_start + proposal_data_count < self.proposal_data.len()
                && proposal_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .proposal_data[proposal_data_start + proposal_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || proposal_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    proposal_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.transaction_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(proposal_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .proposal_data[proposal_data_start..proposal_data_start
                + proposal_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            proposal_data_start += proposal_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if proposal_data_start >= self.proposal_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupVoteHistoryRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupVoteHistoryRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupVoteHistoryRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::GroupVoteHistoryRequestPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 361, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupVoteHistoryItemReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupVoteHistoryItemReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            transaction_data: <crate::packets::GroupVoteHistoryItemReplyPacketTransactionDataBlock as GeneratedBlock>::new_generated(),
            history_item_data: <crate::packets::GroupVoteHistoryItemReplyPacketHistoryItemDataBlock as GeneratedBlock>::new_generated(),
            vote_item: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transaction_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.history_item_data));
        length = length.saturating_add(1);
        for block in &self.vote_item {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 362, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.transaction_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.history_item_data, reader)?;
        let vote_item_count = usize::from(reader.read_u8()?);
        let mut vote_item = Vec::new();
        vote_item
            .try_reserve_exact(vote_item_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..vote_item_count {
            let mut block = <crate::packets::GroupVoteHistoryItemReplyPacketVoteItemBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            vote_item.push(block);
        }
        self.vote_item = vote_item;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.transaction_data, writer)?;
        GeneratedBlock::encode_payload(&self.history_item_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.vote_item.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.vote_item {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut transaction_data_values = Vec::with_capacity(1);
        transaction_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transaction_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransactionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transaction_data_values),
        )?;
        let mut history_item_data_values = Vec::with_capacity(1);
        history_item_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.history_item_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HistoryItemData".to_owned(),
            libremetaverse_structured_data::OSD::Array(history_item_data_values),
        )?;
        let mut vote_item_values = Vec::with_capacity(self.vote_item.len());
        for block in &self.vote_item {
            vote_item_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "VoteItem".to_owned(),
            libremetaverse_structured_data::OSD::Array(vote_item_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransactionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transaction_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HistoryItemData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.history_item_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("VoteItem")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupVoteHistoryItemReplyPacketVoteItemBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.vote_item = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut vote_item_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.transaction_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(
                            GeneratedBlock::generated_length(&self.history_item_data),
                        )
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut vote_item_count = 0_usize;
            while vote_item_start + vote_item_count < self.vote_item.len()
                && vote_item_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.vote_item[vote_item_start + vote_item_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || vote_item_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    vote_item_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.transaction_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.history_item_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(vote_item_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .vote_item[vote_item_start..vote_item_start + vote_item_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            vote_item_start += vote_item_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if vote_item_start >= self.vote_item.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::StartGroupProposalPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::StartGroupProposalPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            proposal_data: <crate::packets::StartGroupProposalPacketProposalDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.proposal_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 363, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.proposal_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.proposal_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut proposal_data_values = Vec::with_capacity(1);
        proposal_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.proposal_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ProposalData".to_owned(),
            libremetaverse_structured_data::OSD::Array(proposal_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ProposalData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.proposal_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupProposalBallotPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupProposalBallotPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            proposal_data: <crate::packets::GroupProposalBallotPacketProposalDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.proposal_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 364, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.proposal_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.proposal_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut proposal_data_values = Vec::with_capacity(1);
        proposal_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.proposal_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ProposalData".to_owned(),
            libremetaverse_structured_data::OSD::Array(proposal_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ProposalData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.proposal_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::TallyVotesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 365, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupMembersRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupMembersRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupMembersRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 366, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupMembersReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupMembersReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupMembersReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            member_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length.saturating_add(1);
        for block in &self.member_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 367, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        let member_data_count = usize::from(reader.read_u8()?);
        let mut member_data = Vec::new();
        member_data
            .try_reserve_exact(member_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..member_data_count {
            let mut block = <crate::packets::GroupMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            member_data.push(block);
        }
        self.member_data = member_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.member_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.member_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut member_data_values = Vec::with_capacity(self.member_data.len());
        for block in &self.member_data {
            member_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "MemberData".to_owned(),
            libremetaverse_structured_data::OSD::Array(member_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MemberData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.member_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut member_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.group_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut member_data_count = 0_usize;
            while member_data_start + member_data_count < self.member_data.len()
                && member_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.member_data[member_data_start + member_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || member_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    member_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.group_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(member_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .member_data[member_data_start..member_data_start + member_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            member_data_start += member_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if member_data_start >= self.member_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ActivateGroupPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ActivateGroupPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 368, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetGroupContributionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SetGroupContributionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::SetGroupContributionPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 369, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SetGroupAcceptNoticesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SetGroupAcceptNoticesPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::SetGroupAcceptNoticesPacketDataBlock as GeneratedBlock>::new_generated(),
            new_data: <crate::packets::SetGroupAcceptNoticesPacketNewDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.new_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 370, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        GeneratedBlock::decode_payload(&mut self.new_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        GeneratedBlock::encode_payload(&self.new_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut new_data_values = Vec::with_capacity(1);
        new_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.new_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NewData".to_owned(),
            libremetaverse_structured_data::OSD::Array(new_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NewData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.new_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupRoleDataRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleDataRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupRoleDataRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 371, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupRoleDataReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleDataReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupRoleDataReplyPacketGroupDataBlock as GeneratedBlock>::new_generated(),
            role_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length = length.saturating_add(1);
        for block in &self.role_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 372, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        let role_data_count = usize::from(reader.read_u8()?);
        let mut role_data = Vec::new();
        role_data
            .try_reserve_exact(role_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..role_data_count {
            let mut block = <crate::packets::GroupRoleDataReplyPacketRoleDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            role_data.push(block);
        }
        self.role_data = role_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.role_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.role_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut role_data_values = Vec::with_capacity(self.role_data.len());
        for block in &self.role_data {
            role_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RoleData".to_owned(),
            libremetaverse_structured_data::OSD::Array(role_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RoleData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupRoleDataReplyPacketRoleDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.role_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut role_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.group_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut role_data_count = 0_usize;
            while role_data_start + role_data_count < self.role_data.len()
                && role_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.role_data[role_data_start + role_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || role_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    role_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.group_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(role_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .role_data[role_data_start..role_data_start + role_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            role_data_start += role_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if role_data_start >= self.role_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupRoleMembersRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleMembersRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::GroupRoleMembersRequestPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 373, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupRoleMembersReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleMembersReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            member_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.member_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 374, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let member_data_count = usize::from(reader.read_u8()?);
        let mut member_data = Vec::new();
        member_data
            .try_reserve_exact(member_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..member_data_count {
            let mut block = <crate::packets::GroupRoleMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            member_data.push(block);
        }
        self.member_data = member_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.member_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.member_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut member_data_values = Vec::with_capacity(self.member_data.len());
        for block in &self.member_data {
            member_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "MemberData".to_owned(),
            libremetaverse_structured_data::OSD::Array(member_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MemberData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupRoleMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.member_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut member_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut member_data_count = 0_usize;
            while member_data_start + member_data_count < self.member_data.len()
                && member_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.member_data[member_data_start + member_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || member_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    member_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(member_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .member_data[member_data_start..member_data_start + member_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            member_data_start += member_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if member_data_start >= self.member_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupTitlesRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupTitlesRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 375, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupTitlesReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupTitlesReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.group_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 376, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let group_data_count = usize::from(reader.read_u8()?);
        let mut group_data = Vec::new();
        group_data
            .try_reserve_exact(group_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..group_data_count {
            let mut block = <crate::packets::GroupTitlesReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            group_data.push(block);
        }
        self.group_data = group_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.group_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.group_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(self.group_data.len());
        for block in &self.group_data {
            group_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupTitlesReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.group_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut group_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut group_data_count = 0_usize;
            while group_data_start + group_data_count < self.group_data.len()
                && group_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.group_data[group_data_start + group_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || group_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    group_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(group_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .group_data[group_data_start..group_data_start + group_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            group_data_start += group_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if group_data_start >= self.group_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GroupTitleUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupTitleUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 377, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupRoleUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GroupRoleUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            role_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.role_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 378, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let role_data_count = usize::from(reader.read_u8()?);
        let mut role_data = Vec::new();
        role_data
            .try_reserve_exact(role_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..role_data_count {
            let mut block = <crate::packets::GroupRoleUpdatePacketRoleDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            role_data.push(block);
        }
        self.role_data = role_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.role_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.role_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut role_data_values = Vec::with_capacity(self.role_data.len());
        for block in &self.role_data {
            role_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RoleData".to_owned(),
            libremetaverse_structured_data::OSD::Array(role_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RoleData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupRoleUpdatePacketRoleDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.role_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut role_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut role_data_count = 0_usize;
            while role_data_start + role_data_count < self.role_data.len()
                && role_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.role_data[role_data_start + role_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || role_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    role_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(role_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .role_data[role_data_start..role_data_start + role_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            role_data_start += role_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if role_data_start >= self.role_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::LiveHelpGroupRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            request_data: <crate::packets::LiveHelpGroupRequestPacketRequestDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 379, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.request_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.request_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut request_data_values = Vec::with_capacity(1);
        request_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestData".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LiveHelpGroupReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            reply_data: <crate::packets::LiveHelpGroupReplyPacketReplyDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.reply_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 380, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.reply_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.reply_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut reply_data_values = Vec::with_capacity(1);
        reply_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.reply_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ReplyData".to_owned(),
            libremetaverse_structured_data::OSD::Array(reply_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReplyData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.reply_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentWearablesRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentWearablesRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 381, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentWearablesUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentWearablesUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 382, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AgentWearablesUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentWearablesUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut wearable_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut wearable_data_count = 0_usize;
            while wearable_data_start + wearable_data_count < self.wearable_data.len()
                && wearable_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .wearable_data[wearable_data_start + wearable_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || wearable_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    wearable_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(wearable_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .wearable_data[wearable_data_start..wearable_data_start
                + wearable_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            wearable_data_start += wearable_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if wearable_data_start >= self.wearable_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentIsNowWearingPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentIsNowWearingPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 383, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AgentIsNowWearingPacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentIsNowWearingPacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut wearable_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut wearable_data_count = 0_usize;
            while wearable_data_start + wearable_data_count < self.wearable_data.len()
                && wearable_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .wearable_data[wearable_data_start + wearable_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || wearable_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    wearable_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(wearable_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .wearable_data[wearable_data_start..wearable_data_start
                + wearable_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            wearable_data_start += wearable_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if wearable_data_start >= self.wearable_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentCachedTexturePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentCachedTexturePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 384, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AgentCachedTexturePacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentCachedTexturePacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut wearable_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut wearable_data_count = 0_usize;
            while wearable_data_start + wearable_data_count < self.wearable_data.len()
                && wearable_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .wearable_data[wearable_data_start + wearable_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || wearable_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    wearable_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(wearable_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .wearable_data[wearable_data_start..wearable_data_start
                + wearable_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            wearable_data_start += wearable_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if wearable_data_start >= self.wearable_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentCachedTextureResponsePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentCachedTextureResponsePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            wearable_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.wearable_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 385, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let wearable_data_count = usize::from(reader.read_u8()?);
        let mut wearable_data = Vec::new();
        wearable_data
            .try_reserve_exact(wearable_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..wearable_data_count {
            let mut block = <crate::packets::AgentCachedTextureResponsePacketWearableDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            wearable_data.push(block);
        }
        self.wearable_data = wearable_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.wearable_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.wearable_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut wearable_data_values = Vec::with_capacity(self.wearable_data.len());
        for block in &self.wearable_data {
            wearable_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "WearableData".to_owned(),
            libremetaverse_structured_data::OSD::Array(wearable_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("WearableData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentCachedTextureResponsePacketWearableDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.wearable_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut wearable_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut wearable_data_count = 0_usize;
            while wearable_data_start + wearable_data_count < self.wearable_data.len()
                && wearable_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .wearable_data[wearable_data_start + wearable_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || wearable_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    wearable_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(wearable_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .wearable_data[wearable_data_start..wearable_data_start
                + wearable_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            wearable_data_start += wearable_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if wearable_data_start >= self.wearable_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentDataUpdateRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentDataUpdateRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 386, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentDataUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentDataUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 387, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GroupDataUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_group_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.agent_group_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 388, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let agent_group_data_count = usize::from(reader.read_u8()?);
        let mut agent_group_data = Vec::new();
        agent_group_data
            .try_reserve_exact(agent_group_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_group_data_count {
            let mut block = <crate::packets::GroupDataUpdatePacketAgentGroupDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_group_data.push(block);
        }
        self.agent_group_data = agent_group_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.agent_group_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_group_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_group_data_values = Vec::with_capacity(
            self.agent_group_data.len(),
        );
        for block in &self.agent_group_data {
            agent_group_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentGroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentGroupData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GroupDataUpdatePacketAgentGroupDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_group_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut agent_group_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut agent_group_data_count = 0_usize;
            while agent_group_data_start + agent_group_data_count
                < self.agent_group_data.len()
                && agent_group_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .agent_group_data[agent_group_data_start
                                + agent_group_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || agent_group_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_group_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(agent_group_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_group_data[agent_group_data_start..agent_group_data_start
                + agent_group_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_group_data_start += agent_group_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if agent_group_data_start >= self.agent_group_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentGroupDataUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentGroupDataUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.group_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 389, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let group_data_count = usize::from(reader.read_u8()?);
        let mut group_data = Vec::new();
        group_data
            .try_reserve_exact(group_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..group_data_count {
            let mut block = <crate::packets::AgentGroupDataUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            group_data.push(block);
        }
        self.group_data = group_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.group_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.group_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(self.group_data.len());
        for block in &self.group_data {
            group_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentGroupDataUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.group_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut group_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut group_data_count = 0_usize;
            while group_data_start + group_data_count < self.group_data.len()
                && group_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.group_data[group_data_start + group_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || group_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    group_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(group_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .group_data[group_data_start..group_data_start + group_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            group_data_start += group_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if group_data_start >= self.group_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentDropGroupPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentDropGroupPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 390, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LogTextMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.data_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 391, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_block_count = usize::from(reader.read_u8()?);
        let mut data_block = Vec::new();
        data_block
            .try_reserve_exact(data_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_block_count {
            let mut block = <crate::packets::LogTextMessagePacketDataBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data_block.push(block);
        }
        self.data_block = data_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(self.data_block.len());
        for block in &self.data_block {
            data_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::LogTextMessagePacketDataBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_block_count = 0_usize;
            while data_block_start + data_block_count < self.data_block.len()
                && data_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data_block[data_block_start + data_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .data_block[data_block_start..data_block_start + data_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_block_start += data_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_block_start >= self.data_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::CreateTrustedCircuitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::CreateTrustedCircuitPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 392, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::DenyTrustedCircuitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::DenyTrustedCircuitPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 393, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestTrustedCircuitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {}
    }
    fn generated_length(&self) -> i32 {
        10_i32
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 394, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let _ = reader;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        let _ = writer;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        let _ = body;
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RezSingleAttachmentFromInvPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezSingleAttachmentFromInvPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::RezSingleAttachmentFromInvPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 395, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RezMultipleAttachmentsFromInvPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezMultipleAttachmentsFromInvPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            header_data: <crate::packets::RezMultipleAttachmentsFromInvPacketHeaderDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.header_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 396, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.header_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::RezMultipleAttachmentsFromInvPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.header_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut header_data_values = Vec::with_capacity(1);
        header_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.header_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HeaderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(header_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HeaderData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.header_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RezMultipleAttachmentsFromInvPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.header_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.header_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::DetachAttachmentIntoInvPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::DetachAttachmentIntoInvPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 397, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateNewOutfitAttachmentsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateNewOutfitAttachmentsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            header_data: <crate::packets::CreateNewOutfitAttachmentsPacketHeaderDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.header_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 398, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.header_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::CreateNewOutfitAttachmentsPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.header_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut header_data_values = Vec::with_capacity(1);
        header_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.header_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "HeaderData".to_owned(),
            libremetaverse_structured_data::OSD::Array(header_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("HeaderData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.header_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CreateNewOutfitAttachmentsPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.header_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.header_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::UserInfoRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UserInfoRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 399, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UserInfoReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UserInfoReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            user_data: <crate::packets::UserInfoReplyPacketUserDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 400, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.user_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.user_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut user_data_values = Vec::with_capacity(1);
        user_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserData".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::UpdateUserInfoPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::UpdateUserInfoPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            user_data: <crate::packets::UpdateUserInfoPacketUserDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.user_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 401, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.user_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.user_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut user_data_values = Vec::with_capacity(1);
        user_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.user_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "UserData".to_owned(),
            libremetaverse_structured_data::OSD::Array(user_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("UserData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.user_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelRenamePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { parcel_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length.saturating_add(1);
        for block in &self.parcel_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 402, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let parcel_data_count = usize::from(reader.read_u8()?);
        let mut parcel_data = Vec::new();
        parcel_data
            .try_reserve_exact(parcel_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..parcel_data_count {
            let mut block = <crate::packets::ParcelRenamePacketParcelDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            parcel_data.push(block);
        }
        self.parcel_data = parcel_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.parcel_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.parcel_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(self.parcel_data.len());
        for block in &self.parcel_data {
            parcel_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ParcelRenamePacketParcelDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.parcel_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut parcel_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut parcel_data_count = 0_usize;
            while parcel_data_start + parcel_data_count < self.parcel_data.len()
                && parcel_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.parcel_data[parcel_data_start + parcel_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || parcel_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    parcel_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(parcel_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .parcel_data[parcel_data_start..parcel_data_start + parcel_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            parcel_data_start += parcel_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if parcel_data_start >= self.parcel_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::InitiateDownloadPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::InitiateDownloadPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            file_data: <crate::packets::InitiateDownloadPacketFileDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.file_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 403, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.file_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.file_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut file_data_values = Vec::with_capacity(1);
        file_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.file_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "FileData".to_owned(),
            libremetaverse_structured_data::OSD::Array(file_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("FileData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.file_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SystemMessagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            method_data: <crate::packets::SystemMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            param_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length.saturating_add(1);
        for block in &self.param_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 404, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        let param_list_count = usize::from(reader.read_u8()?);
        let mut param_list = Vec::new();
        param_list
            .try_reserve_exact(param_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..param_list_count {
            let mut block = <crate::packets::SystemMessagePacketParamListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            param_list.push(block);
        }
        self.param_list = param_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.param_list.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.param_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut param_list_values = Vec::with_capacity(self.param_list.len());
        for block in &self.param_list {
            param_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ParamList".to_owned(),
            libremetaverse_structured_data::OSD::Array(param_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParamList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::SystemMessagePacketParamListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.param_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut param_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.method_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut param_list_count = 0_usize;
            while param_list_start + param_list_count < self.param_list.len()
                && param_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.param_list[param_list_start + param_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || param_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    param_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.method_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(param_list_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .param_list[param_list_start..param_list_start + param_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            param_list_start += param_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if param_list_start >= self.param_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MapLayerRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapLayerRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 405, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MapLayerReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapLayerReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            layer_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.layer_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 406, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let layer_data_count = usize::from(reader.read_u8()?);
        let mut layer_data = Vec::new();
        layer_data
            .try_reserve_exact(layer_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..layer_data_count {
            let mut block = <crate::packets::MapLayerReplyPacketLayerDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            layer_data.push(block);
        }
        self.layer_data = layer_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.layer_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.layer_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut layer_data_values = Vec::with_capacity(self.layer_data.len());
        for block in &self.layer_data {
            layer_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "LayerData".to_owned(),
            libremetaverse_structured_data::OSD::Array(layer_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("LayerData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MapLayerReplyPacketLayerDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.layer_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut layer_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut layer_data_count = 0_usize;
            while layer_data_start + layer_data_count < self.layer_data.len()
                && layer_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.layer_data[layer_data_start + layer_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || layer_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    layer_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(layer_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .layer_data[layer_data_start..layer_data_start + layer_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            layer_data_start += layer_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if layer_data_start >= self.layer_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MapBlockRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapBlockRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            position_data: <crate::packets::MapBlockRequestPacketPositionDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.position_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 407, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.position_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.position_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut position_data_values = Vec::with_capacity(1);
        position_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.position_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PositionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(position_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PositionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.position_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MapNameRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapNameRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            name_data: <crate::packets::MapNameRequestPacketNameDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.name_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 408, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.name_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.name_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut name_data_values = Vec::with_capacity(1);
        name_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.name_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "NameData".to_owned(),
            libremetaverse_structured_data::OSD::Array(name_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NameData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.name_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MapBlockReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapBlockReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
            size: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.size {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 409, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::MapBlockReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        let size_count = usize::from(reader.read_u8()?);
        let mut size = Vec::new();
        size.try_reserve_exact(size_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..size_count {
            let mut block = <crate::packets::MapBlockReplyPacketSizeBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            size.push(block);
        }
        self.size = size;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.size.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.size {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        let mut size_values = Vec::with_capacity(self.size.len());
        for block in &self.size {
            size_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Size".to_owned(),
            libremetaverse_structured_data::OSD::Array(size_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MapBlockReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Size")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MapBlockReplyPacketSizeBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.size = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        let mut size_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let mut size_count = 0_usize;
            while size_start + size_count < self.size.len()
                && size_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.size[size_start + size_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || size_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    size_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            writer
                .write_u8(
                    u8::try_from(size_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.size[size_start..size_start + size_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            size_start += size_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() && size_start >= self.size.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::MapItemRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapItemRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            request_data: <crate::packets::MapItemRequestPacketRequestDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 410, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.request_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.request_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut request_data_values = Vec::with_capacity(1);
        request_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestData".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MapItemReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MapItemReplyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            request_data: <crate::packets::MapItemReplyPacketRequestDataBlock as GeneratedBlock>::new_generated(),
            data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_data));
        length = length.saturating_add(1);
        for block in &self.data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 411, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.request_data, reader)?;
        let data_count = usize::from(reader.read_u8()?);
        let mut data = Vec::new();
        data.try_reserve_exact(data_count).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_count {
            let mut block = <crate::packets::MapItemReplyPacketDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data.push(block);
        }
        self.data = data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.request_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut request_data_values = Vec::with_capacity(1);
        request_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestData".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_data_values),
        )?;
        let mut data_values = Vec::with_capacity(self.data.len());
        for block in &self.data {
            data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MapItemReplyPacketDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.request_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_count = 0_usize;
            while data_start + data_count < self.data.len()
                && data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data[data_start + data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            GeneratedBlock::encode_payload(&self.request_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.data[data_start..data_start + data_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_start += data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_start >= self.data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::SendPostcardPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::SendPostcardPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 412, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RpcChannelRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::RpcChannelRequestPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 413, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RpcChannelReplyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::RpcChannelReplyPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 414, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RpcScriptRequestInboundPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            target_block: <crate::packets::RpcScriptRequestInboundPacketTargetBlockBlock as GeneratedBlock>::new_generated(),
            data_block: <crate::packets::RpcScriptRequestInboundPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.target_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 415, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.target_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.target_block, writer)?;
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut target_block_values = Vec::with_capacity(1);
        target_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.target_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TargetBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_block_values),
        )?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.target_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RpcScriptRequestInboundForwardPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::RpcScriptRequestInboundForwardPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 416, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RpcScriptReplyInboundPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::RpcScriptReplyInboundPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 417, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ScriptMailRegistrationPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::ScriptMailRegistrationPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 418, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelMediaCommandMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            command_block: <crate::packets::ParcelMediaCommandMessagePacketCommandBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.command_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 419, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.command_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.command_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut command_block_values = Vec::with_capacity(1);
        command_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.command_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "CommandBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(command_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CommandBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.command_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelMediaUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::ParcelMediaUpdatePacketDataBlockBlock as GeneratedBlock>::new_generated(),
            data_block_extended: <crate::packets::ParcelMediaUpdatePacketDataBlockExtendedBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block_extended));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 420, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_block_extended, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        GeneratedBlock::encode_payload(&self.data_block_extended, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        let mut data_block_extended_values = Vec::with_capacity(1);
        data_block_extended_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block_extended)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlockExtended".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_extended_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlockExtended")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block_extended, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LandStatRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LandStatRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            request_data: <crate::packets::LandStatRequestPacketRequestDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 421, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.request_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.request_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut request_data_values = Vec::with_capacity(1);
        request_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestData".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LandStatReplyPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            request_data: <crate::packets::LandStatReplyPacketRequestDataBlock as GeneratedBlock>::new_generated(),
            report_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.request_data));
        length = length.saturating_add(1);
        for block in &self.report_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 422, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.request_data, reader)?;
        let report_data_count = usize::from(reader.read_u8()?);
        let mut report_data = Vec::new();
        report_data
            .try_reserve_exact(report_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..report_data_count {
            let mut block = <crate::packets::LandStatReplyPacketReportDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            report_data.push(block);
        }
        self.report_data = report_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.request_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.report_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.report_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut request_data_values = Vec::with_capacity(1);
        request_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.request_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RequestData".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_data_values),
        )?;
        let mut report_data_values = Vec::with_capacity(self.report_data.len());
        for block in &self.report_data {
            report_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ReportData".to_owned(),
            libremetaverse_structured_data::OSD::Array(report_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.request_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ReportData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::LandStatReplyPacketReportDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.report_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut report_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.request_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut report_data_count = 0_usize;
            while report_data_start + report_data_count < self.report_data.len()
                && report_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.report_data[report_data_start + report_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || report_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    report_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.request_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(report_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .report_data[report_data_start..report_data_start + report_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            report_data_start += report_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if report_data_start >= self.report_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ErrorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ErrorPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            data: <crate::packets::ErrorPacketDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 423, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut data_values = Vec::with_capacity(1);
        data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Data".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Data")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectIncludeInSearchPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectIncludeInSearchPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 424, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectIncludeInSearchPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectIncludeInSearchPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RezRestoreToWorldPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RezRestoreToWorldPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_data: <crate::packets::RezRestoreToWorldPacketInventoryDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 425, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_data_values = Vec::with_capacity(1);
        inventory_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryData".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LinkInventoryItemPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::LinkInventoryItemPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            inventory_block: <crate::packets::LinkInventoryItemPacketInventoryBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.inventory_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 426, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.inventory_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.inventory_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut inventory_block_values = Vec::with_capacity(1);
        inventory_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.inventory_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "InventoryBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(inventory_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("InventoryBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.inventory_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RetrieveIMsExtendedPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RetrieveIMsExtendedPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 427, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::JoinGroupRequestExtendedPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::JoinGroupRequestExtendedPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::JoinGroupRequestExtendedPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 428, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CreateGroupRequestExtendedPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CreateGroupRequestExtendedPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: <crate::packets::CreateGroupRequestExtendedPacketGroupDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 10_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.group_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Low, 429, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.group_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.group_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(1);
        group_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.group_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.group_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectAddPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectAddPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::ObjectAddPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 1, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::MultipleObjectUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::MultipleObjectUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 2, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::MultipleObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::MultipleObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RequestMultipleObjectsPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestMultipleObjectsPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 3, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::RequestMultipleObjectsPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RequestMultipleObjectsPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectPositionPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ObjectPositionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 4, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectPositionPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectPositionPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::RequestObjectPropertiesFamilyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestObjectPropertiesFamilyPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            object_data: <crate::packets::RequestObjectPropertiesFamilyPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 5, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CoarseLocationUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            location: Vec::new(),
            index: <crate::packets::CoarseLocationUpdatePacketIndexBlock as GeneratedBlock>::new_generated(),
            agent_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length.saturating_add(1);
        for block in &self.location {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(GeneratedBlock::generated_length(&self.index));
        length = length.saturating_add(1);
        for block in &self.agent_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 6, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let location_count = usize::from(reader.read_u8()?);
        let mut location = Vec::new();
        location
            .try_reserve_exact(location_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..location_count {
            let mut block = <crate::packets::CoarseLocationUpdatePacketLocationBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            location.push(block);
        }
        self.location = location;
        GeneratedBlock::decode_payload(&mut self.index, reader)?;
        let agent_data_count = usize::from(reader.read_u8()?);
        let mut agent_data = Vec::new();
        agent_data
            .try_reserve_exact(agent_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_data_count {
            let mut block = <crate::packets::CoarseLocationUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_data.push(block);
        }
        self.agent_data = agent_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.location.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.location {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        GeneratedBlock::encode_payload(&self.index, writer)?;
        writer
            .write_u8(
                u8::try_from(self.agent_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut location_values = Vec::with_capacity(self.location.len());
        for block in &self.location {
            location_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Location".to_owned(),
            libremetaverse_structured_data::OSD::Array(location_values),
        )?;
        let mut index_values = Vec::with_capacity(1);
        index_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.index)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Index".to_owned(),
            libremetaverse_structured_data::OSD::Array(index_values),
        )?;
        let mut agent_data_values = Vec::with_capacity(self.agent_data.len());
        for block in &self.agent_data {
            agent_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Location")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CoarseLocationUpdatePacketLocationBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.location = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Index")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.index, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::CoarseLocationUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_data = blocks;
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CrossedRegionPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::CrossedRegionPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            region_data: <crate::packets::CrossedRegionPacketRegionDataBlock as GeneratedBlock>::new_generated(),
            info: <crate::packets::CrossedRegionPacketInfoBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(GeneratedBlock::generated_length(&self.info));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 7, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.info, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        GeneratedBlock::encode_payload(&self.info, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut info_values = Vec::with_capacity(1);
        info_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.info)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Info".to_owned(),
            libremetaverse_structured_data::OSD::Array(info_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Info")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.info, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ConfirmEnableSimulatorPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ConfirmEnableSimulatorPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 8, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectPropertiesPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { object_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 9, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectPropertiesPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectPropertiesPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectPropertiesFamilyPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            object_data: <crate::packets::ObjectPropertiesFamilyPacketObjectDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.object_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 10, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.object_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.object_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(1);
        object_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.object_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.object_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelPropertiesRequestPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ParcelPropertiesRequestPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            parcel_data: <crate::packets::ParcelPropertiesRequestPacketParcelDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 11, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SimStatusPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            sim_status: <crate::packets::SimStatusPacketSimStatusBlock as GeneratedBlock>::new_generated(),
            sim_flags: <crate::packets::SimStatusPacketSimFlagsBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.sim_status));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.sim_flags));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 12, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sim_status, reader)?;
        GeneratedBlock::decode_payload(&mut self.sim_flags, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sim_status, writer)?;
        GeneratedBlock::encode_payload(&self.sim_flags, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sim_status_values = Vec::with_capacity(1);
        sim_status_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sim_status)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimStatus".to_owned(),
            libremetaverse_structured_data::OSD::Array(sim_status_values),
        )?;
        let mut sim_flags_values = Vec::with_capacity(1);
        sim_flags_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sim_flags)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SimFlags".to_owned(),
            libremetaverse_structured_data::OSD::Array(sim_flags_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimStatus")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sim_status, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SimFlags")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sim_flags, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AttachedSoundPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::AttachedSoundPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 13, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AttachedSoundGainChangePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::AttachedSoundGainChangePacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 14, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::PreloadSoundPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { data_block: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length.saturating_add(1);
        for block in &self.data_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 15, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let data_block_count = usize::from(reader.read_u8()?);
        let mut data_block = Vec::new();
        data_block
            .try_reserve_exact(data_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..data_block_count {
            let mut block = <crate::packets::PreloadSoundPacketDataBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            data_block.push(block);
        }
        self.data_block = data_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.data_block.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.data_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(self.data_block.len());
        for block in &self.data_block {
            data_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::PreloadSoundPacketDataBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.data_block = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut data_block_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut data_block_count = 0_usize;
            while data_block_start + data_block_count < self.data_block.len()
                && data_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.data_block[data_block_start + data_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || data_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    data_block_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(data_block_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .data_block[data_block_start..data_block_start + data_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            data_block_start += data_block_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if data_block_start >= self.data_block.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::InternalScriptMailPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            data_block: <crate::packets::InternalScriptMailPacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 16, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ViewerEffectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ViewerEffectPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            effect: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 8_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.effect {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::Medium, 17, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let effect_count = usize::from(reader.read_u8()?);
        let mut effect = Vec::new();
        effect
            .try_reserve_exact(effect_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..effect_count {
            let mut block = <crate::packets::ViewerEffectPacketEffectBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            effect.push(block);
        }
        self.effect = effect;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.effect.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.effect {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut effect_values = Vec::with_capacity(self.effect.len());
        for block in &self.effect {
            effect_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "Effect".to_owned(),
            libremetaverse_structured_data::OSD::Array(effect_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Effect")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ViewerEffectPacketEffectBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.effect = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut effect_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut effect_count = 0_usize;
            while effect_start + effect_count < self.effect.len()
                && effect_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.effect[effect_start + effect_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || effect_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    effect_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(effect_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self.effect[effect_start..effect_start + effect_count] {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            effect_start += effect_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if effect_start >= self.effect.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::StartPingCheckPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            ping_id: <crate::packets::StartPingCheckPacketPingIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.ping_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 1, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.ping_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.ping_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut ping_id_values = Vec::with_capacity(1);
        ping_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.ping_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PingID".to_owned(),
            libremetaverse_structured_data::OSD::Array(ping_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PingID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.ping_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CompletePingCheckPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            ping_id: <crate::packets::CompletePingCheckPacketPingIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.ping_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 2, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.ping_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.ping_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut ping_id_values = Vec::with_capacity(1);
        ping_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.ping_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "PingID".to_owned(),
            libremetaverse_structured_data::OSD::Array(ping_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PingID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.ping_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::NeighborListPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            neighbor_block: (0..4)
                .map(|_| <crate::packets::NeighborListPacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                .collect(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        for block in &self.neighbor_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 3, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let mut neighbor_block = Vec::new();
        neighbor_block.try_reserve_exact(4).map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..4 {
            let mut block = <crate::packets::NeighborListPacketNeighborBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            neighbor_block.push(block);
        }
        self.neighbor_block = neighbor_block;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        if self.neighbor_block.len() != 4 {
            return Err(crate::Error::Argument);
        }
        for block in &self.neighbor_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut neighbor_block_values = Vec::with_capacity(self.neighbor_block.len());
        for block in &self.neighbor_block {
            neighbor_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NeighborBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(neighbor_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NeighborBlock")
        {
            if self.neighbor_block.len() != 4 {
                self.neighbor_block = (0..4)
                    .map(|_| <crate::packets::NeighborListPacketNeighborBlockBlock as GeneratedBlock>::new_generated())
                    .collect();
            }
            for (block, value) in self
                .neighbor_block
                .iter_mut()
                .zip(values.iter().take(4))
            {
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(block, &map)?;
                }
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 4, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentAnimationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentAnimationPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            animation_list: Vec::new(),
            physical_avatar_event_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.animation_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.physical_avatar_event_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 5, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let animation_list_count = usize::from(reader.read_u8()?);
        let mut animation_list = Vec::new();
        animation_list
            .try_reserve_exact(animation_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..animation_list_count {
            let mut block = <crate::packets::AgentAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            animation_list.push(block);
        }
        self.animation_list = animation_list;
        let physical_avatar_event_list_count = usize::from(reader.read_u8()?);
        let mut physical_avatar_event_list = Vec::new();
        physical_avatar_event_list
            .try_reserve_exact(physical_avatar_event_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..physical_avatar_event_list_count {
            let mut block = <crate::packets::AgentAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            physical_avatar_event_list.push(block);
        }
        self.physical_avatar_event_list = physical_avatar_event_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.animation_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.animation_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.physical_avatar_event_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.physical_avatar_event_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut animation_list_values = Vec::with_capacity(self.animation_list.len());
        for block in &self.animation_list {
            animation_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AnimationList".to_owned(),
            libremetaverse_structured_data::OSD::Array(animation_list_values),
        )?;
        let mut physical_avatar_event_list_values = Vec::with_capacity(
            self.physical_avatar_event_list.len(),
        );
        for block in &self.physical_avatar_event_list {
            physical_avatar_event_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "PhysicalAvatarEventList".to_owned(),
            libremetaverse_structured_data::OSD::Array(physical_avatar_event_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AnimationList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.animation_list = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PhysicalAvatarEventList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AgentAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.physical_avatar_event_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut animation_list_start = 0_usize;
        let mut physical_avatar_event_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut animation_list_count = 0_usize;
            while animation_list_start + animation_list_count < self.animation_list.len()
                && animation_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .animation_list[animation_list_start + animation_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || animation_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    animation_list_count += 1;
                } else {
                    break;
                }
            }
            let mut physical_avatar_event_list_count = 0_usize;
            while physical_avatar_event_list_start + physical_avatar_event_list_count
                < self.physical_avatar_event_list.len()
                && physical_avatar_event_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .physical_avatar_event_list[physical_avatar_event_list_start
                                + physical_avatar_event_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || physical_avatar_event_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    physical_avatar_event_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(animation_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .animation_list[animation_list_start..animation_list_start
                + animation_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            animation_list_start += animation_list_count;
            writer
                .write_u8(
                    u8::try_from(physical_avatar_event_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .physical_avatar_event_list[physical_avatar_event_list_start..physical_avatar_event_list_start
                + physical_avatar_event_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            physical_avatar_event_list_start += physical_avatar_event_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if animation_list_start >= self.animation_list.len()
                && physical_avatar_event_list_start
                    >= self.physical_avatar_event_list.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AgentRequestSitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentRequestSitPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            target_object: <crate::packets::AgentRequestSitPacketTargetObjectBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.target_object));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 6, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.target_object, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        GeneratedBlock::encode_payload(&self.target_object, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut target_object_values = Vec::with_capacity(1);
        target_object_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.target_object)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TargetObject".to_owned(),
            libremetaverse_structured_data::OSD::Array(target_object_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TargetObject")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.target_object, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AgentSitPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::AgentSitPacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 7, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::RequestImagePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::RequestImagePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            request_image: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.request_image {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 8, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let request_image_count = usize::from(reader.read_u8()?);
        let mut request_image = Vec::new();
        request_image
            .try_reserve_exact(request_image_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..request_image_count {
            let mut block = <crate::packets::RequestImagePacketRequestImageBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            request_image.push(block);
        }
        self.request_image = request_image;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.request_image.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.request_image {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut request_image_values = Vec::with_capacity(self.request_image.len());
        for block in &self.request_image {
            request_image_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "RequestImage".to_owned(),
            libremetaverse_structured_data::OSD::Array(request_image_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RequestImage")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::RequestImagePacketRequestImageBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.request_image = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut request_image_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut request_image_count = 0_usize;
            while request_image_start + request_image_count < self.request_image.len()
                && request_image_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .request_image[request_image_start + request_image_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || request_image_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    request_image_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(request_image_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .request_image[request_image_start..request_image_start
                + request_image_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            request_image_start += request_image_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if request_image_start >= self.request_image.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ImageDataPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            image_id: <crate::packets::ImageDataPacketImageIDBlock as GeneratedBlock>::new_generated(),
            image_data: <crate::packets::ImageDataPacketImageDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.image_id));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.image_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 9, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.image_id, reader)?;
        GeneratedBlock::decode_payload(&mut self.image_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.image_id, writer)?;
        GeneratedBlock::encode_payload(&self.image_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut image_id_values = Vec::with_capacity(1);
        image_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.image_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::Array(image_id_values),
        )?;
        let mut image_data_values = Vec::with_capacity(1);
        image_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.image_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ImageData".to_owned(),
            libremetaverse_structured_data::OSD::Array(image_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ImageID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.image_id, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ImageData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.image_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ImagePacketPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            image_id: <crate::packets::ImagePacketPacketImageIDBlock as GeneratedBlock>::new_generated(),
            image_data: <crate::packets::ImagePacketPacketImageDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.image_id));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.image_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 10, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.image_id, reader)?;
        GeneratedBlock::decode_payload(&mut self.image_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.image_id, writer)?;
        GeneratedBlock::encode_payload(&self.image_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut image_id_values = Vec::with_capacity(1);
        image_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.image_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ImageID".to_owned(),
            libremetaverse_structured_data::OSD::Array(image_id_values),
        )?;
        let mut image_data_values = Vec::with_capacity(1);
        image_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.image_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ImageData".to_owned(),
            libremetaverse_structured_data::OSD::Array(image_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ImageID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.image_id, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ImageData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.image_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::LayerDataPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            layer_id: <crate::packets::LayerDataPacketLayerIDBlock as GeneratedBlock>::new_generated(),
            layer_data: <crate::packets::LayerDataPacketLayerDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.layer_id));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.layer_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 11, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.layer_id, reader)?;
        GeneratedBlock::decode_payload(&mut self.layer_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.layer_id, writer)?;
        GeneratedBlock::encode_payload(&self.layer_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut layer_id_values = Vec::with_capacity(1);
        layer_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.layer_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "LayerID".to_owned(),
            libremetaverse_structured_data::OSD::Array(layer_id_values),
        )?;
        let mut layer_data_values = Vec::with_capacity(1);
        layer_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.layer_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "LayerData".to_owned(),
            libremetaverse_structured_data::OSD::Array(layer_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("LayerID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.layer_id, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("LayerData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.layer_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::ObjectUpdatePacketRegionDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 12, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectUpdateCompressedPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::ObjectUpdateCompressedPacketRegionDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 13, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectUpdateCompressedPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectUpdateCompressedPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ObjectUpdateCachedPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::ObjectUpdateCachedPacketRegionDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 14, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ObjectUpdateCachedPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectUpdateCachedPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ImprovedTerseObjectUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            region_data: <crate::packets::ImprovedTerseObjectUpdatePacketRegionDataBlock as GeneratedBlock>::new_generated(),
            object_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.region_data));
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 15, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.region_data, reader)?;
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::ImprovedTerseObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.region_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut region_data_values = Vec::with_capacity(1);
        region_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionData".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_data_values),
        )?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ImprovedTerseObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.region_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.region_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::KillObjectPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self { object_data: Vec::new() }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(1);
        for block in &self.object_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 16, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        let object_data_count = usize::from(reader.read_u8()?);
        let mut object_data = Vec::new();
        object_data
            .try_reserve_exact(object_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..object_data_count {
            let mut block = <crate::packets::KillObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            object_data.push(block);
        }
        self.object_data = object_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        writer
            .write_u8(
                u8::try_from(self.object_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.object_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut object_data_values = Vec::with_capacity(self.object_data.len());
        for block in &self.object_data {
            object_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ObjectData".to_owned(),
            libremetaverse_structured_data::OSD::Array(object_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ObjectData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::KillObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.object_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut object_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut object_data_count = 0_usize;
            while object_data_start + object_data_count < self.object_data.len()
                && object_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.object_data[object_data_start + object_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || object_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    object_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(object_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .object_data[object_data_start..object_data_start + object_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            object_data_start += object_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if object_data_start >= self.object_data.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::TransferPacketPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            transfer_data: <crate::packets::TransferPacketPacketTransferDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.transfer_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 17, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.transfer_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.transfer_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut transfer_data_values = Vec::with_capacity(1);
        transfer_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.transfer_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TransferData".to_owned(),
            libremetaverse_structured_data::OSD::Array(transfer_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TransferData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.transfer_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SendXferPacketPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            xfer_id: <crate::packets::SendXferPacketPacketXferIDBlock as GeneratedBlock>::new_generated(),
            data_packet: <crate::packets::SendXferPacketPacketDataPacketBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.xfer_id));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_packet));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 18, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.xfer_id, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_packet, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.xfer_id, writer)?;
        GeneratedBlock::encode_payload(&self.data_packet, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut xfer_id_values = Vec::with_capacity(1);
        xfer_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.xfer_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "XferID".to_owned(),
            libremetaverse_structured_data::OSD::Array(xfer_id_values),
        )?;
        let mut data_packet_values = Vec::with_capacity(1);
        data_packet_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_packet)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataPacket".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_packet_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("XferID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.xfer_id, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataPacket")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_packet, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ConfirmXferPacketPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            xfer_id: <crate::packets::ConfirmXferPacketPacketXferIDBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.xfer_id));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 19, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.xfer_id, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.xfer_id, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut xfer_id_values = Vec::with_capacity(1);
        xfer_id_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.xfer_id)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "XferID".to_owned(),
            libremetaverse_structured_data::OSD::Array(xfer_id_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("XferID")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.xfer_id, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AvatarAnimationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            sender: <crate::packets::AvatarAnimationPacketSenderBlock as GeneratedBlock>::new_generated(),
            animation_list: Vec::new(),
            animation_source_list: Vec::new(),
            physical_avatar_event_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.sender));
        length = length.saturating_add(1);
        for block in &self.animation_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.animation_source_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.physical_avatar_event_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 20, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sender, reader)?;
        let animation_list_count = usize::from(reader.read_u8()?);
        let mut animation_list = Vec::new();
        animation_list
            .try_reserve_exact(animation_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..animation_list_count {
            let mut block = <crate::packets::AvatarAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            animation_list.push(block);
        }
        self.animation_list = animation_list;
        let animation_source_list_count = usize::from(reader.read_u8()?);
        let mut animation_source_list = Vec::new();
        animation_source_list
            .try_reserve_exact(animation_source_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..animation_source_list_count {
            let mut block = <crate::packets::AvatarAnimationPacketAnimationSourceListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            animation_source_list.push(block);
        }
        self.animation_source_list = animation_source_list;
        let physical_avatar_event_list_count = usize::from(reader.read_u8()?);
        let mut physical_avatar_event_list = Vec::new();
        physical_avatar_event_list
            .try_reserve_exact(physical_avatar_event_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..physical_avatar_event_list_count {
            let mut block = <crate::packets::AvatarAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            physical_avatar_event_list.push(block);
        }
        self.physical_avatar_event_list = physical_avatar_event_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sender, writer)?;
        writer
            .write_u8(
                u8::try_from(self.animation_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.animation_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.animation_source_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.animation_source_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.physical_avatar_event_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.physical_avatar_event_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sender_values = Vec::with_capacity(1);
        sender_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sender)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Sender".to_owned(),
            libremetaverse_structured_data::OSD::Array(sender_values),
        )?;
        let mut animation_list_values = Vec::with_capacity(self.animation_list.len());
        for block in &self.animation_list {
            animation_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AnimationList".to_owned(),
            libremetaverse_structured_data::OSD::Array(animation_list_values),
        )?;
        let mut animation_source_list_values = Vec::with_capacity(
            self.animation_source_list.len(),
        );
        for block in &self.animation_source_list {
            animation_source_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AnimationSourceList".to_owned(),
            libremetaverse_structured_data::OSD::Array(animation_source_list_values),
        )?;
        let mut physical_avatar_event_list_values = Vec::with_capacity(
            self.physical_avatar_event_list.len(),
        );
        for block in &self.physical_avatar_event_list {
            physical_avatar_event_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "PhysicalAvatarEventList".to_owned(),
            libremetaverse_structured_data::OSD::Array(physical_avatar_event_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Sender")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sender, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AnimationList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.animation_list = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AnimationSourceList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAnimationPacketAnimationSourceListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.animation_source_list = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("PhysicalAvatarEventList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::AvatarAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.physical_avatar_event_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut animation_list_start = 0_usize;
        let mut animation_source_list_start = 0_usize;
        let mut physical_avatar_event_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.sender))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(3).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut animation_list_count = 0_usize;
            while animation_list_start + animation_list_count < self.animation_list.len()
                && animation_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .animation_list[animation_list_start + animation_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || animation_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    animation_list_count += 1;
                } else {
                    break;
                }
            }
            let mut animation_source_list_count = 0_usize;
            while animation_source_list_start + animation_source_list_count
                < self.animation_source_list.len()
                && animation_source_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .animation_source_list[animation_source_list_start
                                + animation_source_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || animation_source_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    animation_source_list_count += 1;
                } else {
                    break;
                }
            }
            let mut physical_avatar_event_list_count = 0_usize;
            while physical_avatar_event_list_start + physical_avatar_event_list_count
                < self.physical_avatar_event_list.len()
                && physical_avatar_event_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .physical_avatar_event_list[physical_avatar_event_list_start
                                + physical_avatar_event_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || physical_avatar_event_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    physical_avatar_event_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.sender, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(animation_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .animation_list[animation_list_start..animation_list_start
                + animation_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            animation_list_start += animation_list_count;
            writer
                .write_u8(
                    u8::try_from(animation_source_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .animation_source_list[animation_source_list_start..animation_source_list_start
                + animation_source_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            animation_source_list_start += animation_source_list_count;
            writer
                .write_u8(
                    u8::try_from(physical_avatar_event_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .physical_avatar_event_list[physical_avatar_event_list_start..physical_avatar_event_list_start
                + physical_avatar_event_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            physical_avatar_event_list_start += physical_avatar_event_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if animation_list_start >= self.animation_list.len()
                && animation_source_list_start >= self.animation_source_list.len()
                && physical_avatar_event_list_start
                    >= self.physical_avatar_event_list.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::AvatarSitResponsePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            sit_object: <crate::packets::AvatarSitResponsePacketSitObjectBlock as GeneratedBlock>::new_generated(),
            sit_transform: <crate::packets::AvatarSitResponsePacketSitTransformBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.sit_object));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.sit_transform));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 21, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sit_object, reader)?;
        GeneratedBlock::decode_payload(&mut self.sit_transform, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sit_object, writer)?;
        GeneratedBlock::encode_payload(&self.sit_transform, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sit_object_values = Vec::with_capacity(1);
        sit_object_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sit_object)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SitObject".to_owned(),
            libremetaverse_structured_data::OSD::Array(sit_object_values),
        )?;
        let mut sit_transform_values = Vec::with_capacity(1);
        sit_transform_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sit_transform)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SitTransform".to_owned(),
            libremetaverse_structured_data::OSD::Array(sit_transform_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SitObject")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sit_object, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SitTransform")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sit_transform, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::CameraConstraintPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            camera_collide_plane: <crate::packets::CameraConstraintPacketCameraCollidePlaneBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.camera_collide_plane),
            );
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 22, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.camera_collide_plane, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.camera_collide_plane, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut camera_collide_plane_values = Vec::with_capacity(1);
        camera_collide_plane_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.camera_collide_plane)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "CameraCollidePlane".to_owned(),
            libremetaverse_structured_data::OSD::Array(camera_collide_plane_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("CameraCollidePlane")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.camera_collide_plane, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ParcelPropertiesPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            parcel_data: <crate::packets::ParcelPropertiesPacketParcelDataBlock as GeneratedBlock>::new_generated(),
            age_verification_block: <crate::packets::ParcelPropertiesPacketAgeVerificationBlockBlock as GeneratedBlock>::new_generated(),
            region_allow_access_block: <crate::packets::ParcelPropertiesPacketRegionAllowAccessBlockBlock as GeneratedBlock>::new_generated(),
            parcel_environment_block: <crate::packets::ParcelPropertiesPacketParcelEnvironmentBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.parcel_data));
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.age_verification_block),
            );
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.region_allow_access_block),
            );
        length = length
            .saturating_add(
                GeneratedBlock::generated_length(&self.parcel_environment_block),
            );
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 23, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.parcel_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.age_verification_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.region_allow_access_block, reader)?;
        GeneratedBlock::decode_payload(&mut self.parcel_environment_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.parcel_data, writer)?;
        GeneratedBlock::encode_payload(&self.age_verification_block, writer)?;
        GeneratedBlock::encode_payload(&self.region_allow_access_block, writer)?;
        GeneratedBlock::encode_payload(&self.parcel_environment_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut parcel_data_values = Vec::with_capacity(1);
        parcel_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelData".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_data_values),
        )?;
        let mut age_verification_block_values = Vec::with_capacity(1);
        age_verification_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.age_verification_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgeVerificationBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(age_verification_block_values),
        )?;
        let mut region_allow_access_block_values = Vec::with_capacity(1);
        region_allow_access_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.region_allow_access_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "RegionAllowAccessBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(region_allow_access_block_values),
        )?;
        let mut parcel_environment_block_values = Vec::with_capacity(1);
        parcel_environment_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.parcel_environment_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "ParcelEnvironmentBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(parcel_environment_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgeVerificationBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.age_verification_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("RegionAllowAccessBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.region_allow_access_block, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ParcelEnvironmentBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.parcel_environment_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::EdgeDataPacketPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            edge_data: <crate::packets::EdgeDataPacketPacketEdgeDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.edge_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 24, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.edge_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.edge_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut edge_data_values = Vec::with_capacity(1);
        edge_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.edge_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "EdgeData".to_owned(),
            libremetaverse_structured_data::OSD::Array(edge_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("EdgeData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.edge_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChildAgentUpdatePacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChildAgentUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
            group_data: Vec::new(),
            animation_data: Vec::new(),
            granter_block: Vec::new(),
            nv_pair_data: Vec::new(),
            visual_param: Vec::new(),
            agent_access: Vec::new(),
            agent_info: Vec::new(),
            agent_inventory_host: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.group_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.animation_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.granter_block {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.nv_pair_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.visual_param {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.agent_access {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.agent_info {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.agent_inventory_host {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 25, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let group_data_count = usize::from(reader.read_u8()?);
        let mut group_data = Vec::new();
        group_data
            .try_reserve_exact(group_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..group_data_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            group_data.push(block);
        }
        self.group_data = group_data;
        let animation_data_count = usize::from(reader.read_u8()?);
        let mut animation_data = Vec::new();
        animation_data
            .try_reserve_exact(animation_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..animation_data_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketAnimationDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            animation_data.push(block);
        }
        self.animation_data = animation_data;
        let granter_block_count = usize::from(reader.read_u8()?);
        let mut granter_block = Vec::new();
        granter_block
            .try_reserve_exact(granter_block_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..granter_block_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketGranterBlockBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            granter_block.push(block);
        }
        self.granter_block = granter_block;
        let nv_pair_data_count = usize::from(reader.read_u8()?);
        let mut nv_pair_data = Vec::new();
        nv_pair_data
            .try_reserve_exact(nv_pair_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..nv_pair_data_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketNVPairDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            nv_pair_data.push(block);
        }
        self.nv_pair_data = nv_pair_data;
        let visual_param_count = usize::from(reader.read_u8()?);
        let mut visual_param = Vec::new();
        visual_param
            .try_reserve_exact(visual_param_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..visual_param_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketVisualParamBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            visual_param.push(block);
        }
        self.visual_param = visual_param;
        let agent_access_count = usize::from(reader.read_u8()?);
        let mut agent_access = Vec::new();
        agent_access
            .try_reserve_exact(agent_access_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_access_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketAgentAccessBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_access.push(block);
        }
        self.agent_access = agent_access;
        let agent_info_count = usize::from(reader.read_u8()?);
        let mut agent_info = Vec::new();
        agent_info
            .try_reserve_exact(agent_info_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_info_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketAgentInfoBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_info.push(block);
        }
        self.agent_info = agent_info;
        let agent_inventory_host_count = usize::from(reader.read_u8()?);
        let mut agent_inventory_host = Vec::new();
        agent_inventory_host
            .try_reserve_exact(agent_inventory_host_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..agent_inventory_host_count {
            let mut block = <crate::packets::ChildAgentUpdatePacketAgentInventoryHostBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            agent_inventory_host.push(block);
        }
        self.agent_inventory_host = agent_inventory_host;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.group_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.group_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.animation_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.animation_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.granter_block.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.granter_block {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.nv_pair_data.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.nv_pair_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.visual_param.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.visual_param {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.agent_access.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_access {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.agent_info.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_info {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.agent_inventory_host.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.agent_inventory_host {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut group_data_values = Vec::with_capacity(self.group_data.len());
        for block in &self.group_data {
            group_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "GroupData".to_owned(),
            libremetaverse_structured_data::OSD::Array(group_data_values),
        )?;
        let mut animation_data_values = Vec::with_capacity(self.animation_data.len());
        for block in &self.animation_data {
            animation_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AnimationData".to_owned(),
            libremetaverse_structured_data::OSD::Array(animation_data_values),
        )?;
        let mut granter_block_values = Vec::with_capacity(self.granter_block.len());
        for block in &self.granter_block {
            granter_block_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "GranterBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(granter_block_values),
        )?;
        let mut nv_pair_data_values = Vec::with_capacity(self.nv_pair_data.len());
        for block in &self.nv_pair_data {
            nv_pair_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "NVPairData".to_owned(),
            libremetaverse_structured_data::OSD::Array(nv_pair_data_values),
        )?;
        let mut visual_param_values = Vec::with_capacity(self.visual_param.len());
        for block in &self.visual_param {
            visual_param_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "VisualParam".to_owned(),
            libremetaverse_structured_data::OSD::Array(visual_param_values),
        )?;
        let mut agent_access_values = Vec::with_capacity(self.agent_access.len());
        for block in &self.agent_access {
            agent_access_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentAccess".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_access_values),
        )?;
        let mut agent_info_values = Vec::with_capacity(self.agent_info.len());
        for block in &self.agent_info {
            agent_info_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentInfo".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_info_values),
        )?;
        let mut agent_inventory_host_values = Vec::with_capacity(
            self.agent_inventory_host.len(),
        );
        for block in &self.agent_inventory_host {
            agent_inventory_host_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AgentInventoryHost".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_inventory_host_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GroupData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.group_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AnimationData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketAnimationDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.animation_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("GranterBlock")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketGranterBlockBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.granter_block = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("NVPairData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketNVPairDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.nv_pair_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("VisualParam")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketVisualParamBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.visual_param = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentAccess")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketAgentAccessBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_access = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentInfo")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketAgentInfoBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_info = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentInventoryHost")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ChildAgentUpdatePacketAgentInventoryHostBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.agent_inventory_host = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut group_data_start = 0_usize;
        let mut animation_data_start = 0_usize;
        let mut granter_block_start = 0_usize;
        let mut nv_pair_data_start = 0_usize;
        let mut visual_param_start = 0_usize;
        let mut agent_access_start = 0_usize;
        let mut agent_info_start = 0_usize;
        let mut agent_inventory_host_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(8).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut group_data_count = 0_usize;
            while group_data_start + group_data_count < self.group_data.len()
                && group_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.group_data[group_data_start + group_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || group_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    group_data_count += 1;
                } else {
                    break;
                }
            }
            let mut animation_data_count = 0_usize;
            while animation_data_start + animation_data_count < self.animation_data.len()
                && animation_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .animation_data[animation_data_start + animation_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || animation_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    animation_data_count += 1;
                } else {
                    break;
                }
            }
            let mut granter_block_count = 0_usize;
            while granter_block_start + granter_block_count < self.granter_block.len()
                && granter_block_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .granter_block[granter_block_start + granter_block_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || granter_block_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    granter_block_count += 1;
                } else {
                    break;
                }
            }
            let mut nv_pair_data_count = 0_usize;
            while nv_pair_data_start + nv_pair_data_count < self.nv_pair_data.len()
                && nv_pair_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.nv_pair_data[nv_pair_data_start + nv_pair_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || nv_pair_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    nv_pair_data_count += 1;
                } else {
                    break;
                }
            }
            let mut visual_param_count = 0_usize;
            while visual_param_start + visual_param_count < self.visual_param.len()
                && visual_param_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.visual_param[visual_param_start + visual_param_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || visual_param_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    visual_param_count += 1;
                } else {
                    break;
                }
            }
            let mut agent_access_count = 0_usize;
            while agent_access_start + agent_access_count < self.agent_access.len()
                && agent_access_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_access[agent_access_start + agent_access_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_access_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_access_count += 1;
                } else {
                    break;
                }
            }
            let mut agent_info_count = 0_usize;
            while agent_info_start + agent_info_count < self.agent_info.len()
                && agent_info_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.agent_info[agent_info_start + agent_info_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || agent_info_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_info_count += 1;
                } else {
                    break;
                }
            }
            let mut agent_inventory_host_count = 0_usize;
            while agent_inventory_host_start + agent_inventory_host_count
                < self.agent_inventory_host.len()
                && agent_inventory_host_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .agent_inventory_host[agent_inventory_host_start
                                + agent_inventory_host_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || agent_inventory_host_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    agent_inventory_host_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(group_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .group_data[group_data_start..group_data_start + group_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            group_data_start += group_data_count;
            writer
                .write_u8(
                    u8::try_from(animation_data_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .animation_data[animation_data_start..animation_data_start
                + animation_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            animation_data_start += animation_data_count;
            writer
                .write_u8(
                    u8::try_from(granter_block_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .granter_block[granter_block_start..granter_block_start
                + granter_block_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            granter_block_start += granter_block_count;
            writer
                .write_u8(
                    u8::try_from(nv_pair_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .nv_pair_data[nv_pair_data_start..nv_pair_data_start
                + nv_pair_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            nv_pair_data_start += nv_pair_data_count;
            writer
                .write_u8(
                    u8::try_from(visual_param_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .visual_param[visual_param_start..visual_param_start
                + visual_param_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            visual_param_start += visual_param_count;
            writer
                .write_u8(
                    u8::try_from(agent_access_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_access[agent_access_start..agent_access_start
                + agent_access_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_access_start += agent_access_count;
            writer
                .write_u8(
                    u8::try_from(agent_info_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_info[agent_info_start..agent_info_start + agent_info_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_info_start += agent_info_count;
            writer
                .write_u8(
                    u8::try_from(agent_inventory_host_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .agent_inventory_host[agent_inventory_host_start..agent_inventory_host_start
                + agent_inventory_host_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            agent_inventory_host_start += agent_inventory_host_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if group_data_start >= self.group_data.len()
                && animation_data_start >= self.animation_data.len()
                && granter_block_start >= self.granter_block.len()
                && nv_pair_data_start >= self.nv_pair_data.len()
                && visual_param_start >= self.visual_param.len()
                && agent_access_start >= self.agent_access.len()
                && agent_info_start >= self.agent_info.len()
                && agent_inventory_host_start >= self.agent_inventory_host.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::ChildAgentAlivePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChildAgentAlivePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 26, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ChildAgentPositionUpdatePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::ChildAgentPositionUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 27, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::AtomicPassObjectPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            task_data: <crate::packets::AtomicPassObjectPacketTaskDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.task_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 28, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.task_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.task_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut task_data_values = Vec::with_capacity(1);
        task_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.task_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "TaskData".to_owned(),
            libremetaverse_structured_data::OSD::Array(task_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("TaskData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.task_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::GenericStreamingMessagePacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            method_data: <crate::packets::GenericStreamingMessagePacketMethodDataBlock as GeneratedBlock>::new_generated(),
            data_block: <crate::packets::GenericStreamingMessagePacketDataBlockBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.method_data));
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.data_block));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 31, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.method_data, reader)?;
        GeneratedBlock::decode_payload(&mut self.data_block, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.method_data, writer)?;
        GeneratedBlock::encode_payload(&self.data_block, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut method_data_values = Vec::with_capacity(1);
        method_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.method_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "MethodData".to_owned(),
            libremetaverse_structured_data::OSD::Array(method_data_values),
        )?;
        let mut data_block_values = Vec::with_capacity(1);
        data_block_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.data_block)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "DataBlock".to_owned(),
            libremetaverse_structured_data::OSD::Array(data_block_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("MethodData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.method_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("DataBlock")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.data_block, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::SoundTriggerPacket {
    const USES_BUFFER_POOLING: bool = true;
    fn new_generated() -> Self {
        Self {
            sound_data: <crate::packets::SoundTriggerPacketSoundDataBlock as GeneratedBlock>::new_generated(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.sound_data));
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 29, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sound_data, reader)?;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sound_data, writer)?;
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sound_data_values = Vec::with_capacity(1);
        sound_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sound_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "SoundData".to_owned(),
            libremetaverse_structured_data::OSD::Array(sound_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("SoundData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sound_data, &map)?;
            }
        }
        Ok(())
    }
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        Ok(vec![self.encode_packet() ?])
    }
}
impl GeneratedPacket for crate::packets::ObjectAnimationPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            sender: <crate::packets::ObjectAnimationPacketSenderBlock as GeneratedBlock>::new_generated(),
            animation_list: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length.saturating_add(GeneratedBlock::generated_length(&self.sender));
        length = length.saturating_add(1);
        for block in &self.animation_list {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 30, false)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.sender, reader)?;
        let animation_list_count = usize::from(reader.read_u8()?);
        let mut animation_list = Vec::new();
        animation_list
            .try_reserve_exact(animation_list_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..animation_list_count {
            let mut block = <crate::packets::ObjectAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            animation_list.push(block);
        }
        self.animation_list = animation_list;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.sender, writer)?;
        writer
            .write_u8(
                u8::try_from(self.animation_list.len())
                    .map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.animation_list {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut sender_values = Vec::with_capacity(1);
        sender_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.sender)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "Sender".to_owned(),
            libremetaverse_structured_data::OSD::Array(sender_values),
        )?;
        let mut animation_list_values = Vec::with_capacity(self.animation_list.len());
        for block in &self.animation_list {
            animation_list_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AnimationList".to_owned(),
            libremetaverse_structured_data::OSD::Array(animation_list_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("Sender")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.sender, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AnimationList")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::ObjectAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.animation_list = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut animation_list_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.sender))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(1).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut animation_list_count = 0_usize;
            while animation_list_start + animation_list_count < self.animation_list.len()
                && animation_list_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self
                                .animation_list[animation_list_start + animation_list_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)?
                    || animation_list_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    animation_list_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.sender, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(animation_list_count)
                        .map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .animation_list[animation_list_start..animation_list_start
                + animation_list_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            animation_list_start += animation_list_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if animation_list_start >= self.animation_list.len() {
                break;
            }
        }
        Ok(packets)
    }
}
impl GeneratedPacket for crate::packets::GameControlInputPacket {
    const USES_BUFFER_POOLING: bool = false;
    fn new_generated() -> Self {
        Self {
            agent_data: <crate::packets::GameControlInputPacketAgentDataBlock as GeneratedBlock>::new_generated(),
            axis_data: Vec::new(),
            button_data: Vec::new(),
        }
    }
    fn generated_length(&self) -> i32 {
        let mut length = 7_i32;
        length = length
            .saturating_add(GeneratedBlock::generated_length(&self.agent_data));
        length = length.saturating_add(1);
        for block in &self.axis_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length = length.saturating_add(1);
        for block in &self.button_data {
            length = length.saturating_add(GeneratedBlock::generated_length(block));
        }
        length
    }
    fn generated_header(&self) -> crate::packets::Header {
        new_header(crate::PacketFrequency::High, 32, true)
    }
    fn store_header(&mut self, header: crate::packets::Header) {
        let _ = header;
    }
    fn decode_payload(
        &mut self,
        reader: &mut crate::packet_wire::WireReader<'_>,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::decode_payload(&mut self.agent_data, reader)?;
        let axis_data_count = usize::from(reader.read_u8()?);
        let mut axis_data = Vec::new();
        axis_data
            .try_reserve_exact(axis_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..axis_data_count {
            let mut block = <crate::packets::GameControlInputPacketAxisDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            axis_data.push(block);
        }
        self.axis_data = axis_data;
        let button_data_count = usize::from(reader.read_u8()?);
        let mut button_data = Vec::new();
        button_data
            .try_reserve_exact(button_data_count)
            .map_err(|_| crate::Error::InvalidOperation)?;
        for _ in 0..button_data_count {
            let mut block = <crate::packets::GameControlInputPacketButtonDataBlock as GeneratedBlock>::new_generated();
            GeneratedBlock::decode_payload(&mut block, reader)?;
            button_data.push(block);
        }
        self.button_data = button_data;
        Ok(())
    }
    fn encode_payload(
        &self,
        writer: &mut crate::packet_wire::WireWriter,
    ) -> Result<(), crate::Error> {
        GeneratedBlock::encode_payload(&self.agent_data, writer)?;
        writer
            .write_u8(
                u8::try_from(self.axis_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.axis_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        writer
            .write_u8(
                u8::try_from(self.button_data.len()).map_err(|_| crate::Error::Argument)?,
            )?;
        for block in &self.button_data {
            GeneratedBlock::encode_payload(block, writer)?;
        }
        Ok(())
    }
    fn packet_to_osd(
        &self,
    ) -> Result<libremetaverse_structured_data::OSDMap, crate::Error> {
        let body = libremetaverse_structured_data::OSDMap::new_with_constructor()?;
        let mut agent_data_values = Vec::with_capacity(1);
        agent_data_values
            .push(
                libremetaverse_structured_data::OSD::Map(
                    GeneratedBlock::to_osd(&self.agent_data)?.snapshot(),
                ),
            );
        body.add_with_string_osd(
            "AgentData".to_owned(),
            libremetaverse_structured_data::OSD::Array(agent_data_values),
        )?;
        let mut axis_data_values = Vec::with_capacity(self.axis_data.len());
        for block in &self.axis_data {
            axis_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "AxisData".to_owned(),
            libremetaverse_structured_data::OSD::Array(axis_data_values),
        )?;
        let mut button_data_values = Vec::with_capacity(self.button_data.len());
        for block in &self.button_data {
            button_data_values
                .push(
                    libremetaverse_structured_data::OSD::Map(
                        GeneratedBlock::to_osd(block)?.snapshot(),
                    ),
                );
        }
        body.add_with_string_osd(
            "ButtonData".to_owned(),
            libremetaverse_structured_data::OSD::Array(button_data_values),
        )?;
        Ok(body)
    }
    fn packet_from_osd(
        &mut self,
        body: &libremetaverse_structured_data::OSDMap,
    ) -> Result<(), crate::Error> {
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AgentData")
        {
            if let Some(libremetaverse_structured_data::OSD::Map(values)) = values
                .first()
            {
                let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                    values.clone(),
                )?;
                GeneratedBlock::from_osd(&mut self.agent_data, &map)?;
            }
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("AxisData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GameControlInputPacketAxisDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.axis_data = blocks;
        }
        if let Some(libremetaverse_structured_data::OSD::Array(values)) = body
            .get("ButtonData")
        {
            let mut blocks = Vec::new();
            blocks
                .try_reserve_exact(values.len())
                .map_err(|_| crate::Error::InvalidOperation)?;
            for value in values {
                let mut block = <crate::packets::GameControlInputPacketButtonDataBlock as GeneratedBlock>::new_generated();
                if let libremetaverse_structured_data::OSD::Map(values) = value {
                    let map = libremetaverse_structured_data::OSDMap::new_with_dictionary(
                        values.clone(),
                    )?;
                    GeneratedBlock::from_osd(&mut block, &map)?;
                }
                blocks.push(block);
            }
            self.button_data = blocks;
        }
        Ok(())
    }
    #[allow(clippy::too_many_lines)]
    fn encode_multiple(&self) -> Result<Vec<Vec<u8>>, crate::Error> {
        let header = self.generated_header();
        let mut packets = Vec::new();
        let mut axis_data_start = 0_usize;
        let mut button_data_start = 0_usize;
        loop {
            let first_packet = packets.is_empty();
            let mut packet_header = crate::packet_wire::clone_header(&header);
            if !first_packet {
                packet_header.appended_acks = false;
                packet_header.ack_list = None;
            }
            let acks_length = crate::packet_wire::ack_length(&packet_header)?;
            let mut fixed_length = crate::packet_wire::header_length(
                packet_header.frequency,
            );
            fixed_length = fixed_length
                .checked_add(
                    usize::try_from(GeneratedBlock::generated_length(&self.agent_data))
                        .map_err(|_| crate::Error::Argument)?,
                )
                .ok_or(crate::Error::Argument)?;
            fixed_length = fixed_length.checked_add(2).ok_or(crate::Error::Argument)?;
            let mut variable_length = 0_usize;
            let mut axis_data_count = 0_usize;
            while axis_data_start + axis_data_count < self.axis_data.len()
                && axis_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.axis_data[axis_data_start + axis_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || axis_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    axis_data_count += 1;
                } else {
                    break;
                }
            }
            let mut button_data_count = 0_usize;
            while button_data_start + button_data_count < self.button_data.len()
                && button_data_count < usize::from(u8::MAX)
            {
                let block_length = usize::try_from(
                        GeneratedBlock::generated_length(
                            &self.button_data[button_data_start + button_data_count],
                        ),
                    )
                    .map_err(|_| crate::Error::Argument)?;
                if fixed_length
                    .saturating_add(variable_length)
                    .saturating_add(block_length)
                    .saturating_add(acks_length)
                    <= usize::try_from(crate::packets::Packet::MTU)
                        .map_err(|_| crate::Error::Argument)? || button_data_count == 0
                {
                    variable_length = variable_length
                        .checked_add(block_length)
                        .ok_or(crate::Error::Argument)?;
                    button_data_count += 1;
                } else {
                    break;
                }
            }
            let capacity = fixed_length
                .checked_add(variable_length)
                .and_then(|length| length.checked_add(acks_length))
                .ok_or(crate::Error::Argument)?;
            let mut writer = crate::packet_wire::WireWriter::with_capacity(capacity)?;
            crate::packet_wire::encode_header(&packet_header, &mut writer)?;
            GeneratedBlock::encode_payload(&self.agent_data, &mut writer)?;
            writer
                .write_u8(
                    u8::try_from(axis_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .axis_data[axis_data_start..axis_data_start + axis_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            axis_data_start += axis_data_count;
            writer
                .write_u8(
                    u8::try_from(button_data_count).map_err(|_| crate::Error::Argument)?,
                )?;
            for block in &self
                .button_data[button_data_start..button_data_start + button_data_count]
            {
                GeneratedBlock::encode_payload(block, &mut writer)?;
            }
            button_data_start += button_data_count;
            crate::packet_wire::encode_acks(&packet_header, &mut writer)?;
            packets.push(writer.into_inner());
            if axis_data_start >= self.axis_data.len()
                && button_data_start >= self.button_data.len()
            {
                break;
            }
        }
        Ok(packets)
    }
}
#[cfg(test)]
mod generated_codec_tests {
    use super::{GeneratedBlock, GeneratedPacket};
    fn assert_round_trip<T: GeneratedPacket>(packet: &T, name: &str) {
        let expected = packet
            .encode_packet()
            .unwrap_or_else(|error| panic!("{name}: encode failed: {error}"));
        let (wire, mut zero_buffer) = if expected[0] & crate::Helpers::MSG_ZEROCODED != 0
        {
            let mut encoded = vec![
                0_u8; expected.len().saturating_mul(2).saturating_add(2)
            ];
            let encoded_length = crate::packet_wire::zero_encode(
                    Some(&expected),
                    i32::try_from(expected.len()).expect("packet length fits i32"),
                    Some(&mut encoded),
                )
                .unwrap_or_else(|error| panic!("{name}: zero encode failed: {error}"));
            encoded
                .truncate(
                    usize::try_from(encoded_length).expect("encoded length fits usize"),
                );
            (encoded, vec![0_u8; expected.len()])
        } else {
            (expected.clone(), Vec::new())
        };
        let mut decoded = T::new_generated();
        let mut position = 0_i32;
        let mut packet_end = i32::try_from(wire.len()).expect("wire length fits i32")
            - 1;
        let buffer = (!zero_buffer.is_empty()).then_some(zero_buffer.as_mut_slice());
        decoded
            .decode_from_bytes(&wire, &mut position, &mut packet_end, buffer)
            .unwrap_or_else(|error| panic!("{name}: decode failed: {error}"));
        let actual = decoded
            .encode_packet()
            .unwrap_or_else(|error| panic!("{name}: re-encode failed: {error}"));
        assert_eq!(actual, expected, "{name}: round-trip bytes differ");
        assert_eq!(
            position, i32::try_from(expected.len()).expect("packet length fits i32"),
            "{name}: final position"
        );
        let expected_osd = packet
            .packet_to_osd()
            .unwrap_or_else(|error| panic!("{name}: OSD serialization failed: {error}"));
        let mut osd_round_trip = T::new_generated();
        osd_round_trip
            .packet_from_osd(&expected_osd)
            .unwrap_or_else(|error| {
                panic!("{name}: OSD deserialization failed: {error}")
            });
        assert_eq!(
            osd_round_trip.encode_packet().unwrap_or_else(| error |
            panic!("{name}: OSD re-encode failed: {error}")), expected,
            "{name}: OSD round-trip bytes differ"
        );
        assert_eq!(
            osd_round_trip.packet_to_osd().unwrap_or_else(| error |
            panic!("{name}: OSD reserialization failed: {error}")).snapshot(),
            expected_osd.snapshot(), "{name}: OSD round-trip differs"
        );
        for truncated_length in 0..wire.len() {
            let outcome = std::panic::catch_unwind(
                std::panic::AssertUnwindSafe(|| {
                    let mut candidate = T::new_generated();
                    let mut truncated_position = 0_i32;
                    let mut truncated_end = i32::try_from(truncated_length)
                        .expect("truncated length fits i32") - 1;
                    let mut scratch = vec![0_u8; expected.len()];
                    let truncated_buffer = (!zero_buffer.is_empty())
                        .then_some(scratch.as_mut_slice());
                    candidate
                        .decode_from_bytes(
                            &wire[..truncated_length],
                            &mut truncated_position,
                            &mut truncated_end,
                            truncated_buffer,
                        )
                }),
            );
            assert!(
                outcome.is_ok(), "{name}: truncation at {truncated_length} panicked"
            );
        }
    }
    #[test]
    #[allow(clippy::too_many_lines)]
    fn every_generated_packet_round_trips_all_fields() {
        let mut packet = <crate::packets::TestMessagePacket as GeneratedPacket>::new_generated();
        packet.test_block1.test1 = 0x1122_3344_u32;
        for block in &mut packet.neighbor_block {
            block.test0 = 0x1122_3344_u32;
            block.test1 = 0x1122_3344_u32;
            block.test2 = 0x1122_3344_u32;
        }
        assert_round_trip(&packet, "TestMessage");
        let mut packet = <crate::packets::PacketAckPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::PacketAckPacketPacketsBlock as GeneratedBlock>::new_generated();
        block.id = 0x1122_3344_u32;
        packet.packets.push(block);
        assert_round_trip(&packet, "PacketAck");
        let mut packet = <crate::packets::OpenCircuitPacket as GeneratedPacket>::new_generated();
        packet.circuit_info.ip = 0x1122_3344_u32;
        packet.circuit_info.port = 0x1234_u16;
        assert_round_trip(&packet, "OpenCircuit");
        let packet = <crate::packets::CloseCircuitPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "CloseCircuit");
        let mut packet = <crate::packets::AddCircuitCodePacket as GeneratedPacket>::new_generated();
        packet.circuit_code.code = 0x1122_3344_u32;
        packet.circuit_code.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.circuit_code.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AddCircuitCode");
        let mut packet = <crate::packets::UseCircuitCodePacket as GeneratedPacket>::new_generated();
        packet.circuit_code.code = 0x1122_3344_u32;
        packet.circuit_code.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.circuit_code.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "UseCircuitCode");
        let mut packet = <crate::packets::AvatarTextureUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.textures_changed = true;
        let mut block = <crate::packets::AvatarTextureUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.cache_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.texture_index = 0xa5_u8;
        block.host_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.wearable_data.push(block);
        let mut block = <crate::packets::AvatarTextureUpdatePacketTextureDataBlock as GeneratedBlock>::new_generated();
        block.texture_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.texture_data.push(block);
        assert_round_trip(&packet, "AvatarTextureUpdate");
        let mut packet = <crate::packets::SimulatorMapUpdatePacket as GeneratedPacket>::new_generated();
        packet.map_data.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "SimulatorMapUpdate");
        let mut packet = <crate::packets::SimulatorSetMapPacket as GeneratedPacket>::new_generated();
        packet.map_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.map_data.type_ = -0x1122_3344_i32;
        packet.map_data.map_image = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "SimulatorSetMap");
        let packet = <crate::packets::SubscribeLoadPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "SubscribeLoad");
        let packet = <crate::packets::UnsubscribeLoadPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "UnsubscribeLoad");
        let mut packet = <crate::packets::SimulatorReadyPacket as GeneratedPacket>::new_generated();
        packet.simulator_block.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.simulator_block.sim_access = 0xa5_u8;
        packet.simulator_block.region_flags = 0x1122_3344_u32;
        packet.simulator_block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.simulator_block.estate_id = 0x1122_3344_u32;
        packet.simulator_block.parent_estate_id = 0x1122_3344_u32;
        packet.telehub_block.has_telehub = true;
        packet.telehub_block.telehub_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "SimulatorReady");
        let mut packet = <crate::packets::TelehubInfoPacket as GeneratedPacket>::new_generated();
        packet.telehub_block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.telehub_block.object_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.telehub_block.telehub_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.telehub_block.telehub_rot = libremetaverse_types::Quaternion::identity();
        let mut block = <crate::packets::TelehubInfoPacketSpawnPointBlockBlock as GeneratedBlock>::new_generated();
        block.spawn_point_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.spawn_point_block.push(block);
        assert_round_trip(&packet, "TelehubInfo");
        let mut packet = <crate::packets::SimulatorPresentAtLocationPacket as GeneratedPacket>::new_generated();
        packet.simulator_public_host_block.port = 0x1234_u16;
        packet.simulator_public_host_block.simulator_ip = 0x1122_3344_u32;
        packet.simulator_public_host_block.grid_x = 0x1122_3344_u32;
        packet.simulator_public_host_block.grid_y = 0x1122_3344_u32;
        for block in &mut packet.neighbor_block {
            block.ip = 0x1122_3344_u32;
            block.port = 0x1234_u16;
        }
        packet.simulator_block.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.simulator_block.sim_access = 0xa5_u8;
        packet.simulator_block.region_flags = 0x1122_3344_u32;
        packet.simulator_block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.simulator_block.estate_id = 0x1122_3344_u32;
        packet.simulator_block.parent_estate_id = 0x1122_3344_u32;
        let mut block = <crate::packets::SimulatorPresentAtLocationPacketTelehubBlockBlock as GeneratedBlock>::new_generated();
        block.has_telehub = true;
        block.telehub_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.telehub_block.push(block);
        assert_round_trip(&packet, "SimulatorPresentAtLocation");
        let mut packet = <crate::packets::SimulatorLoadPacket as GeneratedPacket>::new_generated();
        packet.simulator_load.time_dilation = 1.5_f32;
        packet.simulator_load.agent_count = -0x1122_3344_i32;
        packet.simulator_load.can_accept_agents = true;
        let mut block = <crate::packets::SimulatorLoadPacketAgentListBlock as GeneratedBlock>::new_generated();
        block.circuit_code = 0x1122_3344_u32;
        block.x = 0xa5_u8;
        block.y = 0xa5_u8;
        packet.agent_list.push(block);
        assert_round_trip(&packet, "SimulatorLoad");
        let packet = <crate::packets::SimulatorShutdownRequestPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "SimulatorShutdownRequest");
        let mut packet = <crate::packets::RegionPresenceRequestByRegionIDPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::RegionPresenceRequestByRegionIDPacketRegionDataBlock as GeneratedBlock>::new_generated();
        block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_data.push(block);
        assert_round_trip(&packet, "RegionPresenceRequestByRegionID");
        let mut packet = <crate::packets::RegionPresenceRequestByHandlePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::RegionPresenceRequestByHandlePacketRegionDataBlock as GeneratedBlock>::new_generated();
        block.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.push(block);
        assert_round_trip(&packet, "RegionPresenceRequestByHandle");
        let mut packet = <crate::packets::RegionPresenceResponsePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::RegionPresenceResponsePacketRegionDataBlock as GeneratedBlock>::new_generated();
        block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.region_handle = 0x0102_0304_0506_0708_u64;
        block.internal_region_ip = 0x1122_3344_u32;
        block.external_region_ip = 0x1122_3344_u32;
        block.region_port = 0x1234_u16;
        block.valid_until = -2.25_f64;
        block.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_data.push(block);
        assert_round_trip(&packet, "RegionPresenceResponse");
        let mut packet = <crate::packets::UpdateSimulatorPacket as GeneratedPacket>::new_generated();
        packet.simulator_info.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.simulator_info.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.simulator_info.estate_id = 0x1122_3344_u32;
        packet.simulator_info.sim_access = 0xa5_u8;
        assert_round_trip(&packet, "UpdateSimulator");
        let mut packet = <crate::packets::LogDwellTimePacket as GeneratedPacket>::new_generated();
        packet.dwell_info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.dwell_info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.dwell_info.duration = 1.5_f32;
        packet.dwell_info.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.dwell_info.region_x = 0x1122_3344_u32;
        packet.dwell_info.region_y = 0x1122_3344_u32;
        packet.dwell_info.avg_agents_in_view = 0xa5_u8;
        packet.dwell_info.avg_viewer_fps = 0xa5_u8;
        assert_round_trip(&packet, "LogDwellTime");
        let mut packet = <crate::packets::FeatureDisabledPacket as GeneratedPacket>::new_generated();
        packet.failure_info.error_message = vec![0_u8, 1, 2, 0, 0xff];
        packet.failure_info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.failure_info.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "FeatureDisabled");
        let mut packet = <crate::packets::LogFailedMoneyTransactionPacket as GeneratedPacket>::new_generated();
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_time = 0x1122_3344_u32;
        packet.transaction_data.transaction_type = -0x1122_3344_i32;
        packet.transaction_data.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.flags = 0xa5_u8;
        packet.transaction_data.amount = -0x1122_3344_i32;
        packet.transaction_data.simulator_ip = 0x1122_3344_u32;
        packet.transaction_data.grid_x = 0x1122_3344_u32;
        packet.transaction_data.grid_y = 0x1122_3344_u32;
        packet.transaction_data.failure_type = 0xa5_u8;
        assert_round_trip(&packet, "LogFailedMoneyTransaction");
        let mut packet = <crate::packets::UserReportInternalPacket as GeneratedPacket>::new_generated();
        packet.report_data.report_type = 0xa5_u8;
        packet.report_data.category = 0xa5_u8;
        packet.report_data.reporter_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.viewer_position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.report_data.agent_position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.report_data.screenshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.last_owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.abuser_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.abuse_region_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.abuse_region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.summary = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.details = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.version_string = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "UserReportInternal");
        let mut packet = <crate::packets::SetSimStatusInDatabasePacket as GeneratedPacket>::new_generated();
        packet.data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.host_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.x = -0x1122_3344_i32;
        packet.data.y = -0x1122_3344_i32;
        packet.data.pid = -0x1122_3344_i32;
        packet.data.agent_count = -0x1122_3344_i32;
        packet.data.time_to_live = -0x1122_3344_i32;
        packet.data.status = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "SetSimStatusInDatabase");
        let mut packet = <crate::packets::SetSimPresenceInDatabasePacket as GeneratedPacket>::new_generated();
        packet.sim_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sim_data.host_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.sim_data.grid_x = 0x1122_3344_u32;
        packet.sim_data.grid_y = 0x1122_3344_u32;
        packet.sim_data.pid = -0x1122_3344_i32;
        packet.sim_data.agent_count = -0x1122_3344_i32;
        packet.sim_data.time_to_live = -0x1122_3344_i32;
        packet.sim_data.status = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "SetSimPresenceInDatabase");
        let packet = <crate::packets::EconomyDataRequestPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "EconomyDataRequest");
        let mut packet = <crate::packets::EconomyDataPacket as GeneratedPacket>::new_generated();
        packet.info.object_capacity = -0x1122_3344_i32;
        packet.info.object_count = -0x1122_3344_i32;
        packet.info.price_energy_unit = -0x1122_3344_i32;
        packet.info.price_object_claim = -0x1122_3344_i32;
        packet.info.price_public_object_decay = -0x1122_3344_i32;
        packet.info.price_public_object_delete = -0x1122_3344_i32;
        packet.info.price_parcel_claim = -0x1122_3344_i32;
        packet.info.price_parcel_claim_factor = 1.5_f32;
        packet.info.price_upload = -0x1122_3344_i32;
        packet.info.price_rent_light = -0x1122_3344_i32;
        packet.info.teleport_min_price = -0x1122_3344_i32;
        packet.info.teleport_price_exponent = 1.5_f32;
        packet.info.energy_efficiency = 1.5_f32;
        packet.info.price_object_rent = 1.5_f32;
        packet.info.price_object_scale_factor = 1.5_f32;
        packet.info.price_parcel_rent = -0x1122_3344_i32;
        packet.info.price_group_create = -0x1122_3344_i32;
        assert_round_trip(&packet, "EconomyData");
        let mut packet = <crate::packets::AvatarPickerRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarPickerRequest");
        let mut packet = <crate::packets::AvatarPickerRequestBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.god_level = 0xa5_u8;
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarPickerRequestBackend");
        let mut packet = <crate::packets::AvatarPickerReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AvatarPickerReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.first_name = vec![0_u8, 1, 2, 0, 0xff];
        block.last_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.push(block);
        assert_round_trip(&packet, "AvatarPickerReply");
        let mut packet = <crate::packets::PlacesQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.category = -37_i8;
        packet.query_data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "PlacesQuery");
        let mut packet = <crate::packets::PlacesReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::PlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.desc = vec![0_u8, 1, 2, 0, 0xff];
        block.actual_area = -0x1122_3344_i32;
        block.billable_area = -0x1122_3344_i32;
        block.flags = 0xa5_u8;
        block.global_x = 1.5_f32;
        block.global_y = 1.5_f32;
        block.global_z = 1.5_f32;
        block.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        block.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.dwell = 1.5_f32;
        block.price = -0x1122_3344_i32;
        packet.query_data.push(block);
        assert_round_trip(&packet, "PlacesReply");
        let mut packet = <crate::packets::DirFindQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirFindQuery");
        let mut packet = <crate::packets::DirFindQueryBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.query_start = -0x1122_3344_i32;
        packet.query_data.estate_id = 0x1122_3344_u32;
        packet.query_data.godlike = true;
        assert_round_trip(&packet, "DirFindQueryBackend");
        let mut packet = <crate::packets::DirPlacesQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.category = -37_i8;
        packet.query_data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirPlacesQuery");
        let mut packet = <crate::packets::DirPlacesQueryBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.category = -37_i8;
        packet.query_data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.estate_id = 0x1122_3344_u32;
        packet.query_data.godlike = true;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirPlacesQueryBackend");
        let mut packet = <crate::packets::DirPlacesReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirPlacesReplyPacketQueryDataBlock as GeneratedBlock>::new_generated();
        block.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.push(block);
        let mut block = <crate::packets::DirPlacesReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.for_sale = true;
        block.auction = true;
        block.dwell = 1.5_f32;
        packet.query_replies.push(block);
        let mut block = <crate::packets::DirPlacesReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
        block.status = 0x1122_3344_u32;
        packet.status_data.push(block);
        assert_round_trip(&packet, "DirPlacesReply");
        let mut packet = <crate::packets::DirPeopleReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirPeopleReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.first_name = vec![0_u8, 1, 2, 0, 0xff];
        block.last_name = vec![0_u8, 1, 2, 0, 0xff];
        block.group = vec![0_u8, 1, 2, 0, 0xff];
        block.online = true;
        block.reputation = -0x1122_3344_i32;
        packet.query_replies.push(block);
        assert_round_trip(&packet, "DirPeopleReply");
        let mut packet = <crate::packets::DirEventsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirEventsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.event_id = 0x1122_3344_u32;
        block.date = vec![0_u8, 1, 2, 0, 0xff];
        block.unix_time = 0x1122_3344_u32;
        block.event_flags = 0x1122_3344_u32;
        packet.query_replies.push(block);
        let mut block = <crate::packets::DirEventsReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
        block.status = 0x1122_3344_u32;
        packet.status_data.push(block);
        assert_round_trip(&packet, "DirEventsReply");
        let mut packet = <crate::packets::DirGroupsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirGroupsReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_name = vec![0_u8, 1, 2, 0, 0xff];
        block.members = -0x1122_3344_i32;
        block.search_order = 1.5_f32;
        packet.query_replies.push(block);
        assert_round_trip(&packet, "DirGroupsReply");
        let mut packet = <crate::packets::DirClassifiedQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.category = 0x1122_3344_u32;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirClassifiedQuery");
        let mut packet = <crate::packets::DirClassifiedQueryBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.category = 0x1122_3344_u32;
        packet.query_data.estate_id = 0x1122_3344_u32;
        packet.query_data.godlike = true;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirClassifiedQueryBackend");
        let mut packet = <crate::packets::DirClassifiedReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirClassifiedReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.classified_flags = 0xa5_u8;
        block.creation_date = 0x1122_3344_u32;
        block.expiration_date = 0x1122_3344_u32;
        block.price_for_listing = -0x1122_3344_i32;
        packet.query_replies.push(block);
        let mut block = <crate::packets::DirClassifiedReplyPacketStatusDataBlock as GeneratedBlock>::new_generated();
        block.status = 0x1122_3344_u32;
        packet.status_data.push(block);
        assert_round_trip(&packet, "DirClassifiedReply");
        let mut packet = <crate::packets::AvatarClassifiedReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AvatarClassifiedReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.push(block);
        assert_round_trip(&packet, "AvatarClassifiedReply");
        let mut packet = <crate::packets::ClassifiedInfoRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ClassifiedInfoRequest");
        let mut packet = <crate::packets::ClassifiedInfoReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.creation_date = 0x1122_3344_u32;
        packet.data.expiration_date = 0x1122_3344_u32;
        packet.data.category = 0x1122_3344_u32;
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.parent_estate = 0x1122_3344_u32;
        packet.data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.pos_global = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.parcel_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.classified_flags = 0xa5_u8;
        packet.data.price_for_listing = -0x1122_3344_i32;
        assert_round_trip(&packet, "ClassifiedInfoReply");
        let mut packet = <crate::packets::ClassifiedInfoUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.category = 0x1122_3344_u32;
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.parent_estate = 0x1122_3344_u32;
        packet.data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pos_global = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.classified_flags = 0xa5_u8;
        packet.data.price_for_listing = -0x1122_3344_i32;
        assert_round_trip(&packet, "ClassifiedInfoUpdate");
        let mut packet = <crate::packets::ClassifiedDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ClassifiedDelete");
        let mut packet = <crate::packets::ClassifiedGodDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.classified_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ClassifiedGodDelete");
        let mut packet = <crate::packets::DirLandQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.search_type = 0x1122_3344_u32;
        packet.query_data.price = -0x1122_3344_i32;
        packet.query_data.area = -0x1122_3344_i32;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "DirLandQuery");
        let mut packet = <crate::packets::DirLandQueryBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.search_type = 0x1122_3344_u32;
        packet.query_data.price = -0x1122_3344_i32;
        packet.query_data.area = -0x1122_3344_i32;
        packet.query_data.query_start = -0x1122_3344_i32;
        packet.query_data.estate_id = 0x1122_3344_u32;
        packet.query_data.godlike = true;
        assert_round_trip(&packet, "DirLandQueryBackend");
        let mut packet = <crate::packets::DirLandReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirLandReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.auction = true;
        block.for_sale = true;
        block.sale_price = -0x1122_3344_i32;
        block.actual_area = -0x1122_3344_i32;
        packet.query_replies.push(block);
        assert_round_trip(&packet, "DirLandReply");
        let mut packet = <crate::packets::DirPopularQueryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "DirPopularQuery");
        let mut packet = <crate::packets::DirPopularQueryBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.estate_id = 0x1122_3344_u32;
        packet.query_data.godlike = true;
        assert_round_trip(&packet, "DirPopularQueryBackend");
        let mut packet = <crate::packets::DirPopularReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::DirPopularReplyPacketQueryRepliesBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.dwell = 1.5_f32;
        packet.query_replies.push(block);
        assert_round_trip(&packet, "DirPopularReply");
        let mut packet = <crate::packets::ParcelInfoRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ParcelInfoRequest");
        let mut packet = <crate::packets::ParcelInfoReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.actual_area = -0x1122_3344_i32;
        packet.data.billable_area = -0x1122_3344_i32;
        packet.data.flags = 0xa5_u8;
        packet.data.global_x = 1.5_f32;
        packet.data.global_y = 1.5_f32;
        packet.data.global_z = 1.5_f32;
        packet.data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.dwell = 1.5_f32;
        packet.data.sale_price = -0x1122_3344_i32;
        packet.data.auction_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelInfoReply");
        let mut packet = <crate::packets::ParcelObjectOwnersRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelObjectOwnersRequest");
        let mut packet = <crate::packets::ParcelObjectOwnersReplyPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ParcelObjectOwnersReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.is_group_owned = true;
        block.count = -0x1122_3344_i32;
        block.online_status = true;
        packet.data.push(block);
        assert_round_trip(&packet, "ParcelObjectOwnersReply");
        let mut packet = <crate::packets::GroupNoticesListRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupNoticesListRequest");
        let mut packet = <crate::packets::GroupNoticesListReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GroupNoticesListReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.notice_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.timestamp = 0x1122_3344_u32;
        block.from_name = vec![0_u8, 1, 2, 0, 0xff];
        block.subject = vec![0_u8, 1, 2, 0, 0xff];
        block.has_attachment = true;
        block.asset_type = 0xa5_u8;
        packet.data.push(block);
        assert_round_trip(&packet, "GroupNoticesListReply");
        let mut packet = <crate::packets::GroupNoticeRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_notice_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupNoticeRequest");
        let mut packet = <crate::packets::GroupNoticeAddPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.to_group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.dialog = 0xa5_u8;
        packet.message_block.from_agent_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.message_block.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.message_block.binary_bucket = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "GroupNoticeAdd");
        let mut packet = <crate::packets::TeleportRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "TeleportRequest");
        let mut packet = <crate::packets::TeleportLocationRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.region_handle = 0x0102_0304_0506_0708_u64;
        packet.info.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "TeleportLocationRequest");
        let mut packet = <crate::packets::TeleportLocalPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.location_id = 0x1122_3344_u32;
        packet.info.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.teleport_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "TeleportLocal");
        let mut packet = <crate::packets::TeleportLandmarkRequestPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.landmark_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "TeleportLandmarkRequest");
        let mut packet = <crate::packets::TeleportProgressPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.teleport_flags = 0x1122_3344_u32;
        packet.info.message = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "TeleportProgress");
        let mut packet = <crate::packets::DataHomeLocationRequestPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.kicked_from_estate_id = 0x1122_3344_u32;
        packet.agent_info.agent_effective_maturity = 0x1122_3344_u32;
        assert_round_trip(&packet, "DataHomeLocationRequest");
        let mut packet = <crate::packets::DataHomeLocationReplyPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.region_handle = 0x0102_0304_0506_0708_u64;
        packet.info.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "DataHomeLocationReply");
        let mut packet = <crate::packets::TeleportFinishPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.location_id = 0x1122_3344_u32;
        packet.info.sim_ip = 0x1122_3344_u32;
        packet.info.sim_port = 0x1234_u16;
        packet.info.region_handle = 0x0102_0304_0506_0708_u64;
        packet.info.seed_capability = vec![0_u8, 1, 2, 0, 0xff];
        packet.info.sim_access = 0xa5_u8;
        packet.info.teleport_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "TeleportFinish");
        let mut packet = <crate::packets::StartLurePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.lure_type = 0xa5_u8;
        packet.info.message = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::StartLurePacketTargetDataBlock as GeneratedBlock>::new_generated();
        block.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.target_data.push(block);
        assert_round_trip(&packet, "StartLure");
        let mut packet = <crate::packets::TeleportLureRequestPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.lure_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.teleport_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "TeleportLureRequest");
        let mut packet = <crate::packets::TeleportCancelPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "TeleportCancel");
        let mut packet = <crate::packets::TeleportStartPacket as GeneratedPacket>::new_generated();
        packet.info.teleport_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "TeleportStart");
        let mut packet = <crate::packets::TeleportFailedPacket as GeneratedPacket>::new_generated();
        packet.info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info.reason = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::TeleportFailedPacketAlertInfoBlock as GeneratedBlock>::new_generated();
        block.message = vec![0_u8, 1, 2, 0, 0xff];
        block.extra_params = vec![0_u8, 1, 2, 0, 0xff];
        packet.alert_info.push(block);
        assert_round_trip(&packet, "TeleportFailed");
        let mut packet = <crate::packets::UndoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::UndoPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.push(block);
        assert_round_trip(&packet, "Undo");
        let mut packet = <crate::packets::RedoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RedoPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.push(block);
        assert_round_trip(&packet, "Redo");
        let mut packet = <crate::packets::UndoLandPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "UndoLand");
        let mut packet = <crate::packets::AgentPausePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = 0x1122_3344_u32;
        assert_round_trip(&packet, "AgentPause");
        let mut packet = <crate::packets::AgentResumePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = 0x1122_3344_u32;
        assert_round_trip(&packet, "AgentResume");
        let mut packet = <crate::packets::ChatFromViewerPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.chat_data.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.chat_data.type_ = 0xa5_u8;
        packet.chat_data.channel = -0x1122_3344_i32;
        assert_round_trip(&packet, "ChatFromViewer");
        let mut packet = <crate::packets::AgentThrottlePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.circuit_code = 0x1122_3344_u32;
        packet.throttle.gen_counter = 0x1122_3344_u32;
        packet.throttle.throttles = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AgentThrottle");
        let mut packet = <crate::packets::AgentFOVPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.circuit_code = 0x1122_3344_u32;
        packet.fov_block.gen_counter = 0x1122_3344_u32;
        packet.fov_block.vertical_angle = 1.5_f32;
        assert_round_trip(&packet, "AgentFOV");
        let mut packet = <crate::packets::AgentHeightWidthPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.circuit_code = 0x1122_3344_u32;
        packet.height_width_block.gen_counter = 0x1122_3344_u32;
        packet.height_width_block.height = 0x1234_u16;
        packet.height_width_block.width = 0x1234_u16;
        assert_round_trip(&packet, "AgentHeightWidth");
        let mut packet = <crate::packets::AgentSetAppearancePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = 0x1122_3344_u32;
        packet.agent_data.size = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        let mut block = <crate::packets::AgentSetAppearancePacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.cache_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.texture_index = 0xa5_u8;
        packet.wearable_data.push(block);
        packet.object_data.texture_entry = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::AgentSetAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
        block.param_value = 0xa5_u8;
        packet.visual_param.push(block);
        assert_round_trip(&packet, "AgentSetAppearance");
        let mut packet = <crate::packets::AgentQuitCopyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.fuse_block.viewer_circuit_code = 0x1122_3344_u32;
        assert_round_trip(&packet, "AgentQuitCopy");
        let mut packet = <crate::packets::ImageNotInDatabasePacket as GeneratedPacket>::new_generated();
        packet.image_id.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ImageNotInDatabase");
        let mut packet = <crate::packets::RebakeAvatarTexturesPacket as GeneratedPacket>::new_generated();
        packet.texture_data.texture_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RebakeAvatarTextures");
        let mut packet = <crate::packets::SetAlwaysRunPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.always_run = true;
        assert_round_trip(&packet, "SetAlwaysRun");
        let mut packet = <crate::packets::ObjectDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.force = true;
        let mut block = <crate::packets::ObjectDeletePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDelete");
        let mut packet = <crate::packets::ObjectDuplicatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.shared_data.offset = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.shared_data.duplicate_flags = 0x1122_3344_u32;
        let mut block = <crate::packets::ObjectDuplicatePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDuplicate");
        let mut packet = <crate::packets::ObjectDuplicateOnRayPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.ray_start = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.ray_end = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.bypass_raycast = true;
        packet.agent_data.ray_end_is_intersection = true;
        packet.agent_data.copy_centers = true;
        packet.agent_data.copy_rotates = true;
        packet.agent_data.ray_target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.duplicate_flags = 0x1122_3344_u32;
        let mut block = <crate::packets::ObjectDuplicateOnRayPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDuplicateOnRay");
        let mut packet = <crate::packets::ObjectScalePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectScalePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.scale = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectScale");
        let mut packet = <crate::packets::ObjectRotationPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectRotationPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.rotation = libremetaverse_types::Quaternion::identity();
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectRotation");
        let mut packet = <crate::packets::ObjectFlagUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.object_local_id = 0x1122_3344_u32;
        packet.agent_data.use_physics = true;
        packet.agent_data.is_temporary = true;
        packet.agent_data.is_phantom = true;
        packet.agent_data.casts_shadows = true;
        let mut block = <crate::packets::ObjectFlagUpdatePacketExtraPhysicsBlock as GeneratedBlock>::new_generated();
        block.physics_shape_type = 0xa5_u8;
        block.density = 1.5_f32;
        block.friction = 1.5_f32;
        block.restitution = 1.5_f32;
        block.gravity_multiplier = 1.5_f32;
        packet.extra_physics.push(block);
        assert_round_trip(&packet, "ObjectFlagUpdate");
        let mut packet = <crate::packets::ObjectClickActionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectClickActionPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.click_action = 0xa5_u8;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectClickAction");
        let mut packet = <crate::packets::ObjectImagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectImagePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.media_url = vec![0_u8, 1, 2, 0, 0xff];
        block.texture_entry = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectImage");
        let mut packet = <crate::packets::ObjectBypassModUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectBypassModUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.property_id = 0xa5_u8;
        block.value = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectBypassModUpdate");
        let mut packet = <crate::packets::ObjectMaterialPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectMaterialPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.material = 0xa5_u8;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectMaterial");
        let mut packet = <crate::packets::ObjectShapePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectShapePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.path_curve = 0xa5_u8;
        block.profile_curve = 0xa5_u8;
        block.path_begin = 0x1234_u16;
        block.path_end = 0x1234_u16;
        block.path_scale_x = 0xa5_u8;
        block.path_scale_y = 0xa5_u8;
        block.path_shear_x = 0xa5_u8;
        block.path_shear_y = 0xa5_u8;
        block.path_twist = -37_i8;
        block.path_twist_begin = -37_i8;
        block.path_radius_offset = -37_i8;
        block.path_taper_x = -37_i8;
        block.path_taper_y = -37_i8;
        block.path_revolutions = 0xa5_u8;
        block.path_skew = -37_i8;
        block.profile_begin = 0x1234_u16;
        block.profile_end = 0x1234_u16;
        block.profile_hollow = 0x1234_u16;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectShape");
        let mut packet = <crate::packets::ObjectExtraParamsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectExtraParamsPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.param_type = 0x1234_u16;
        block.param_in_use = true;
        block.param_size = 0x1122_3344_u32;
        block.param_data = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectExtraParams");
        let mut packet = <crate::packets::ObjectOwnerPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.override_ = true;
        packet.header_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectOwnerPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectOwner");
        let mut packet = <crate::packets::ObjectGroupPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectGroupPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectGroup");
        let mut packet = <crate::packets::ObjectBuyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.category_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectBuyPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectBuy");
        let mut packet = <crate::packets::BuyObjectInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "BuyObjectInventory");
        let mut packet = <crate::packets::DerezContainerPacket as GeneratedPacket>::new_generated();
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.delete = true;
        assert_round_trip(&packet, "DerezContainer");
        let mut packet = <crate::packets::ObjectPermissionsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.override_ = true;
        let mut block = <crate::packets::ObjectPermissionsPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.field = 0xa5_u8;
        block.set = 0xa5_u8;
        block.mask = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectPermissions");
        let mut packet = <crate::packets::ObjectSaleInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectSaleInfoPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.local_id = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectSaleInfo");
        let mut packet = <crate::packets::ObjectNamePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectNamePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.local_id = 0x1122_3344_u32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectName");
        let mut packet = <crate::packets::ObjectDescriptionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectDescriptionPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.local_id = 0x1122_3344_u32;
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDescription");
        let mut packet = <crate::packets::ObjectCategoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectCategoryPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.local_id = 0x1122_3344_u32;
        block.category = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectCategory");
        let mut packet = <crate::packets::ObjectSelectPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectSelectPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectSelect");
        let mut packet = <crate::packets::ObjectDeselectPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectDeselectPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDeselect");
        let mut packet = <crate::packets::ObjectAttachPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.attachment_point = 0xa5_u8;
        let mut block = <crate::packets::ObjectAttachPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.rotation = libremetaverse_types::Quaternion::identity();
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectAttach");
        let mut packet = <crate::packets::ObjectDetachPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectDetachPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDetach");
        let mut packet = <crate::packets::ObjectDropPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectDropPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDrop");
        let mut packet = <crate::packets::ObjectLinkPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectLinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectLink");
        let mut packet = <crate::packets::ObjectDelinkPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectDelinkPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectDelink");
        let mut packet = <crate::packets::ObjectGrabPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.local_id = 0x1122_3344_u32;
        packet.object_data.grab_offset = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        let mut block = <crate::packets::ObjectGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
        block.uv_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.st_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.face_index = -0x1122_3344_i32;
        block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.normal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.binormal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.surface_info.push(block);
        assert_round_trip(&packet, "ObjectGrab");
        let mut packet = <crate::packets::ObjectGrabUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.grab_offset_initial = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.grab_position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.time_since_last = 0x1122_3344_u32;
        let mut block = <crate::packets::ObjectGrabUpdatePacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
        block.uv_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.st_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.face_index = -0x1122_3344_i32;
        block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.normal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.binormal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.surface_info.push(block);
        assert_round_trip(&packet, "ObjectGrabUpdate");
        let mut packet = <crate::packets::ObjectDeGrabPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.local_id = 0x1122_3344_u32;
        let mut block = <crate::packets::ObjectDeGrabPacketSurfaceInfoBlock as GeneratedBlock>::new_generated();
        block.uv_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.st_coord = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.face_index = -0x1122_3344_i32;
        block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.normal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.binormal = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.surface_info.push(block);
        assert_round_trip(&packet, "ObjectDeGrab");
        let mut packet = <crate::packets::ObjectSpinStartPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ObjectSpinStart");
        let mut packet = <crate::packets::ObjectSpinUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.rotation = libremetaverse_types::Quaternion::identity();
        assert_round_trip(&packet, "ObjectSpinUpdate");
        let mut packet = <crate::packets::ObjectSpinStopPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ObjectSpinStop");
        let mut packet = <crate::packets::ObjectExportSelectedPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.volume_detail = -0x1234_i16;
        let mut block = <crate::packets::ObjectExportSelectedPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectExportSelected");
        let mut packet = <crate::packets::ModifyLandPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.modify_block.action = 0xa5_u8;
        packet.modify_block.brush_size = 0xa5_u8;
        packet.modify_block.seconds = 1.5_f32;
        packet.modify_block.height = 1.5_f32;
        let mut block = <crate::packets::ModifyLandPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.local_id = -0x1122_3344_i32;
        block.west = 1.5_f32;
        block.south = 1.5_f32;
        block.east = 1.5_f32;
        block.north = 1.5_f32;
        packet.parcel_data.push(block);
        let mut block = <crate::packets::ModifyLandPacketModifyBlockExtendedBlock as GeneratedBlock>::new_generated();
        block.brush_size = 1.5_f32;
        packet.modify_block_extended.push(block);
        assert_round_trip(&packet, "ModifyLand");
        let mut packet = <crate::packets::VelocityInterpolateOnPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "VelocityInterpolateOn");
        let mut packet = <crate::packets::VelocityInterpolateOffPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "VelocityInterpolateOff");
        let mut packet = <crate::packets::StateSavePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.filename = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "StateSave");
        let mut packet = <crate::packets::ReportAutosaveCrashPacket as GeneratedPacket>::new_generated();
        packet.autosave_data.pid = -0x1122_3344_i32;
        packet.autosave_data.status = -0x1122_3344_i32;
        assert_round_trip(&packet, "ReportAutosaveCrash");
        let mut packet = <crate::packets::SimWideDeletesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "SimWideDeletes");
        let mut packet = <crate::packets::TrackAgentPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.target_data.prey_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "TrackAgent");
        let mut packet = <crate::packets::ViewerStatsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.ip = 0x1122_3344_u32;
        packet.agent_data.start_time = 0x1122_3344_u32;
        packet.agent_data.run_time = 1.5_f32;
        packet.agent_data.sim_fps = 1.5_f32;
        packet.agent_data.fps = 1.5_f32;
        packet.agent_data.agents_in_view = 0xa5_u8;
        packet.agent_data.ping = 1.5_f32;
        packet.agent_data.meters_traveled = -2.25_f64;
        packet.agent_data.regions_visited = -0x1122_3344_i32;
        packet.agent_data.sys_ram = 0x1122_3344_u32;
        packet.agent_data.sys_os = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.sys_cpu = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.sys_gpu = vec![0_u8, 1, 2, 0, 0xff];
        packet.download_totals.world = 0x1122_3344_u32;
        packet.download_totals.objects = 0x1122_3344_u32;
        packet.download_totals.textures = 0x1122_3344_u32;
        for block in &mut packet.net_stats {
            block.bytes = 0x1122_3344_u32;
            block.packets = 0x1122_3344_u32;
            block.compressed = 0x1122_3344_u32;
            block.savings = 0x1122_3344_u32;
        }
        packet.fail_stats.send_packet = 0x1122_3344_u32;
        packet.fail_stats.dropped = 0x1122_3344_u32;
        packet.fail_stats.resent = 0x1122_3344_u32;
        packet.fail_stats.failed_resends = 0x1122_3344_u32;
        packet.fail_stats.off_circuit = 0x1122_3344_u32;
        packet.fail_stats.invalid = 0x1122_3344_u32;
        let mut block = <crate::packets::ViewerStatsPacketMiscStatsBlock as GeneratedBlock>::new_generated();
        block.type_ = 0x1122_3344_u32;
        block.value = -2.25_f64;
        packet.misc_stats.push(block);
        assert_round_trip(&packet, "ViewerStats");
        let mut packet = <crate::packets::ScriptAnswerYesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.questions = -0x1122_3344_i32;
        assert_round_trip(&packet, "ScriptAnswerYes");
        let mut packet = <crate::packets::UserReportPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.report_type = 0xa5_u8;
        packet.report_data.category = 0xa5_u8;
        packet.report_data.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.report_data.check_flags = 0xa5_u8;
        packet.report_data.screenshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.abuser_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.abuse_region_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.abuse_region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.report_data.summary = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.details = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.version_string = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "UserReport");
        let mut packet = <crate::packets::AlertMessagePacket as GeneratedPacket>::new_generated();
        packet.alert_data.message = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::AlertMessagePacketAlertInfoBlock as GeneratedBlock>::new_generated();
        block.message = vec![0_u8, 1, 2, 0, 0xff];
        block.extra_params = vec![0_u8, 1, 2, 0, 0xff];
        packet.alert_info.push(block);
        let mut block = <crate::packets::AlertMessagePacketAgentInfoBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_info.push(block);
        assert_round_trip(&packet, "AlertMessage");
        let mut packet = <crate::packets::AgentAlertMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.alert_data.modal = true;
        packet.alert_data.message = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AgentAlertMessage");
        let mut packet = <crate::packets::MeanCollisionAlertPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::MeanCollisionAlertPacketMeanCollisionBlock as GeneratedBlock>::new_generated();
        block.victim = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.perp = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.time = 0x1122_3344_u32;
        block.mag = 1.5_f32;
        block.type_ = 0xa5_u8;
        packet.mean_collision.push(block);
        assert_round_trip(&packet, "MeanCollisionAlert");
        let mut packet = <crate::packets::ViewerFrozenMessagePacket as GeneratedPacket>::new_generated();
        packet.frozen_data.data = true;
        assert_round_trip(&packet, "ViewerFrozenMessage");
        let mut packet = <crate::packets::HealthMessagePacket as GeneratedPacket>::new_generated();
        packet.health_data.health = 1.5_f32;
        assert_round_trip(&packet, "HealthMessage");
        let mut packet = <crate::packets::ChatFromSimulatorPacket as GeneratedPacket>::new_generated();
        packet.chat_data.from_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.chat_data.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.chat_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.chat_data.source_type = 0xa5_u8;
        packet.chat_data.chat_type = 0xa5_u8;
        packet.chat_data.audible = 0xa5_u8;
        packet.chat_data.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.chat_data.message = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ChatFromSimulator");
        let mut packet = <crate::packets::SimStatsPacket as GeneratedPacket>::new_generated();
        packet.region.region_x = 0x1122_3344_u32;
        packet.region.region_y = 0x1122_3344_u32;
        packet.region.region_flags = 0x1122_3344_u32;
        packet.region.object_capacity = 0x1122_3344_u32;
        let mut block = <crate::packets::SimStatsPacketStatBlock as GeneratedBlock>::new_generated();
        block.stat_id = 0x1122_3344_u32;
        block.stat_value = 1.5_f32;
        packet.stat.push(block);
        packet.pid_stat.pid = -0x1122_3344_i32;
        let mut block = <crate::packets::SimStatsPacketRegionInfoBlock as GeneratedBlock>::new_generated();
        block.region_flags_extended = 0x0102_0304_0506_0708_u64;
        packet.region_info.push(block);
        assert_round_trip(&packet, "SimStats");
        let mut packet = <crate::packets::RequestRegionInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RequestRegionInfo");
        let mut packet = <crate::packets::RegionInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info.estate_id = 0x1122_3344_u32;
        packet.region_info.parent_estate_id = 0x1122_3344_u32;
        packet.region_info.region_flags = 0x1122_3344_u32;
        packet.region_info.sim_access = 0xa5_u8;
        packet.region_info.max_agents = 0xa5_u8;
        packet.region_info.billable_factor = 1.5_f32;
        packet.region_info.object_bonus_factor = 1.5_f32;
        packet.region_info.water_height = 1.5_f32;
        packet.region_info.terrain_raise_limit = 1.5_f32;
        packet.region_info.terrain_lower_limit = 1.5_f32;
        packet.region_info.price_per_meter = -0x1122_3344_i32;
        packet.region_info.redirect_grid_x = -0x1122_3344_i32;
        packet.region_info.redirect_grid_y = -0x1122_3344_i32;
        packet.region_info.use_estate_sun = true;
        packet.region_info.sun_hour = 1.5_f32;
        packet.region_info2.product_sku = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info2.product_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info2.max_agents32 = 0x1122_3344_u32;
        packet.region_info2.hard_max_agents = 0x1122_3344_u32;
        packet.region_info2.hard_max_objects = 0x1122_3344_u32;
        let mut block = <crate::packets::RegionInfoPacketRegionInfo3Block as GeneratedBlock>::new_generated();
        block.region_flags_extended = 0x0102_0304_0506_0708_u64;
        packet.region_info3.push(block);
        let mut block = <crate::packets::RegionInfoPacketRegionInfo5Block as GeneratedBlock>::new_generated();
        block.chat_whisper_range = 1.5_f32;
        block.chat_normal_range = 1.5_f32;
        block.chat_shout_range = 1.5_f32;
        block.chat_whisper_offset = 1.5_f32;
        block.chat_normal_offset = 1.5_f32;
        block.chat_shout_offset = 1.5_f32;
        block.chat_flags = 0x1122_3344_u32;
        packet.region_info5.push(block);
        let mut block = <crate::packets::RegionInfoPacketCombatSettingsBlock as GeneratedBlock>::new_generated();
        block.combat_flags = 0x1122_3344_u32;
        block.on_death = 0xa5_u8;
        block.damage_throttle = 1.5_f32;
        block.regeneration_rate = 1.5_f32;
        block.invulnerabily_time = 1.5_f32;
        block.damage_limit = 1.5_f32;
        packet.combat_settings.push(block);
        assert_round_trip(&packet, "RegionInfo");
        let mut packet = <crate::packets::GodUpdateRegionInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info.estate_id = 0x1122_3344_u32;
        packet.region_info.parent_estate_id = 0x1122_3344_u32;
        packet.region_info.region_flags = 0x1122_3344_u32;
        packet.region_info.billable_factor = 1.5_f32;
        packet.region_info.price_per_meter = -0x1122_3344_i32;
        packet.region_info.redirect_grid_x = -0x1122_3344_i32;
        packet.region_info.redirect_grid_y = -0x1122_3344_i32;
        let mut block = <crate::packets::GodUpdateRegionInfoPacketRegionInfo2Block as GeneratedBlock>::new_generated();
        block.region_flags_extended = 0x0102_0304_0506_0708_u64;
        packet.region_info2.push(block);
        assert_round_trip(&packet, "GodUpdateRegionInfo");
        let mut packet = <crate::packets::NearestLandingRegionRequestPacket as GeneratedPacket>::new_generated();
        packet.requesting_region_data.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "NearestLandingRegionRequest");
        let mut packet = <crate::packets::NearestLandingRegionReplyPacket as GeneratedPacket>::new_generated();
        packet.landing_region_data.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "NearestLandingRegionReply");
        let mut packet = <crate::packets::NearestLandingRegionUpdatedPacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "NearestLandingRegionUpdated");
        let mut packet = <crate::packets::TeleportLandingStatusChangedPacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "TeleportLandingStatusChanged");
        let mut packet = <crate::packets::RegionHandshakePacket as GeneratedPacket>::new_generated();
        packet.region_info.region_flags = 0x1122_3344_u32;
        packet.region_info.sim_access = 0xa5_u8;
        packet.region_info.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info.sim_owner = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.is_estate_manager = true;
        packet.region_info.water_height = 1.5_f32;
        packet.region_info.billable_factor = 1.5_f32;
        packet.region_info.cache_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_base0 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_base1 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_base2 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_base3 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_detail0 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_detail1 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_detail2 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_detail3 = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.terrain_start_height00 = 1.5_f32;
        packet.region_info.terrain_start_height01 = 1.5_f32;
        packet.region_info.terrain_start_height10 = 1.5_f32;
        packet.region_info.terrain_start_height11 = 1.5_f32;
        packet.region_info.terrain_height_range00 = 1.5_f32;
        packet.region_info.terrain_height_range01 = 1.5_f32;
        packet.region_info.terrain_height_range10 = 1.5_f32;
        packet.region_info.terrain_height_range11 = 1.5_f32;
        packet.region_info2.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info3.cpu_class_id = -0x1122_3344_i32;
        packet.region_info3.cpu_ratio = -0x1122_3344_i32;
        packet.region_info3.colo_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info3.product_sku = vec![0_u8, 1, 2, 0, 0xff];
        packet.region_info3.product_name = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::RegionHandshakePacketRegionInfo4Block as GeneratedBlock>::new_generated();
        block.region_flags_extended = 0x0102_0304_0506_0708_u64;
        block.region_protocols = 0x0102_0304_0506_0708_u64;
        packet.region_info4.push(block);
        assert_round_trip(&packet, "RegionHandshake");
        let mut packet = <crate::packets::RegionHandshakeReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_info.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "RegionHandshakeReply");
        let mut packet = <crate::packets::SimulatorViewerTimeMessagePacket as GeneratedPacket>::new_generated();
        packet.time_info.usec_since_start = 0x0102_0304_0506_0708_u64;
        packet.time_info.sec_per_day = 0x1122_3344_u32;
        packet.time_info.sec_per_year = 0x1122_3344_u32;
        packet.time_info.sun_direction = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.time_info.sun_phase = 1.5_f32;
        packet.time_info.sun_ang_velocity = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "SimulatorViewerTimeMessage");
        let mut packet = <crate::packets::EnableSimulatorPacket as GeneratedPacket>::new_generated();
        packet.simulator_info.handle = 0x0102_0304_0506_0708_u64;
        packet.simulator_info.ip = 0x1122_3344_u32;
        packet.simulator_info.port = 0x1234_u16;
        assert_round_trip(&packet, "EnableSimulator");
        let packet = <crate::packets::DisableSimulatorPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "DisableSimulator");
        let mut packet = <crate::packets::TransferRequestPacket as GeneratedPacket>::new_generated();
        packet.transfer_info.transfer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transfer_info.channel_type = -0x1122_3344_i32;
        packet.transfer_info.source_type = -0x1122_3344_i32;
        packet.transfer_info.priority = 1.5_f32;
        packet.transfer_info.params = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "TransferRequest");
        let mut packet = <crate::packets::TransferInfoPacket as GeneratedPacket>::new_generated();
        packet.transfer_info.transfer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transfer_info.channel_type = -0x1122_3344_i32;
        packet.transfer_info.target_type = -0x1122_3344_i32;
        packet.transfer_info.status = -0x1122_3344_i32;
        packet.transfer_info.size = -0x1122_3344_i32;
        packet.transfer_info.params = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "TransferInfo");
        let mut packet = <crate::packets::TransferAbortPacket as GeneratedPacket>::new_generated();
        packet.transfer_info.transfer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transfer_info.channel_type = -0x1122_3344_i32;
        assert_round_trip(&packet, "TransferAbort");
        let mut packet = <crate::packets::RequestXferPacket as GeneratedPacket>::new_generated();
        packet.xfer_id.id = 0x0102_0304_0506_0708_u64;
        packet.xfer_id.filename = vec![0_u8, 1, 2, 0, 0xff];
        packet.xfer_id.file_path = 0xa5_u8;
        packet.xfer_id.delete_on_completion = true;
        packet.xfer_id.use_big_packets = true;
        packet.xfer_id.v_file_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.xfer_id.v_file_type = -0x1234_i16;
        assert_round_trip(&packet, "RequestXfer");
        let mut packet = <crate::packets::AbortXferPacket as GeneratedPacket>::new_generated();
        packet.xfer_id.id = 0x0102_0304_0506_0708_u64;
        packet.xfer_id.result = -0x1122_3344_i32;
        assert_round_trip(&packet, "AbortXfer");
        let mut packet = <crate::packets::AvatarAppearancePacket as GeneratedPacket>::new_generated();
        packet.sender.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sender.is_trial = true;
        packet.object_data.texture_entry = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::AvatarAppearancePacketVisualParamBlock as GeneratedBlock>::new_generated();
        block.param_value = 0xa5_u8;
        packet.visual_param.push(block);
        let mut block = <crate::packets::AvatarAppearancePacketAppearanceDataBlock as GeneratedBlock>::new_generated();
        block.appearance_version = 0xa5_u8;
        block.cof_version = -0x1122_3344_i32;
        block.flags = 0x1122_3344_u32;
        packet.appearance_data.push(block);
        let mut block = <crate::packets::AvatarAppearancePacketAppearanceHoverBlock as GeneratedBlock>::new_generated();
        block.hover_height = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.appearance_hover.push(block);
        let mut block = <crate::packets::AvatarAppearancePacketAttachmentBlockBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.attachment_point = 0xa5_u8;
        packet.attachment_block.push(block);
        assert_round_trip(&packet, "AvatarAppearance");
        let mut packet = <crate::packets::SetFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::SetFollowCamPropertiesPacketCameraPropertyBlock as GeneratedBlock>::new_generated();
        block.type_ = -0x1122_3344_i32;
        block.value = 1.5_f32;
        packet.camera_property.push(block);
        assert_round_trip(&packet, "SetFollowCamProperties");
        let mut packet = <crate::packets::ClearFollowCamPropertiesPacket as GeneratedPacket>::new_generated();
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ClearFollowCamProperties");
        let mut packet = <crate::packets::RequestPayPricePacket as GeneratedPacket>::new_generated();
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RequestPayPrice");
        let mut packet = <crate::packets::PayPriceReplyPacket as GeneratedPacket>::new_generated();
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.default_pay_price = -0x1122_3344_i32;
        let mut block = <crate::packets::PayPriceReplyPacketButtonDataBlock as GeneratedBlock>::new_generated();
        block.pay_button = -0x1122_3344_i32;
        packet.button_data.push(block);
        assert_round_trip(&packet, "PayPriceReply");
        let mut packet = <crate::packets::KickUserPacket as GeneratedPacket>::new_generated();
        packet.target_block.target_ip = 0x1122_3344_u32;
        packet.target_block.target_port = 0x1234_u16;
        packet.user_info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.reason = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "KickUser");
        let mut packet = <crate::packets::KickUserAckPacket as GeneratedPacket>::new_generated();
        packet.user_info.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "KickUserAck");
        let mut packet = <crate::packets::GodKickUserPacket as GeneratedPacket>::new_generated();
        packet.user_info.god_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.god_session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_info.kick_flags = 0x1122_3344_u32;
        packet.user_info.reason = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "GodKickUser");
        let mut packet = <crate::packets::SystemKickUserPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::SystemKickUserPacketAgentInfoBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_info.push(block);
        assert_round_trip(&packet, "SystemKickUser");
        let mut packet = <crate::packets::EjectUserPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "EjectUser");
        let mut packet = <crate::packets::FreezeUserPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "FreezeUser");
        let mut packet = <crate::packets::AvatarPropertiesRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AvatarPropertiesRequest");
        let mut packet = <crate::packets::AvatarPropertiesRequestBackendPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.god_level = 0xa5_u8;
        packet.agent_data.web_profiles_disabled = true;
        assert_round_trip(&packet, "AvatarPropertiesRequestBackend");
        let mut packet = <crate::packets::AvatarPropertiesReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.fl_image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.partner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.about_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.fl_about_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.born_on = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.profile_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.charter_member = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "AvatarPropertiesReply");
        let mut packet = <crate::packets::AvatarInterestsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.want_to_mask = 0x1122_3344_u32;
        packet.properties_data.want_to_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.skills_mask = 0x1122_3344_u32;
        packet.properties_data.skills_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.languages_text = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarInterestsReply");
        let mut packet = <crate::packets::AvatarGroupsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.avatar_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AvatarGroupsReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
        block.group_powers = 0x0102_0304_0506_0708_u64;
        block.accept_notices = true;
        block.group_title = vec![0_u8, 1, 2, 0, 0xff];
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_name = vec![0_u8, 1, 2, 0, 0xff];
        block.group_insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.push(block);
        packet.new_group_data.list_in_profile = true;
        assert_round_trip(&packet, "AvatarGroupsReply");
        let mut packet = <crate::packets::AvatarPropertiesUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.fl_image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.about_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.fl_about_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.allow_publish = true;
        packet.properties_data.mature_publish = true;
        packet.properties_data.profile_url = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarPropertiesUpdate");
        let mut packet = <crate::packets::AvatarInterestsUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.properties_data.want_to_mask = 0x1122_3344_u32;
        packet.properties_data.want_to_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.skills_mask = 0x1122_3344_u32;
        packet.properties_data.skills_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.properties_data.languages_text = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarInterestsUpdate");
        let mut packet = <crate::packets::AvatarNotesReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.notes = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarNotesReply");
        let mut packet = <crate::packets::AvatarNotesUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.notes = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AvatarNotesUpdate");
        let mut packet = <crate::packets::AvatarPicksReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AvatarPicksReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.pick_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.pick_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.push(block);
        assert_round_trip(&packet, "AvatarPicksReply");
        let mut packet = <crate::packets::EventInfoRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "EventInfoRequest");
        let mut packet = <crate::packets::EventInfoReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        packet.event_data.creator = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.category = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.date = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.date_utc = 0x1122_3344_u32;
        packet.event_data.duration = 0x1122_3344_u32;
        packet.event_data.cover = 0x1122_3344_u32;
        packet.event_data.amount = 0x1122_3344_u32;
        packet.event_data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.event_data.global_pos = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.event_data.event_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "EventInfoReply");
        let mut packet = <crate::packets::EventNotificationAddRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "EventNotificationAddRequest");
        let mut packet = <crate::packets::EventNotificationRemoveRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "EventNotificationRemoveRequest");
        let mut packet = <crate::packets::EventGodDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.query_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.query_data.query_flags = 0x1122_3344_u32;
        packet.query_data.query_start = -0x1122_3344_i32;
        assert_round_trip(&packet, "EventGodDelete");
        let mut packet = <crate::packets::PickInfoReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pick_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.top_pick = true;
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.user = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.original_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.pos_global = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.sort_order = -0x1122_3344_i32;
        packet.data.enabled = true;
        assert_round_trip(&packet, "PickInfoReply");
        let mut packet = <crate::packets::PickInfoUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pick_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.top_pick = true;
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pos_global = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.sort_order = -0x1122_3344_i32;
        packet.data.enabled = true;
        assert_round_trip(&packet, "PickInfoUpdate");
        let mut packet = <crate::packets::PickDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pick_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "PickDelete");
        let mut packet = <crate::packets::PickGodDeletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.pick_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "PickGodDelete");
        let mut packet = <crate::packets::ScriptQuestionPacket as GeneratedPacket>::new_generated();
        packet.data.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.object_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.object_owner = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.questions = -0x1122_3344_i32;
        packet.experience.experience_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ScriptQuestion");
        let mut packet = <crate::packets::ScriptControlChangePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ScriptControlChangePacketDataBlock as GeneratedBlock>::new_generated();
        block.take_controls = true;
        block.controls = 0x1122_3344_u32;
        block.pass_to_agent = true;
        packet.data.push(block);
        assert_round_trip(&packet, "ScriptControlChange");
        let mut packet = <crate::packets::ScriptDialogPacket as GeneratedPacket>::new_generated();
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.first_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.last_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.object_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.chat_channel = -0x1122_3344_i32;
        packet.data.image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ScriptDialogPacketButtonsBlock as GeneratedBlock>::new_generated();
        block.button_label = vec![0_u8, 1, 2, 0, 0xff];
        packet.buttons.push(block);
        let mut block = <crate::packets::ScriptDialogPacketOwnerDataBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.owner_data.push(block);
        assert_round_trip(&packet, "ScriptDialog");
        let mut packet = <crate::packets::ScriptDialogReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.chat_channel = -0x1122_3344_i32;
        packet.data.button_index = -0x1122_3344_i32;
        packet.data.button_label = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ScriptDialogReply");
        let mut packet = <crate::packets::ForceScriptControlReleasePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ForceScriptControlRelease");
        let mut packet = <crate::packets::RevokePermissionsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.object_permissions = 0x1122_3344_u32;
        assert_round_trip(&packet, "RevokePermissions");
        let mut packet = <crate::packets::LoadURLPacket as GeneratedPacket>::new_generated();
        packet.data.object_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.owner_is_group = true;
        packet.data.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.url = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "LoadURL");
        let mut packet = <crate::packets::ScriptTeleportRequestPacket as GeneratedPacket>::new_generated();
        packet.data.object_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.sim_position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        let mut block = <crate::packets::ScriptTeleportRequestPacketOptionsBlock as GeneratedBlock>::new_generated();
        block.flags = 0x1122_3344_u32;
        packet.options.push(block);
        assert_round_trip(&packet, "ScriptTeleportRequest");
        let mut packet = <crate::packets::ParcelOverlayPacket as GeneratedPacket>::new_generated();
        packet.parcel_data.sequence_id = -0x1122_3344_i32;
        packet.parcel_data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ParcelOverlay");
        let mut packet = <crate::packets::ParcelPropertiesRequestByIDPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.sequence_id = -0x1122_3344_i32;
        packet.parcel_data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelPropertiesRequestByID");
        let mut packet = <crate::packets::ParcelPropertiesUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.flags = 0x1122_3344_u32;
        packet.parcel_data.parcel_flags = 0x1122_3344_u32;
        packet.parcel_data.sale_price = -0x1122_3344_i32;
        packet.parcel_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.music_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.media_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.media_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.media_auto_scale = 0xa5_u8;
        packet.parcel_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.pass_price = -0x1122_3344_i32;
        packet.parcel_data.pass_hours = 1.5_f32;
        packet.parcel_data.category = 0xa5_u8;
        packet.parcel_data.auth_buyer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.user_location = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.user_look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.landing_type = 0xa5_u8;
        assert_round_trip(&packet, "ParcelPropertiesUpdate");
        let mut packet = <crate::packets::ParcelReturnObjectsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.return_type = 0x1122_3344_u32;
        let mut block = <crate::packets::ParcelReturnObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
        block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.task_i_ds.push(block);
        let mut block = <crate::packets::ParcelReturnObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.owner_i_ds.push(block);
        assert_round_trip(&packet, "ParcelReturnObjects");
        let mut packet = <crate::packets::ParcelSetOtherCleanTimePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.other_clean_time = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelSetOtherCleanTime");
        let mut packet = <crate::packets::ParcelDisableObjectsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.return_type = 0x1122_3344_u32;
        let mut block = <crate::packets::ParcelDisableObjectsPacketTaskIDsBlock as GeneratedBlock>::new_generated();
        block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.task_i_ds.push(block);
        let mut block = <crate::packets::ParcelDisableObjectsPacketOwnerIDsBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.owner_i_ds.push(block);
        assert_round_trip(&packet, "ParcelDisableObjects");
        let mut packet = <crate::packets::ParcelSelectObjectsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.return_type = 0x1122_3344_u32;
        let mut block = <crate::packets::ParcelSelectObjectsPacketReturnIDsBlock as GeneratedBlock>::new_generated();
        block.return_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.return_i_ds.push(block);
        assert_round_trip(&packet, "ParcelSelectObjects");
        let mut packet = <crate::packets::EstateCovenantRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "EstateCovenantRequest");
        let mut packet = <crate::packets::EstateCovenantReplyPacket as GeneratedPacket>::new_generated();
        packet.data.covenant_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.covenant_timestamp = 0x1122_3344_u32;
        packet.data.estate_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.estate_owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "EstateCovenantReply");
        let mut packet = <crate::packets::ForceObjectSelectPacket as GeneratedPacket>::new_generated();
        packet.header.reset_list = true;
        let mut block = <crate::packets::ForceObjectSelectPacketDataBlock as GeneratedBlock>::new_generated();
        block.local_id = 0x1122_3344_u32;
        packet.data.push(block);
        assert_round_trip(&packet, "ForceObjectSelect");
        let mut packet = <crate::packets::ParcelBuyPassPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelBuyPass");
        let mut packet = <crate::packets::ParcelDeedToGroupPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelDeedToGroup");
        let mut packet = <crate::packets::ParcelReclaimPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelReclaim");
        let mut packet = <crate::packets::ParcelClaimPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.is_group_owned = true;
        packet.data.final_ = true;
        let mut block = <crate::packets::ParcelClaimPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.west = 1.5_f32;
        block.south = 1.5_f32;
        block.east = 1.5_f32;
        block.north = 1.5_f32;
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "ParcelClaim");
        let mut packet = <crate::packets::ParcelJoinPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.west = 1.5_f32;
        packet.parcel_data.south = 1.5_f32;
        packet.parcel_data.east = 1.5_f32;
        packet.parcel_data.north = 1.5_f32;
        assert_round_trip(&packet, "ParcelJoin");
        let mut packet = <crate::packets::ParcelDividePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.west = 1.5_f32;
        packet.parcel_data.south = 1.5_f32;
        packet.parcel_data.east = 1.5_f32;
        packet.parcel_data.north = 1.5_f32;
        assert_round_trip(&packet, "ParcelDivide");
        let mut packet = <crate::packets::ParcelReleasePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelRelease");
        let mut packet = <crate::packets::ParcelBuyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.is_group_owned = true;
        packet.data.remove_contribution = true;
        packet.data.local_id = -0x1122_3344_i32;
        packet.data.final_ = true;
        packet.parcel_data.price = -0x1122_3344_i32;
        packet.parcel_data.area = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelBuy");
        let mut packet = <crate::packets::ParcelGodForceOwnerPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelGodForceOwner");
        let mut packet = <crate::packets::ParcelAccessListRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.sequence_id = -0x1122_3344_i32;
        packet.data.flags = 0x1122_3344_u32;
        packet.data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelAccessListRequest");
        let mut packet = <crate::packets::ParcelAccessListReplyPacket as GeneratedPacket>::new_generated();
        packet.data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.sequence_id = -0x1122_3344_i32;
        packet.data.flags = 0x1122_3344_u32;
        packet.data.local_id = -0x1122_3344_i32;
        let mut block = <crate::packets::ParcelAccessListReplyPacketListBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.time = -0x1122_3344_i32;
        block.flags = 0x1122_3344_u32;
        packet.list.push(block);
        assert_round_trip(&packet, "ParcelAccessListReply");
        let mut packet = <crate::packets::ParcelAccessListUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.flags = 0x1122_3344_u32;
        packet.data.local_id = -0x1122_3344_i32;
        packet.data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.sequence_id = -0x1122_3344_i32;
        packet.data.sections = -0x1122_3344_i32;
        let mut block = <crate::packets::ParcelAccessListUpdatePacketListBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.time = -0x1122_3344_i32;
        block.flags = 0x1122_3344_u32;
        packet.list.push(block);
        assert_round_trip(&packet, "ParcelAccessListUpdate");
        let mut packet = <crate::packets::ParcelDwellRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ParcelDwellRequest");
        let mut packet = <crate::packets::ParcelDwellReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.local_id = -0x1122_3344_i32;
        packet.data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.dwell = 1.5_f32;
        assert_round_trip(&packet, "ParcelDwellReply");
        let mut packet = <crate::packets::RequestParcelTransferPacket as GeneratedPacket>::new_generated();
        packet.data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.transaction_time = 0x1122_3344_u32;
        packet.data.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.flags = 0xa5_u8;
        packet.data.transaction_type = -0x1122_3344_i32;
        packet.data.amount = -0x1122_3344_i32;
        packet.data.billable_area = -0x1122_3344_i32;
        packet.data.actual_area = -0x1122_3344_i32;
        packet.data.final_ = true;
        packet.region_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_data.grid_x = 0x1122_3344_u32;
        packet.region_data.grid_y = 0x1122_3344_u32;
        assert_round_trip(&packet, "RequestParcelTransfer");
        let mut packet = <crate::packets::UpdateParcelPacket as GeneratedPacket>::new_generated();
        packet.parcel_data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.parcel_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.group_owned = true;
        packet.parcel_data.status = 0xa5_u8;
        packet.parcel_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.music_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.region_x = 1.5_f32;
        packet.parcel_data.region_y = 1.5_f32;
        packet.parcel_data.actual_area = -0x1122_3344_i32;
        packet.parcel_data.billable_area = -0x1122_3344_i32;
        packet.parcel_data.show_dir = true;
        packet.parcel_data.is_for_sale = true;
        packet.parcel_data.category = 0xa5_u8;
        packet.parcel_data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.user_location = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.sale_price = -0x1122_3344_i32;
        packet.parcel_data.authorized_buyer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.allow_publish = true;
        packet.parcel_data.mature_publish = true;
        assert_round_trip(&packet, "UpdateParcel");
        let mut packet = <crate::packets::RemoveParcelPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::RemoveParcelPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "RemoveParcel");
        let mut packet = <crate::packets::MergeParcelPacket as GeneratedPacket>::new_generated();
        packet.master_parcel_data.master_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::MergeParcelPacketSlaveParcelDataBlock as GeneratedBlock>::new_generated();
        block.slave_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.slave_parcel_data.push(block);
        assert_round_trip(&packet, "MergeParcel");
        let mut packet = <crate::packets::LogParcelChangesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        let mut block = <crate::packets::LogParcelChangesPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.is_owner_group = true;
        block.actual_area = -0x1122_3344_i32;
        block.action = -37_i8;
        block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "LogParcelChanges");
        let mut packet = <crate::packets::CheckParcelSalesPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::CheckParcelSalesPacketRegionDataBlock as GeneratedBlock>::new_generated();
        block.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.push(block);
        assert_round_trip(&packet, "CheckParcelSales");
        let mut packet = <crate::packets::ParcelSalesPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ParcelSalesPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.buyer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "ParcelSales");
        let mut packet = <crate::packets::ParcelGodMarkAsContentPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "ParcelGodMarkAsContent");
        let mut packet = <crate::packets::ViewerStartAuctionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ViewerStartAuction");
        let mut packet = <crate::packets::StartAuctionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "StartAuction");
        let mut packet = <crate::packets::ConfirmAuctionStartPacket as GeneratedPacket>::new_generated();
        packet.auction_data.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.auction_data.auction_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "ConfirmAuctionStart");
        let mut packet = <crate::packets::CompleteAuctionPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::CompleteAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "CompleteAuction");
        let mut packet = <crate::packets::CancelAuctionPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::CancelAuctionPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "CancelAuction");
        let mut packet = <crate::packets::CheckParcelAuctionsPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::CheckParcelAuctionsPacketRegionDataBlock as GeneratedBlock>::new_generated();
        block.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.push(block);
        assert_round_trip(&packet, "CheckParcelAuctions");
        let mut packet = <crate::packets::ParcelAuctionsPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ParcelAuctionsPacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.winner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "ParcelAuctions");
        let mut packet = <crate::packets::UUIDNameRequestPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::UUIDNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.uuid_name_block.push(block);
        assert_round_trip(&packet, "UUIDNameRequest");
        let mut packet = <crate::packets::UUIDNameReplyPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::UUIDNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.first_name = vec![0_u8, 1, 2, 0, 0xff];
        block.last_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.uuid_name_block.push(block);
        assert_round_trip(&packet, "UUIDNameReply");
        let mut packet = <crate::packets::UUIDGroupNameRequestPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::UUIDGroupNameRequestPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.uuid_name_block.push(block);
        assert_round_trip(&packet, "UUIDGroupNameRequest");
        let mut packet = <crate::packets::UUIDGroupNameReplyPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::UUIDGroupNameReplyPacketUUIDNameBlockBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.uuid_name_block.push(block);
        assert_round_trip(&packet, "UUIDGroupNameReply");
        let mut packet = <crate::packets::ChatPassPacket as GeneratedPacket>::new_generated();
        packet.chat_data.channel = -0x1122_3344_i32;
        packet.chat_data.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.chat_data.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.chat_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.chat_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.chat_data.source_type = 0xa5_u8;
        packet.chat_data.type_ = 0xa5_u8;
        packet.chat_data.radius = 1.5_f32;
        packet.chat_data.sim_access = 0xa5_u8;
        packet.chat_data.message = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ChatPass");
        let mut packet = <crate::packets::ChildAgentDyingPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ChildAgentDying");
        let mut packet = <crate::packets::ChildAgentUnknownPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ChildAgentUnknown");
        let mut packet = <crate::packets::KillChildAgentsPacket as GeneratedPacket>::new_generated();
        packet.id_block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "KillChildAgents");
        let mut packet = <crate::packets::GetScriptRunningPacket as GeneratedPacket>::new_generated();
        packet.script.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GetScriptRunning");
        let mut packet = <crate::packets::ScriptRunningReplyPacket as GeneratedPacket>::new_generated();
        packet.script.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.running = true;
        assert_round_trip(&packet, "ScriptRunningReply");
        let mut packet = <crate::packets::SetScriptRunningPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.running = true;
        assert_round_trip(&packet, "SetScriptRunning");
        let mut packet = <crate::packets::ScriptResetPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.script.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ScriptReset");
        let mut packet = <crate::packets::ScriptSensorRequestPacket as GeneratedPacket>::new_generated();
        packet.requester.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.requester.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.requester.search_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.requester.search_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.requester.search_dir = libremetaverse_types::Quaternion::identity();
        packet.requester.search_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.requester.type_ = -0x1122_3344_i32;
        packet.requester.range = 1.5_f32;
        packet.requester.arc = 1.5_f32;
        packet.requester.region_handle = 0x0102_0304_0506_0708_u64;
        packet.requester.search_regions = 0xa5_u8;
        assert_round_trip(&packet, "ScriptSensorRequest");
        let mut packet = <crate::packets::ScriptSensorReplyPacket as GeneratedPacket>::new_generated();
        packet.requester.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ScriptSensorReplyPacketSensedDataBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.velocity = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.rotation = libremetaverse_types::Quaternion::identity();
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.type_ = -0x1122_3344_i32;
        block.range = 1.5_f32;
        packet.sensed_data.push(block);
        assert_round_trip(&packet, "ScriptSensorReply");
        let mut packet = <crate::packets::CompleteAgentMovementPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.circuit_code = 0x1122_3344_u32;
        assert_round_trip(&packet, "CompleteAgentMovement");
        let mut packet = <crate::packets::AgentMovementCompletePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.data.timestamp = 0x1122_3344_u32;
        packet.sim_data.channel_version = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AgentMovementComplete");
        let mut packet = <crate::packets::DataServerLogoutPacket as GeneratedPacket>::new_generated();
        packet.user_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_data.viewer_ip = 0x1122_3344_u32;
        packet.user_data.disconnect = true;
        packet.user_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "DataServerLogout");
        let mut packet = <crate::packets::LogoutRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "LogoutRequest");
        let mut packet = <crate::packets::LogoutReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::LogoutReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "LogoutReply");
        let mut packet = <crate::packets::ImprovedInstantMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.from_group = true;
        packet.message_block.to_agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.parent_estate_id = 0x1122_3344_u32;
        packet.message_block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.message_block.offline = 0xa5_u8;
        packet.message_block.dialog = 0xa5_u8;
        packet.message_block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.message_block.timestamp = 0x1122_3344_u32;
        packet.message_block.from_agent_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.message_block.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.message_block.binary_bucket = vec![0_u8, 1, 2, 0, 0xff];
        packet.estate_block.estate_id = 0x1122_3344_u32;
        let mut block = <crate::packets::ImprovedInstantMessagePacketMetaDataBlock as GeneratedBlock>::new_generated();
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        packet.meta_data.push(block);
        assert_round_trip(&packet, "ImprovedInstantMessage");
        let mut packet = <crate::packets::RetrieveInstantMessagesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RetrieveInstantMessages");
        let mut packet = <crate::packets::FindAgentPacket as GeneratedPacket>::new_generated();
        packet.agent_block.hunter = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.prey = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.space_ip = 0x1122_3344_u32;
        let mut block = <crate::packets::FindAgentPacketLocationBlockBlock as GeneratedBlock>::new_generated();
        block.global_x = -2.25_f64;
        block.global_y = -2.25_f64;
        packet.location_block.push(block);
        assert_round_trip(&packet, "FindAgent");
        let mut packet = <crate::packets::RequestGodlikePowersPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.request_block.godlike = true;
        packet.request_block.token = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RequestGodlikePowers");
        let mut packet = <crate::packets::GrantGodlikePowersPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.grant_data.god_level = 0xa5_u8;
        packet.grant_data.token = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GrantGodlikePowers");
        let mut packet = <crate::packets::GodlikeMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.method_data.method = vec![0_u8, 1, 2, 0, 0xff];
        packet.method_data.invoice = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GodlikeMessagePacketParamListBlock as GeneratedBlock>::new_generated();
        block.parameter = vec![0_u8, 1, 2, 0, 0xff];
        packet.param_list.push(block);
        assert_round_trip(&packet, "GodlikeMessage");
        let mut packet = <crate::packets::EstateOwnerMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.method_data.method = vec![0_u8, 1, 2, 0, 0xff];
        packet.method_data.invoice = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::EstateOwnerMessagePacketParamListBlock as GeneratedBlock>::new_generated();
        block.parameter = vec![0_u8, 1, 2, 0, 0xff];
        packet.param_list.push(block);
        assert_round_trip(&packet, "EstateOwnerMessage");
        let mut packet = <crate::packets::GenericMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.method_data.method = vec![0_u8, 1, 2, 0, 0xff];
        packet.method_data.invoice = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
        block.parameter = vec![0_u8, 1, 2, 0, 0xff];
        packet.param_list.push(block);
        assert_round_trip(&packet, "GenericMessage");
        let mut packet = <crate::packets::LargeGenericMessagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.method_data.method = vec![0_u8, 1, 2, 0, 0xff];
        packet.method_data.invoice = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::LargeGenericMessagePacketParamListBlock as GeneratedBlock>::new_generated();
        block.parameter = vec![0_u8, 1, 2, 0, 0xff];
        packet.param_list.push(block);
        assert_round_trip(&packet, "LargeGenericMessage");
        let mut packet = <crate::packets::MuteListRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.mute_crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "MuteListRequest");
        let mut packet = <crate::packets::UpdateMuteListEntryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.mute_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.mute_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.mute_data.mute_type = -0x1122_3344_i32;
        packet.mute_data.mute_flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "UpdateMuteListEntry");
        let mut packet = <crate::packets::RemoveMuteListEntryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.mute_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.mute_name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RemoveMuteListEntry");
        let mut packet = <crate::packets::CopyInventoryFromNotecardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.notecard_data.notecard_item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.notecard_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::CopyInventoryFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "CopyInventoryFromNotecard");
        let mut packet = <crate::packets::UpdateInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::UpdateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.callback_id = 0x1122_3344_u32;
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.group_owned = true;
        block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.inv_type = -37_i8;
        block.flags = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.creation_date = -0x1122_3344_i32;
        block.crc = 0x1122_3344_u32;
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "UpdateInventoryItem");
        let mut packet = <crate::packets::UpdateCreateInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.sim_approved = true;
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::UpdateCreateInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.callback_id = 0x1122_3344_u32;
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.group_owned = true;
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.inv_type = -37_i8;
        block.flags = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.creation_date = -0x1122_3344_i32;
        block.crc = 0x1122_3344_u32;
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "UpdateCreateInventoryItem");
        let mut packet = <crate::packets::MoveInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.stamp = true;
        let mut block = <crate::packets::MoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.new_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "MoveInventoryItem");
        let mut packet = <crate::packets::CopyInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::CopyInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.callback_id = 0x1122_3344_u32;
        block.old_agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.old_item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.new_folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.new_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "CopyInventoryItem");
        let mut packet = <crate::packets::RemoveInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RemoveInventoryItemPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "RemoveInventoryItem");
        let mut packet = <crate::packets::ChangeInventoryItemFlagsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ChangeInventoryItemFlagsPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.flags = 0x1122_3344_u32;
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "ChangeInventoryItemFlags");
        let mut packet = <crate::packets::SaveAssetIntoInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.new_asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "SaveAssetIntoInventory");
        let mut packet = <crate::packets::CreateInventoryFolderPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.type_ = -37_i8;
        packet.folder_data.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "CreateInventoryFolder");
        let mut packet = <crate::packets::UpdateInventoryFolderPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::UpdateInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.folder_data.push(block);
        assert_round_trip(&packet, "UpdateInventoryFolder");
        let mut packet = <crate::packets::MoveInventoryFolderPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.stamp = true;
        let mut block = <crate::packets::MoveInventoryFolderPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "MoveInventoryFolder");
        let mut packet = <crate::packets::RemoveInventoryFolderPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RemoveInventoryFolderPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.push(block);
        assert_round_trip(&packet, "RemoveInventoryFolder");
        let mut packet = <crate::packets::FetchInventoryDescendentsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.sort_order = -0x1122_3344_i32;
        packet.inventory_data.fetch_folders = true;
        packet.inventory_data.fetch_items = true;
        assert_round_trip(&packet, "FetchInventoryDescendents");
        let mut packet = <crate::packets::InventoryDescendentsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.version = -0x1122_3344_i32;
        packet.agent_data.descendents = -0x1122_3344_i32;
        let mut block = <crate::packets::InventoryDescendentsPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.folder_data.push(block);
        let mut block = <crate::packets::InventoryDescendentsPacketItemDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.group_owned = true;
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.inv_type = -37_i8;
        block.flags = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.creation_date = -0x1122_3344_i32;
        block.crc = 0x1122_3344_u32;
        packet.item_data.push(block);
        assert_round_trip(&packet, "InventoryDescendents");
        let mut packet = <crate::packets::FetchInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::FetchInventoryPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "FetchInventory");
        let mut packet = <crate::packets::FetchInventoryReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::FetchInventoryReplyPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.group_owned = true;
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.inv_type = -37_i8;
        block.flags = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.creation_date = -0x1122_3344_i32;
        block.crc = 0x1122_3344_u32;
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "FetchInventoryReply");
        let mut packet = <crate::packets::BulkUpdateInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::BulkUpdateInventoryPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.folder_data.push(block);
        let mut block = <crate::packets::BulkUpdateInventoryPacketItemDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.callback_id = 0x1122_3344_u32;
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.group_owned = true;
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        block.inv_type = -37_i8;
        block.flags = 0x1122_3344_u32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.creation_date = -0x1122_3344_i32;
        block.crc = 0x1122_3344_u32;
        packet.item_data.push(block);
        assert_round_trip(&packet, "BulkUpdateInventory");
        let mut packet = <crate::packets::RequestInventoryAssetPacket as GeneratedPacket>::new_generated();
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RequestInventoryAsset");
        let mut packet = <crate::packets::InventoryAssetResponsePacket as GeneratedPacket>::new_generated();
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.query_data.is_readable = true;
        assert_round_trip(&packet, "InventoryAssetResponse");
        let mut packet = <crate::packets::RemoveInventoryObjectsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RemoveInventoryObjectsPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.push(block);
        let mut block = <crate::packets::RemoveInventoryObjectsPacketItemDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.item_data.push(block);
        assert_round_trip(&packet, "RemoveInventoryObjects");
        let mut packet = <crate::packets::PurgeInventoryDescendentsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "PurgeInventoryDescendents");
        let mut packet = <crate::packets::UpdateTaskInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.update_data.local_id = 0x1122_3344_u32;
        packet.update_data.key = 0xa5_u8;
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.base_mask = 0x1122_3344_u32;
        packet.inventory_data.owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_mask = 0x1122_3344_u32;
        packet.inventory_data.everyone_mask = 0x1122_3344_u32;
        packet.inventory_data.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_owned = true;
        packet.inventory_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.type_ = -37_i8;
        packet.inventory_data.inv_type = -37_i8;
        packet.inventory_data.flags = 0x1122_3344_u32;
        packet.inventory_data.sale_type = 0xa5_u8;
        packet.inventory_data.sale_price = -0x1122_3344_i32;
        packet.inventory_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.creation_date = -0x1122_3344_i32;
        packet.inventory_data.crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "UpdateTaskInventory");
        let mut packet = <crate::packets::RemoveTaskInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.local_id = 0x1122_3344_u32;
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RemoveTaskInventory");
        let mut packet = <crate::packets::MoveTaskInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.local_id = 0x1122_3344_u32;
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "MoveTaskInventory");
        let mut packet = <crate::packets::RequestTaskInventoryPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.local_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "RequestTaskInventory");
        let mut packet = <crate::packets::ReplyTaskInventoryPacket as GeneratedPacket>::new_generated();
        packet.inventory_data.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.serial = -0x1234_i16;
        packet.inventory_data.filename = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ReplyTaskInventory");
        let mut packet = <crate::packets::DeRezObjectPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.destination = 0xa5_u8;
        packet.agent_block.destination_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.packet_count = 0xa5_u8;
        packet.agent_block.packet_number = 0xa5_u8;
        let mut block = <crate::packets::DeRezObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "DeRezObject");
        let mut packet = <crate::packets::DeRezAckPacket as GeneratedPacket>::new_generated();
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.success = true;
        assert_round_trip(&packet, "DeRezAck");
        let mut packet = <crate::packets::RezObjectPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.from_task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.bypass_raycast = 0xa5_u8;
        packet.rez_data.ray_start = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.rez_data.ray_end = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.rez_data.ray_target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.ray_end_is_intersection = true;
        packet.rez_data.rez_selected = true;
        packet.rez_data.remove_item = true;
        packet.rez_data.item_flags = 0x1122_3344_u32;
        packet.rez_data.group_mask = 0x1122_3344_u32;
        packet.rez_data.everyone_mask = 0x1122_3344_u32;
        packet.rez_data.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.base_mask = 0x1122_3344_u32;
        packet.inventory_data.owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_mask = 0x1122_3344_u32;
        packet.inventory_data.everyone_mask = 0x1122_3344_u32;
        packet.inventory_data.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_owned = true;
        packet.inventory_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.type_ = -37_i8;
        packet.inventory_data.inv_type = -37_i8;
        packet.inventory_data.flags = 0x1122_3344_u32;
        packet.inventory_data.sale_type = 0xa5_u8;
        packet.inventory_data.sale_price = -0x1122_3344_i32;
        packet.inventory_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.creation_date = -0x1122_3344_i32;
        packet.inventory_data.crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "RezObject");
        let mut packet = <crate::packets::RezObjectFromNotecardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.from_task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.bypass_raycast = 0xa5_u8;
        packet.rez_data.ray_start = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.rez_data.ray_end = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.rez_data.ray_target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.rez_data.ray_end_is_intersection = true;
        packet.rez_data.rez_selected = true;
        packet.rez_data.remove_item = true;
        packet.rez_data.item_flags = 0x1122_3344_u32;
        packet.rez_data.group_mask = 0x1122_3344_u32;
        packet.rez_data.everyone_mask = 0x1122_3344_u32;
        packet.rez_data.next_owner_mask = 0x1122_3344_u32;
        packet.notecard_data.notecard_item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.notecard_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RezObjectFromNotecardPacketInventoryDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.push(block);
        assert_round_trip(&packet, "RezObjectFromNotecard");
        let mut packet = <crate::packets::TransferInventoryPacket as GeneratedPacket>::new_generated();
        packet.info_block.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info_block.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::TransferInventoryPacketInventoryBlockBlock as GeneratedBlock>::new_generated();
        block.inventory_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = -37_i8;
        packet.inventory_block.push(block);
        packet.validation_block.needs_validation = true;
        packet.validation_block.estate_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "TransferInventory");
        let mut packet = <crate::packets::TransferInventoryAckPacket as GeneratedPacket>::new_generated();
        packet.info_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.info_block.inventory_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "TransferInventoryAck");
        let mut packet = <crate::packets::AcceptFriendshipPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AcceptFriendshipPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.push(block);
        assert_round_trip(&packet, "AcceptFriendship");
        let mut packet = <crate::packets::DeclineFriendshipPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "DeclineFriendship");
        let mut packet = <crate::packets::FormFriendshipPacket as GeneratedPacket>::new_generated();
        packet.agent_block.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "FormFriendship");
        let mut packet = <crate::packets::TerminateFriendshipPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.ex_block.other_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "TerminateFriendship");
        let mut packet = <crate::packets::OfferCallingCardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "OfferCallingCard");
        let mut packet = <crate::packets::AcceptCallingCardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AcceptCallingCardPacketFolderDataBlock as GeneratedBlock>::new_generated();
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.folder_data.push(block);
        assert_round_trip(&packet, "AcceptCallingCard");
        let mut packet = <crate::packets::DeclineCallingCardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "DeclineCallingCard");
        let mut packet = <crate::packets::RezScriptPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.update_block.object_local_id = 0x1122_3344_u32;
        packet.update_block.enabled = true;
        packet.inventory_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.base_mask = 0x1122_3344_u32;
        packet.inventory_block.owner_mask = 0x1122_3344_u32;
        packet.inventory_block.group_mask = 0x1122_3344_u32;
        packet.inventory_block.everyone_mask = 0x1122_3344_u32;
        packet.inventory_block.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_block.group_owned = true;
        packet.inventory_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.type_ = -37_i8;
        packet.inventory_block.inv_type = -37_i8;
        packet.inventory_block.flags = 0x1122_3344_u32;
        packet.inventory_block.sale_type = 0xa5_u8;
        packet.inventory_block.sale_price = -0x1122_3344_i32;
        packet.inventory_block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_block.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_block.creation_date = -0x1122_3344_i32;
        packet.inventory_block.crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "RezScript");
        let mut packet = <crate::packets::CreateInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.callback_id = 0x1122_3344_u32;
        packet.inventory_block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_block.type_ = -37_i8;
        packet.inventory_block.inv_type = -37_i8;
        packet.inventory_block.wearable_type = 0xa5_u8;
        packet.inventory_block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_block.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "CreateInventoryItem");
        let mut packet = <crate::packets::CreateLandmarkForEventPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        packet.inventory_block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "CreateLandmarkForEvent");
        let mut packet = <crate::packets::EventLocationRequestPacket as GeneratedPacket>::new_generated();
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.event_id = 0x1122_3344_u32;
        assert_round_trip(&packet, "EventLocationRequest");
        let mut packet = <crate::packets::EventLocationReplyPacket as GeneratedPacket>::new_generated();
        packet.query_data.query_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.success = true;
        packet.event_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.event_data.region_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "EventLocationReply");
        let mut packet = <crate::packets::RegionHandleRequestPacket as GeneratedPacket>::new_generated();
        packet.request_block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RegionHandleRequest");
        let mut packet = <crate::packets::RegionIDAndHandleReplyPacket as GeneratedPacket>::new_generated();
        packet.reply_block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.reply_block.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "RegionIDAndHandleReply");
        let mut packet = <crate::packets::MoneyTransferRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.flags = 0xa5_u8;
        packet.money_data.amount = -0x1122_3344_i32;
        packet.money_data.aggregate_perm_next_owner = 0xa5_u8;
        packet.money_data.aggregate_perm_inventory = 0xa5_u8;
        packet.money_data.transaction_type = -0x1122_3344_i32;
        packet.money_data.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "MoneyTransferRequest");
        let mut packet = <crate::packets::MoneyTransferBackendPacket as GeneratedPacket>::new_generated();
        packet.money_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_time = 0x1122_3344_u32;
        packet.money_data.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.flags = 0xa5_u8;
        packet.money_data.amount = -0x1122_3344_i32;
        packet.money_data.aggregate_perm_next_owner = 0xa5_u8;
        packet.money_data.aggregate_perm_inventory = 0xa5_u8;
        packet.money_data.transaction_type = -0x1122_3344_i32;
        packet.money_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.grid_x = 0x1122_3344_u32;
        packet.money_data.grid_y = 0x1122_3344_u32;
        packet.money_data.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "MoneyTransferBackend");
        let mut packet = <crate::packets::MoneyBalanceRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "MoneyBalanceRequest");
        let mut packet = <crate::packets::MoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
        packet.money_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_success = true;
        packet.money_data.money_balance = -0x1122_3344_i32;
        packet.money_data.square_meters_credit = -0x1122_3344_i32;
        packet.money_data.square_meters_committed = -0x1122_3344_i32;
        packet.money_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.transaction_info.transaction_type = -0x1122_3344_i32;
        packet.transaction_info.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_info.is_source_group = true;
        packet.transaction_info.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_info.is_dest_group = true;
        packet.transaction_info.amount = -0x1122_3344_i32;
        packet.transaction_info.item_description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "MoneyBalanceReply");
        let mut packet = <crate::packets::RoutedMoneyBalanceReplyPacket as GeneratedPacket>::new_generated();
        packet.target_block.target_ip = 0x1122_3344_u32;
        packet.target_block.target_port = 0x1234_u16;
        packet.money_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.transaction_success = true;
        packet.money_data.money_balance = -0x1122_3344_i32;
        packet.money_data.square_meters_credit = -0x1122_3344_i32;
        packet.money_data.square_meters_committed = -0x1122_3344_i32;
        packet.money_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.transaction_info.transaction_type = -0x1122_3344_i32;
        packet.transaction_info.source_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_info.is_source_group = true;
        packet.transaction_info.dest_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_info.is_dest_group = true;
        packet.transaction_info.amount = -0x1122_3344_i32;
        packet.transaction_info.item_description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RoutedMoneyBalanceReply");
        let mut packet = <crate::packets::ActivateGesturesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        let mut block = <crate::packets::ActivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.gesture_flags = 0x1122_3344_u32;
        packet.data.push(block);
        assert_round_trip(&packet, "ActivateGestures");
        let mut packet = <crate::packets::DeactivateGesturesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        let mut block = <crate::packets::DeactivateGesturesPacketDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.gesture_flags = 0x1122_3344_u32;
        packet.data.push(block);
        assert_round_trip(&packet, "DeactivateGestures");
        let mut packet = <crate::packets::MuteListUpdatePacket as GeneratedPacket>::new_generated();
        packet.mute_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.mute_data.filename = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "MuteListUpdate");
        let mut packet = <crate::packets::UseCachedMuteListPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "UseCachedMuteList");
        let mut packet = <crate::packets::GrantUserRightsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GrantUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
        block.agent_related = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.related_rights = -0x1122_3344_i32;
        packet.rights.push(block);
        assert_round_trip(&packet, "GrantUserRights");
        let mut packet = <crate::packets::ChangeUserRightsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ChangeUserRightsPacketRightsBlock as GeneratedBlock>::new_generated();
        block.agent_related = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.related_rights = -0x1122_3344_i32;
        packet.rights.push(block);
        assert_round_trip(&packet, "ChangeUserRights");
        let mut packet = <crate::packets::OnlineNotificationPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::OnlineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.push(block);
        assert_round_trip(&packet, "OnlineNotification");
        let mut packet = <crate::packets::OfflineNotificationPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::OfflineNotificationPacketAgentBlockBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_block.push(block);
        assert_round_trip(&packet, "OfflineNotification");
        let mut packet = <crate::packets::SetStartLocationRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.start_location_data.sim_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.start_location_data.location_id = 0x1122_3344_u32;
        packet.start_location_data.location_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.start_location_data.location_look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "SetStartLocationRequest");
        let mut packet = <crate::packets::SetStartLocationPacket as GeneratedPacket>::new_generated();
        packet.start_location_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.start_location_data.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.start_location_data.location_id = 0x1122_3344_u32;
        packet.start_location_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.start_location_data.location_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.start_location_data.location_look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "SetStartLocation");
        let mut packet = <crate::packets::NetTestPacket as GeneratedPacket>::new_generated();
        packet.net_block.port = 0x1234_u16;
        assert_round_trip(&packet, "NetTest");
        let mut packet = <crate::packets::SetCPURatioPacket as GeneratedPacket>::new_generated();
        packet.data.ratio = 0xa5_u8;
        assert_round_trip(&packet, "SetCPURatio");
        let mut packet = <crate::packets::SimCrashedPacket as GeneratedPacket>::new_generated();
        packet.data.region_x = 0x1122_3344_u32;
        packet.data.region_y = 0x1122_3344_u32;
        let mut block = <crate::packets::SimCrashedPacketUsersBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.users.push(block);
        assert_round_trip(&packet, "SimCrashed");
        let mut packet = <crate::packets::NameValuePairPacket as GeneratedPacket>::new_generated();
        packet.task_data.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::NameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
        block.nv_pair = vec![0_u8, 1, 2, 0, 0xff];
        packet.name_value_data.push(block);
        assert_round_trip(&packet, "NameValuePair");
        let mut packet = <crate::packets::RemoveNameValuePairPacket as GeneratedPacket>::new_generated();
        packet.task_data.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RemoveNameValuePairPacketNameValueDataBlock as GeneratedBlock>::new_generated();
        block.nv_pair = vec![0_u8, 1, 2, 0, 0xff];
        packet.name_value_data.push(block);
        assert_round_trip(&packet, "RemoveNameValuePair");
        let mut packet = <crate::packets::UpdateAttachmentPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.attachment_block.attachment_point = 0xa5_u8;
        packet.operation_data.add_item = true;
        packet.operation_data.use_existing_asset = true;
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.base_mask = 0x1122_3344_u32;
        packet.inventory_data.owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_mask = 0x1122_3344_u32;
        packet.inventory_data.everyone_mask = 0x1122_3344_u32;
        packet.inventory_data.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_owned = true;
        packet.inventory_data.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.type_ = -37_i8;
        packet.inventory_data.inv_type = -37_i8;
        packet.inventory_data.flags = 0x1122_3344_u32;
        packet.inventory_data.sale_type = 0xa5_u8;
        packet.inventory_data.sale_price = -0x1122_3344_i32;
        packet.inventory_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.creation_date = -0x1122_3344_i32;
        packet.inventory_data.crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "UpdateAttachment");
        let mut packet = <crate::packets::RemoveAttachmentPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.attachment_block.attachment_point = 0xa5_u8;
        packet.attachment_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RemoveAttachment");
        let mut packet = <crate::packets::AssetUploadRequestPacket as GeneratedPacket>::new_generated();
        packet.asset_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.asset_block.type_ = -37_i8;
        packet.asset_block.tempfile = true;
        packet.asset_block.store_local = true;
        packet.asset_block.asset_data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AssetUploadRequest");
        let mut packet = <crate::packets::AssetUploadCompletePacket as GeneratedPacket>::new_generated();
        packet.asset_block.uuid = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.asset_block.type_ = -37_i8;
        packet.asset_block.success = true;
        assert_round_trip(&packet, "AssetUploadComplete");
        let mut packet = <crate::packets::EmailMessageRequestPacket as GeneratedPacket>::new_generated();
        packet.data_block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.from_address = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.subject = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "EmailMessageRequest");
        let mut packet = <crate::packets::EmailMessageReplyPacket as GeneratedPacket>::new_generated();
        packet.data_block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.more = 0x1122_3344_u32;
        packet.data_block.time = 0x1122_3344_u32;
        packet.data_block.from_address = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.subject = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.data = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.mail_filter = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "EmailMessageReply");
        let mut packet = <crate::packets::ScriptDataRequestPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ScriptDataRequestPacketDataBlockBlock as GeneratedBlock>::new_generated();
        block.hash = 0x0102_0304_0506_0708_u64;
        block.request_type = -37_i8;
        block.request = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.push(block);
        assert_round_trip(&packet, "ScriptDataRequest");
        let mut packet = <crate::packets::ScriptDataReplyPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ScriptDataReplyPacketDataBlockBlock as GeneratedBlock>::new_generated();
        block.hash = 0x0102_0304_0506_0708_u64;
        block.reply = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.push(block);
        assert_round_trip(&packet, "ScriptDataReply");
        let mut packet = <crate::packets::CreateGroupRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.charter = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.show_in_list = true;
        packet.group_data.insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.membership_fee = -0x1122_3344_i32;
        packet.group_data.open_enrollment = true;
        packet.group_data.allow_publish = true;
        packet.group_data.mature_publish = true;
        assert_round_trip(&packet, "CreateGroupRequest");
        let mut packet = <crate::packets::CreateGroupReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.reply_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.reply_data.success = true;
        packet.reply_data.message = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "CreateGroupReply");
        let mut packet = <crate::packets::UpdateGroupInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.charter = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.show_in_list = true;
        packet.group_data.insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.membership_fee = -0x1122_3344_i32;
        packet.group_data.open_enrollment = true;
        packet.group_data.allow_publish = true;
        packet.group_data.mature_publish = true;
        assert_round_trip(&packet, "UpdateGroupInfo");
        let mut packet = <crate::packets::GroupRoleChangesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GroupRoleChangesPacketRoleChangeBlock as GeneratedBlock>::new_generated();
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.member_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.change = 0x1122_3344_u32;
        packet.role_change.push(block);
        assert_round_trip(&packet, "GroupRoleChanges");
        let mut packet = <crate::packets::JoinGroupRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "JoinGroupRequest");
        let mut packet = <crate::packets::JoinGroupReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.success = true;
        assert_round_trip(&packet, "JoinGroupReply");
        let mut packet = <crate::packets::EjectGroupMemberRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::EjectGroupMemberRequestPacketEjectDataBlock as GeneratedBlock>::new_generated();
        block.ejectee_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.eject_data.push(block);
        assert_round_trip(&packet, "EjectGroupMemberRequest");
        let mut packet = <crate::packets::EjectGroupMemberReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.eject_data.success = true;
        assert_round_trip(&packet, "EjectGroupMemberReply");
        let mut packet = <crate::packets::LeaveGroupRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "LeaveGroupRequest");
        let mut packet = <crate::packets::LeaveGroupReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.success = true;
        assert_round_trip(&packet, "LeaveGroupReply");
        let mut packet = <crate::packets::InviteGroupRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::InviteGroupRequestPacketInviteDataBlock as GeneratedBlock>::new_generated();
        block.invitee_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.invite_data.push(block);
        assert_round_trip(&packet, "InviteGroupRequest");
        let mut packet = <crate::packets::InviteGroupResponsePacket as GeneratedPacket>::new_generated();
        packet.invite_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.invite_data.invitee_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.invite_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.invite_data.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.invite_data.membership_fee = -0x1122_3344_i32;
        packet.group_data.group_limit = -0x1122_3344_i32;
        assert_round_trip(&packet, "InviteGroupResponse");
        let mut packet = <crate::packets::GroupProfileRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupProfileRequest");
        let mut packet = <crate::packets::GroupProfileReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.charter = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.show_in_list = true;
        packet.group_data.member_title = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.powers_mask = 0x0102_0304_0506_0708_u64;
        packet.group_data.insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.founder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.membership_fee = -0x1122_3344_i32;
        packet.group_data.open_enrollment = true;
        packet.group_data.money = -0x1122_3344_i32;
        packet.group_data.group_membership_count = -0x1122_3344_i32;
        packet.group_data.group_roles_count = -0x1122_3344_i32;
        packet.group_data.allow_publish = true;
        packet.group_data.mature_publish = true;
        packet.group_data.owner_role = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupProfileReply");
        let mut packet = <crate::packets::GroupAccountSummaryRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        assert_round_trip(&packet, "GroupAccountSummaryRequest");
        let mut packet = <crate::packets::GroupAccountSummaryReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        packet.money_data.start_date = vec![0_u8, 1, 2, 0, 0xff];
        packet.money_data.balance = -0x1122_3344_i32;
        packet.money_data.total_credits = -0x1122_3344_i32;
        packet.money_data.total_debits = -0x1122_3344_i32;
        packet.money_data.object_tax_current = -0x1122_3344_i32;
        packet.money_data.light_tax_current = -0x1122_3344_i32;
        packet.money_data.land_tax_current = -0x1122_3344_i32;
        packet.money_data.group_tax_current = -0x1122_3344_i32;
        packet.money_data.parcel_dir_fee_current = -0x1122_3344_i32;
        packet.money_data.object_tax_estimate = -0x1122_3344_i32;
        packet.money_data.light_tax_estimate = -0x1122_3344_i32;
        packet.money_data.land_tax_estimate = -0x1122_3344_i32;
        packet.money_data.group_tax_estimate = -0x1122_3344_i32;
        packet.money_data.parcel_dir_fee_estimate = -0x1122_3344_i32;
        packet.money_data.non_exempt_members = -0x1122_3344_i32;
        packet.money_data.last_tax_date = vec![0_u8, 1, 2, 0, 0xff];
        packet.money_data.tax_date = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "GroupAccountSummaryReply");
        let mut packet = <crate::packets::GroupAccountDetailsRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        assert_round_trip(&packet, "GroupAccountDetailsRequest");
        let mut packet = <crate::packets::GroupAccountDetailsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        packet.money_data.start_date = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::GroupAccountDetailsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.amount = -0x1122_3344_i32;
        packet.history_data.push(block);
        assert_round_trip(&packet, "GroupAccountDetailsReply");
        let mut packet = <crate::packets::GroupAccountTransactionsRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        assert_round_trip(&packet, "GroupAccountTransactionsRequest");
        let mut packet = <crate::packets::GroupAccountTransactionsReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.money_data.interval_days = -0x1122_3344_i32;
        packet.money_data.current_interval = -0x1122_3344_i32;
        packet.money_data.start_date = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::GroupAccountTransactionsReplyPacketHistoryDataBlock as GeneratedBlock>::new_generated();
        block.time = vec![0_u8, 1, 2, 0, 0xff];
        block.user = vec![0_u8, 1, 2, 0, 0xff];
        block.type_ = -0x1122_3344_i32;
        block.item = vec![0_u8, 1, 2, 0, 0xff];
        block.amount = -0x1122_3344_i32;
        packet.history_data.push(block);
        assert_round_trip(&packet, "GroupAccountTransactionsReply");
        let mut packet = <crate::packets::GroupActiveProposalsRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupActiveProposalsRequest");
        let mut packet = <crate::packets::GroupActiveProposalItemReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.total_num_items = 0x1122_3344_u32;
        let mut block = <crate::packets::GroupActiveProposalItemReplyPacketProposalDataBlock as GeneratedBlock>::new_generated();
        block.vote_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.vote_initiator = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.terse_date_id = vec![0_u8, 1, 2, 0, 0xff];
        block.start_date_time = vec![0_u8, 1, 2, 0, 0xff];
        block.end_date_time = vec![0_u8, 1, 2, 0, 0xff];
        block.already_voted = true;
        block.vote_cast = vec![0_u8, 1, 2, 0, 0xff];
        block.majority = 1.5_f32;
        block.quorum = -0x1122_3344_i32;
        block.proposal_text = vec![0_u8, 1, 2, 0, 0xff];
        packet.proposal_data.push(block);
        assert_round_trip(&packet, "GroupActiveProposalItemReply");
        let mut packet = <crate::packets::GroupVoteHistoryRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupVoteHistoryRequest");
        let mut packet = <crate::packets::GroupVoteHistoryItemReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transaction_data.total_num_items = 0x1122_3344_u32;
        packet.history_item_data.vote_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.history_item_data.terse_date_id = vec![0_u8, 1, 2, 0, 0xff];
        packet.history_item_data.start_date_time = vec![0_u8, 1, 2, 0, 0xff];
        packet.history_item_data.end_date_time = vec![0_u8, 1, 2, 0, 0xff];
        packet.history_item_data.vote_initiator = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.history_item_data.vote_type = vec![0_u8, 1, 2, 0, 0xff];
        packet.history_item_data.vote_result = vec![0_u8, 1, 2, 0, 0xff];
        packet.history_item_data.majority = 1.5_f32;
        packet.history_item_data.quorum = -0x1122_3344_i32;
        packet.history_item_data.proposal_text = vec![0_u8, 1, 2, 0, 0xff];
        let mut block = <crate::packets::GroupVoteHistoryItemReplyPacketVoteItemBlock as GeneratedBlock>::new_generated();
        block.candidate_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.vote_cast = vec![0_u8, 1, 2, 0, 0xff];
        block.num_votes = -0x1122_3344_i32;
        packet.vote_item.push(block);
        assert_round_trip(&packet, "GroupVoteHistoryItemReply");
        let mut packet = <crate::packets::StartGroupProposalPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.proposal_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.proposal_data.quorum = -0x1122_3344_i32;
        packet.proposal_data.majority = 1.5_f32;
        packet.proposal_data.duration = -0x1122_3344_i32;
        packet.proposal_data.proposal_text = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "StartGroupProposal");
        let mut packet = <crate::packets::GroupProposalBallotPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.proposal_data.proposal_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.proposal_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.proposal_data.vote_cast = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "GroupProposalBallot");
        let packet = <crate::packets::TallyVotesPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "TallyVotes");
        let mut packet = <crate::packets::GroupMembersRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupMembersRequest");
        let mut packet = <crate::packets::GroupMembersReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.member_count = -0x1122_3344_i32;
        let mut block = <crate::packets::GroupMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.contribution = -0x1122_3344_i32;
        block.online_status = vec![0_u8, 1, 2, 0, 0xff];
        block.agent_powers = 0x0102_0304_0506_0708_u64;
        block.title = vec![0_u8, 1, 2, 0, 0xff];
        block.is_owner = true;
        packet.member_data.push(block);
        assert_round_trip(&packet, "GroupMembersReply");
        let mut packet = <crate::packets::ActivateGroupPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ActivateGroup");
        let mut packet = <crate::packets::SetGroupContributionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.contribution = -0x1122_3344_i32;
        assert_round_trip(&packet, "SetGroupContribution");
        let mut packet = <crate::packets::SetGroupAcceptNoticesPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.accept_notices = true;
        packet.new_data.list_in_profile = true;
        assert_round_trip(&packet, "SetGroupAcceptNotices");
        let mut packet = <crate::packets::GroupRoleDataRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupRoleDataRequest");
        let mut packet = <crate::packets::GroupRoleDataReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.role_count = -0x1122_3344_i32;
        let mut block = <crate::packets::GroupRoleDataReplyPacketRoleDataBlock as GeneratedBlock>::new_generated();
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.title = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.powers = 0x0102_0304_0506_0708_u64;
        block.members = 0x1122_3344_u32;
        packet.role_data.push(block);
        assert_round_trip(&packet, "GroupRoleDataReply");
        let mut packet = <crate::packets::GroupRoleMembersRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupRoleMembersRequest");
        let mut packet = <crate::packets::GroupRoleMembersReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.total_pairs = 0x1122_3344_u32;
        let mut block = <crate::packets::GroupRoleMembersReplyPacketMemberDataBlock as GeneratedBlock>::new_generated();
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.member_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.member_data.push(block);
        assert_round_trip(&packet, "GroupRoleMembersReply");
        let mut packet = <crate::packets::GroupTitlesRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupTitlesRequest");
        let mut packet = <crate::packets::GroupTitlesReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GroupTitlesReplyPacketGroupDataBlock as GeneratedBlock>::new_generated();
        block.title = vec![0_u8, 1, 2, 0, 0xff];
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.selected = true;
        packet.group_data.push(block);
        assert_round_trip(&packet, "GroupTitlesReply");
        let mut packet = <crate::packets::GroupTitleUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.title_role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "GroupTitleUpdate");
        let mut packet = <crate::packets::GroupRoleUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GroupRoleUpdatePacketRoleDataBlock as GeneratedBlock>::new_generated();
        block.role_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.title = vec![0_u8, 1, 2, 0, 0xff];
        block.powers = 0x0102_0304_0506_0708_u64;
        block.update_type = 0xa5_u8;
        packet.role_data.push(block);
        assert_round_trip(&packet, "GroupRoleUpdate");
        let mut packet = <crate::packets::LiveHelpGroupRequestPacket as GeneratedPacket>::new_generated();
        packet.request_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.request_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "LiveHelpGroupRequest");
        let mut packet = <crate::packets::LiveHelpGroupReplyPacket as GeneratedPacket>::new_generated();
        packet.reply_data.request_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.reply_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.reply_data.selection = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "LiveHelpGroupReply");
        let mut packet = <crate::packets::AgentWearablesRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AgentWearablesRequest");
        let mut packet = <crate::packets::AgentWearablesUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = 0x1122_3344_u32;
        let mut block = <crate::packets::AgentWearablesUpdatePacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.wearable_type = 0xa5_u8;
        packet.wearable_data.push(block);
        assert_round_trip(&packet, "AgentWearablesUpdate");
        let mut packet = <crate::packets::AgentIsNowWearingPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AgentIsNowWearingPacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.wearable_type = 0xa5_u8;
        packet.wearable_data.push(block);
        assert_round_trip(&packet, "AgentIsNowWearing");
        let mut packet = <crate::packets::AgentCachedTexturePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = -0x1122_3344_i32;
        let mut block = <crate::packets::AgentCachedTexturePacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.texture_index = 0xa5_u8;
        packet.wearable_data.push(block);
        assert_round_trip(&packet, "AgentCachedTexture");
        let mut packet = <crate::packets::AgentCachedTextureResponsePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.serial_num = -0x1122_3344_i32;
        let mut block = <crate::packets::AgentCachedTextureResponsePacketWearableDataBlock as GeneratedBlock>::new_generated();
        block.texture_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.texture_index = 0xa5_u8;
        block.host_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.wearable_data.push(block);
        assert_round_trip(&packet, "AgentCachedTextureResponse");
        let mut packet = <crate::packets::AgentDataUpdateRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AgentDataUpdateRequest");
        let mut packet = <crate::packets::AgentDataUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.first_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.last_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.group_title = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.active_group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_powers = 0x0102_0304_0506_0708_u64;
        packet.agent_data.group_name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "AgentDataUpdate");
        let mut packet = <crate::packets::GroupDataUpdatePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::GroupDataUpdatePacketAgentGroupDataBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.agent_powers = 0x0102_0304_0506_0708_u64;
        block.group_title = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_group_data.push(block);
        assert_round_trip(&packet, "GroupDataUpdate");
        let mut packet = <crate::packets::AgentGroupDataUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AgentGroupDataUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_powers = 0x0102_0304_0506_0708_u64;
        block.accept_notices = true;
        block.group_insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.contribution = -0x1122_3344_i32;
        block.group_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.push(block);
        assert_round_trip(&packet, "AgentGroupDataUpdate");
        let mut packet = <crate::packets::AgentDropGroupPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AgentDropGroup");
        let mut packet = <crate::packets::LogTextMessagePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::LogTextMessagePacketDataBlockBlock as GeneratedBlock>::new_generated();
        block.from_agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.to_agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.global_x = -2.25_f64;
        block.global_y = -2.25_f64;
        block.time = 0x1122_3344_u32;
        block.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.push(block);
        assert_round_trip(&packet, "LogTextMessage");
        let mut packet = <crate::packets::CreateTrustedCircuitPacket as GeneratedPacket>::new_generated();
        packet.data_block.end_point_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.digest = vec![0xa5_u8; 32];
        assert_round_trip(&packet, "CreateTrustedCircuit");
        let mut packet = <crate::packets::DenyTrustedCircuitPacket as GeneratedPacket>::new_generated();
        packet.data_block.end_point_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "DenyTrustedCircuit");
        let packet = <crate::packets::RequestTrustedCircuitPacket as GeneratedPacket>::new_generated();
        assert_round_trip(&packet, "RequestTrustedCircuit");
        let mut packet = <crate::packets::RezSingleAttachmentFromInvPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.attachment_pt = 0xa5_u8;
        packet.object_data.item_flags = 0x1122_3344_u32;
        packet.object_data.group_mask = 0x1122_3344_u32;
        packet.object_data.everyone_mask = 0x1122_3344_u32;
        packet.object_data.next_owner_mask = 0x1122_3344_u32;
        packet.object_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RezSingleAttachmentFromInv");
        let mut packet = <crate::packets::RezMultipleAttachmentsFromInvPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.compound_msg_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.total_objects = 0xa5_u8;
        packet.header_data.first_detach_all = true;
        let mut block = <crate::packets::RezMultipleAttachmentsFromInvPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.attachment_pt = 0xa5_u8;
        block.item_flags = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "RezMultipleAttachmentsFromInv");
        let mut packet = <crate::packets::DetachAttachmentIntoInvPacket as GeneratedPacket>::new_generated();
        packet.object_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "DetachAttachmentIntoInv");
        let mut packet = <crate::packets::CreateNewOutfitAttachmentsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.header_data.new_folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::CreateNewOutfitAttachmentsPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.old_item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.old_folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.push(block);
        assert_round_trip(&packet, "CreateNewOutfitAttachments");
        let mut packet = <crate::packets::UserInfoRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "UserInfoRequest");
        let mut packet = <crate::packets::UserInfoReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_data.im_via_e_mail = true;
        packet.user_data.directory_visibility = vec![0_u8, 1, 2, 0, 0xff];
        packet.user_data.e_mail = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "UserInfoReply");
        let mut packet = <crate::packets::UpdateUserInfoPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.user_data.im_via_e_mail = true;
        packet.user_data.directory_visibility = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "UpdateUserInfo");
        let mut packet = <crate::packets::ParcelRenamePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ParcelRenamePacketParcelDataBlock as GeneratedBlock>::new_generated();
        block.parcel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.new_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.push(block);
        assert_round_trip(&packet, "ParcelRename");
        let mut packet = <crate::packets::InitiateDownloadPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.file_data.sim_filename = vec![0_u8, 1, 2, 0, 0xff];
        packet.file_data.viewer_filename = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "InitiateDownload");
        let mut packet = <crate::packets::SystemMessagePacket as GeneratedPacket>::new_generated();
        packet.method_data.method = vec![0_u8, 1, 2, 0, 0xff];
        packet.method_data.invoice = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.method_data.digest = vec![0xa5_u8; 32];
        let mut block = <crate::packets::SystemMessagePacketParamListBlock as GeneratedBlock>::new_generated();
        block.parameter = vec![0_u8, 1, 2, 0, 0xff];
        packet.param_list.push(block);
        assert_round_trip(&packet, "SystemMessage");
        let mut packet = <crate::packets::MapLayerRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        packet.agent_data.estate_id = 0x1122_3344_u32;
        packet.agent_data.godlike = true;
        assert_round_trip(&packet, "MapLayerRequest");
        let mut packet = <crate::packets::MapLayerReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        let mut block = <crate::packets::MapLayerReplyPacketLayerDataBlock as GeneratedBlock>::new_generated();
        block.left = 0x1122_3344_u32;
        block.right = 0x1122_3344_u32;
        block.top = 0x1122_3344_u32;
        block.bottom = 0x1122_3344_u32;
        block.image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.layer_data.push(block);
        assert_round_trip(&packet, "MapLayerReply");
        let mut packet = <crate::packets::MapBlockRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        packet.agent_data.estate_id = 0x1122_3344_u32;
        packet.agent_data.godlike = true;
        packet.position_data.min_x = 0x1234_u16;
        packet.position_data.max_x = 0x1234_u16;
        packet.position_data.min_y = 0x1234_u16;
        packet.position_data.max_y = 0x1234_u16;
        assert_round_trip(&packet, "MapBlockRequest");
        let mut packet = <crate::packets::MapNameRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        packet.agent_data.estate_id = 0x1122_3344_u32;
        packet.agent_data.godlike = true;
        packet.name_data.name = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "MapNameRequest");
        let mut packet = <crate::packets::MapBlockReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        let mut block = <crate::packets::MapBlockReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.x = 0x1234_u16;
        block.y = 0x1234_u16;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.access = 0xa5_u8;
        block.region_flags = 0x1122_3344_u32;
        block.water_height = 0xa5_u8;
        block.agents = 0xa5_u8;
        block.map_image_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.push(block);
        let mut block = <crate::packets::MapBlockReplyPacketSizeBlock as GeneratedBlock>::new_generated();
        block.size_x = 0x1234_u16;
        block.size_y = 0x1234_u16;
        packet.size.push(block);
        assert_round_trip(&packet, "MapBlockReply");
        let mut packet = <crate::packets::MapItemRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        packet.agent_data.estate_id = 0x1122_3344_u32;
        packet.agent_data.godlike = true;
        packet.request_data.item_type = 0x1122_3344_u32;
        packet.request_data.region_handle = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "MapItemRequest");
        let mut packet = <crate::packets::MapItemReplyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.flags = 0x1122_3344_u32;
        packet.request_data.item_type = 0x1122_3344_u32;
        let mut block = <crate::packets::MapItemReplyPacketDataBlock as GeneratedBlock>::new_generated();
        block.x = 0x1122_3344_u32;
        block.y = 0x1122_3344_u32;
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.extra = -0x1122_3344_i32;
        block.extra2 = -0x1122_3344_i32;
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.push(block);
        assert_round_trip(&packet, "MapItemReply");
        let mut packet = <crate::packets::SendPostcardPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.asset_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.pos_global = libremetaverse_types::Vector3d {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.to = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.from_ = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.subject = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.msg = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.allow_publish = true;
        packet.agent_data.mature_publish = true;
        assert_round_trip(&packet, "SendPostcard");
        let mut packet = <crate::packets::RpcChannelRequestPacket as GeneratedPacket>::new_generated();
        packet.data_block.grid_x = 0x1122_3344_u32;
        packet.data_block.grid_y = 0x1122_3344_u32;
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RpcChannelRequest");
        let mut packet = <crate::packets::RpcChannelReplyPacket as GeneratedPacket>::new_generated();
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.channel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RpcChannelReply");
        let mut packet = <crate::packets::RpcScriptRequestInboundPacket as GeneratedPacket>::new_generated();
        packet.target_block.grid_x = 0x1122_3344_u32;
        packet.target_block.grid_y = 0x1122_3344_u32;
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.channel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.int_value = 0x1122_3344_u32;
        packet.data_block.string_value = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RpcScriptRequestInbound");
        let mut packet = <crate::packets::RpcScriptRequestInboundForwardPacket as GeneratedPacket>::new_generated();
        packet.data_block.rpc_server_ip = 0x1122_3344_u32;
        packet.data_block.rpc_server_port = 0x1234_u16;
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.channel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.int_value = 0x1122_3344_u32;
        packet.data_block.string_value = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RpcScriptRequestInboundForward");
        let mut packet = <crate::packets::RpcScriptReplyInboundPacket as GeneratedPacket>::new_generated();
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.channel_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.int_value = 0x1122_3344_u32;
        packet.data_block.string_value = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "RpcScriptReplyInbound");
        let mut packet = <crate::packets::ScriptMailRegistrationPacket as GeneratedPacket>::new_generated();
        packet.data_block.target_ip = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.target_port = 0x1234_u16;
        packet.data_block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.flags = 0x1122_3344_u32;
        assert_round_trip(&packet, "ScriptMailRegistration");
        let mut packet = <crate::packets::ParcelMediaCommandMessagePacket as GeneratedPacket>::new_generated();
        packet.command_block.flags = 0x1122_3344_u32;
        packet.command_block.command = 0x1122_3344_u32;
        packet.command_block.time = 1.5_f32;
        assert_round_trip(&packet, "ParcelMediaCommandMessage");
        let mut packet = <crate::packets::ParcelMediaUpdatePacket as GeneratedPacket>::new_generated();
        packet.data_block.media_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.media_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.media_auto_scale = 0xa5_u8;
        packet.data_block_extended.media_type = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block_extended.media_desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block_extended.media_width = -0x1122_3344_i32;
        packet.data_block_extended.media_height = -0x1122_3344_i32;
        packet.data_block_extended.media_loop = 0xa5_u8;
        assert_round_trip(&packet, "ParcelMediaUpdate");
        let mut packet = <crate::packets::LandStatRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.request_data.report_type = 0x1122_3344_u32;
        packet.request_data.request_flags = 0x1122_3344_u32;
        packet.request_data.filter = vec![0_u8, 1, 2, 0, 0xff];
        packet.request_data.parcel_local_id = -0x1122_3344_i32;
        assert_round_trip(&packet, "LandStatRequest");
        let mut packet = <crate::packets::LandStatReplyPacket as GeneratedPacket>::new_generated();
        packet.request_data.report_type = 0x1122_3344_u32;
        packet.request_data.request_flags = 0x1122_3344_u32;
        packet.request_data.total_object_count = 0x1122_3344_u32;
        let mut block = <crate::packets::LandStatReplyPacketReportDataBlock as GeneratedBlock>::new_generated();
        block.task_local_id = 0x1122_3344_u32;
        block.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.location_x = 1.5_f32;
        block.location_y = 1.5_f32;
        block.location_z = 1.5_f32;
        block.score = 1.5_f32;
        block.task_name = vec![0_u8, 1, 2, 0, 0xff];
        block.owner_name = vec![0_u8, 1, 2, 0, 0xff];
        packet.report_data.push(block);
        assert_round_trip(&packet, "LandStatReply");
        let mut packet = <crate::packets::ErrorPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.code = -0x1122_3344_i32;
        packet.data.token = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data.system = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.message = vec![0_u8, 1, 2, 0, 0xff];
        packet.data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "Error");
        let mut packet = <crate::packets::ObjectIncludeInSearchPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectIncludeInSearchPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.include_in_search = true;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectIncludeInSearch");
        let mut packet = <crate::packets::RezRestoreToWorldPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.base_mask = 0x1122_3344_u32;
        packet.inventory_data.owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_mask = 0x1122_3344_u32;
        packet.inventory_data.everyone_mask = 0x1122_3344_u32;
        packet.inventory_data.next_owner_mask = 0x1122_3344_u32;
        packet.inventory_data.group_owned = true;
        packet.inventory_data.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_data.type_ = -37_i8;
        packet.inventory_data.inv_type = -37_i8;
        packet.inventory_data.flags = 0x1122_3344_u32;
        packet.inventory_data.sale_type = 0xa5_u8;
        packet.inventory_data.sale_price = -0x1122_3344_i32;
        packet.inventory_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.description = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_data.creation_date = -0x1122_3344_i32;
        packet.inventory_data.crc = 0x1122_3344_u32;
        assert_round_trip(&packet, "RezRestoreToWorld");
        let mut packet = <crate::packets::LinkInventoryItemPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.callback_id = 0x1122_3344_u32;
        packet.inventory_block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.transaction_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.old_item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.inventory_block.type_ = -37_i8;
        packet.inventory_block.inv_type = -37_i8;
        packet.inventory_block.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.inventory_block.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "LinkInventoryItem");
        let mut packet = <crate::packets::RetrieveIMsExtendedPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.is_premium = true;
        assert_round_trip(&packet, "RetrieveIMsExtended");
        let mut packet = <crate::packets::JoinGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_limit = -0x1122_3344_i32;
        packet.group_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "JoinGroupRequestExtended");
        let mut packet = <crate::packets::CreateGroupRequestExtendedPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_limit = -0x1122_3344_i32;
        packet.group_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.charter = vec![0_u8, 1, 2, 0, 0xff];
        packet.group_data.show_in_list = true;
        packet.group_data.insignia_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.group_data.membership_fee = -0x1122_3344_i32;
        packet.group_data.open_enrollment = true;
        packet.group_data.allow_publish = true;
        packet.group_data.mature_publish = true;
        assert_round_trip(&packet, "CreateGroupRequestExtended");
        let mut packet = <crate::packets::ObjectAddPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.p_code = 0xa5_u8;
        packet.object_data.material = 0xa5_u8;
        packet.object_data.add_flags = 0x1122_3344_u32;
        packet.object_data.path_curve = 0xa5_u8;
        packet.object_data.profile_curve = 0xa5_u8;
        packet.object_data.path_begin = 0x1234_u16;
        packet.object_data.path_end = 0x1234_u16;
        packet.object_data.path_scale_x = 0xa5_u8;
        packet.object_data.path_scale_y = 0xa5_u8;
        packet.object_data.path_shear_x = 0xa5_u8;
        packet.object_data.path_shear_y = 0xa5_u8;
        packet.object_data.path_twist = -37_i8;
        packet.object_data.path_twist_begin = -37_i8;
        packet.object_data.path_radius_offset = -37_i8;
        packet.object_data.path_taper_x = -37_i8;
        packet.object_data.path_taper_y = -37_i8;
        packet.object_data.path_revolutions = 0xa5_u8;
        packet.object_data.path_skew = -37_i8;
        packet.object_data.profile_begin = 0x1234_u16;
        packet.object_data.profile_end = 0x1234_u16;
        packet.object_data.profile_hollow = 0x1234_u16;
        packet.object_data.bypass_raycast = 0xa5_u8;
        packet.object_data.ray_start = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.ray_end = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.ray_target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.ray_end_is_intersection = 0xa5_u8;
        packet.object_data.scale = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.rotation = libremetaverse_types::Quaternion::identity();
        packet.object_data.state = 0xa5_u8;
        assert_round_trip(&packet, "ObjectAdd");
        let mut packet = <crate::packets::MultipleObjectUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::MultipleObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.type_ = 0xa5_u8;
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "MultipleObjectUpdate");
        let mut packet = <crate::packets::RequestMultipleObjectsPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RequestMultipleObjectsPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.cache_miss_type = 0xa5_u8;
        block.id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "RequestMultipleObjects");
        let mut packet = <crate::packets::ObjectPositionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectPositionPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_local_id = 0x1122_3344_u32;
        block.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectPosition");
        let mut packet = <crate::packets::RequestObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.request_flags = 0x1122_3344_u32;
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "RequestObjectPropertiesFamily");
        let mut packet = <crate::packets::CoarseLocationUpdatePacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::CoarseLocationUpdatePacketLocationBlock as GeneratedBlock>::new_generated();
        block.x = 0xa5_u8;
        block.y = 0xa5_u8;
        block.z = 0xa5_u8;
        packet.location.push(block);
        packet.index.you = -0x1234_i16;
        packet.index.prey = -0x1234_i16;
        let mut block = <crate::packets::CoarseLocationUpdatePacketAgentDataBlock as GeneratedBlock>::new_generated();
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.push(block);
        assert_round_trip(&packet, "CoarseLocationUpdate");
        let mut packet = <crate::packets::CrossedRegionPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.region_data.sim_ip = 0x1122_3344_u32;
        packet.region_data.sim_port = 0x1234_u16;
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.seed_capability = vec![0_u8, 1, 2, 0, 0xff];
        packet.info.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.info.look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "CrossedRegion");
        let mut packet = <crate::packets::ConfirmEnableSimulatorPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ConfirmEnableSimulator");
        let mut packet = <crate::packets::ObjectPropertiesPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::ObjectPropertiesPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.creator_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.creation_date = 0x0102_0304_0506_0708_u64;
        block.base_mask = 0x1122_3344_u32;
        block.owner_mask = 0x1122_3344_u32;
        block.group_mask = 0x1122_3344_u32;
        block.everyone_mask = 0x1122_3344_u32;
        block.next_owner_mask = 0x1122_3344_u32;
        block.ownership_cost = -0x1122_3344_i32;
        block.sale_type = 0xa5_u8;
        block.sale_price = -0x1122_3344_i32;
        block.aggregate_perms = 0xa5_u8;
        block.aggregate_perm_textures = 0xa5_u8;
        block.aggregate_perm_textures_owner = 0xa5_u8;
        block.category = 0x1122_3344_u32;
        block.inventory_serial = -0x1234_i16;
        block.item_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.folder_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.from_task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.last_owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.name = vec![0_u8, 1, 2, 0, 0xff];
        block.description = vec![0_u8, 1, 2, 0, 0xff];
        block.touch_name = vec![0_u8, 1, 2, 0, 0xff];
        block.sit_name = vec![0_u8, 1, 2, 0, 0xff];
        block.texture_id = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectProperties");
        let mut packet = <crate::packets::ObjectPropertiesFamilyPacket as GeneratedPacket>::new_generated();
        packet.object_data.request_flags = 0x1122_3344_u32;
        packet.object_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.base_mask = 0x1122_3344_u32;
        packet.object_data.owner_mask = 0x1122_3344_u32;
        packet.object_data.group_mask = 0x1122_3344_u32;
        packet.object_data.everyone_mask = 0x1122_3344_u32;
        packet.object_data.next_owner_mask = 0x1122_3344_u32;
        packet.object_data.ownership_cost = -0x1122_3344_i32;
        packet.object_data.sale_type = 0xa5_u8;
        packet.object_data.sale_price = -0x1122_3344_i32;
        packet.object_data.category = 0x1122_3344_u32;
        packet.object_data.last_owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.object_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.description = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ObjectPropertiesFamily");
        let mut packet = <crate::packets::ParcelPropertiesRequestPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.sequence_id = -0x1122_3344_i32;
        packet.parcel_data.west = 1.5_f32;
        packet.parcel_data.south = 1.5_f32;
        packet.parcel_data.east = 1.5_f32;
        packet.parcel_data.north = 1.5_f32;
        packet.parcel_data.snap_selection = true;
        assert_round_trip(&packet, "ParcelPropertiesRequest");
        let mut packet = <crate::packets::SimStatusPacket as GeneratedPacket>::new_generated();
        packet.sim_status.can_accept_agents = true;
        packet.sim_status.can_accept_tasks = true;
        packet.sim_flags.flags = 0x0102_0304_0506_0708_u64;
        assert_round_trip(&packet, "SimStatus");
        let mut packet = <crate::packets::AttachedSoundPacket as GeneratedPacket>::new_generated();
        packet.data_block.sound_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.gain = 1.5_f32;
        packet.data_block.flags = 0xa5_u8;
        assert_round_trip(&packet, "AttachedSound");
        let mut packet = <crate::packets::AttachedSoundGainChangePacket as GeneratedPacket>::new_generated();
        packet.data_block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.gain = 1.5_f32;
        assert_round_trip(&packet, "AttachedSoundGainChange");
        let mut packet = <crate::packets::PreloadSoundPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::PreloadSoundPacketDataBlockBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.sound_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.push(block);
        assert_round_trip(&packet, "PreloadSound");
        let mut packet = <crate::packets::InternalScriptMailPacket as GeneratedPacket>::new_generated();
        packet.data_block.from_ = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.to = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.data_block.subject = vec![0_u8, 1, 2, 0, 0xff];
        packet.data_block.body = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "InternalScriptMail");
        let mut packet = <crate::packets::ViewerEffectPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ViewerEffectPacketEffectBlock as GeneratedBlock>::new_generated();
        block.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.type_ = 0xa5_u8;
        block.duration = 1.5_f32;
        block.color = vec![0xa5_u8; 4];
        block.type_data = vec![0_u8, 1, 2, 0, 0xff];
        packet.effect.push(block);
        assert_round_trip(&packet, "ViewerEffect");
        let mut packet = <crate::packets::StartPingCheckPacket as GeneratedPacket>::new_generated();
        packet.ping_id.ping_id = 0xa5_u8;
        packet.ping_id.oldest_unacked = 0x1122_3344_u32;
        assert_round_trip(&packet, "StartPingCheck");
        let mut packet = <crate::packets::CompletePingCheckPacket as GeneratedPacket>::new_generated();
        packet.ping_id.ping_id = 0xa5_u8;
        assert_round_trip(&packet, "CompletePingCheck");
        let mut packet = <crate::packets::NeighborListPacket as GeneratedPacket>::new_generated();
        for block in &mut packet.neighbor_block {
            block.ip = 0x1122_3344_u32;
            block.port = 0x1234_u16;
            block.public_ip = 0x1122_3344_u32;
            block.public_port = 0x1234_u16;
            block.region_id = libremetaverse_types::UUID::new_with_bytes_int32(
                    (0_u8..16).collect(),
                    0,
                )
                .expect("sample UUID");
            block.name = vec![0_u8, 1, 2, 0, 0xff];
            block.sim_access = 0xa5_u8;
        }
        assert_round_trip(&packet, "NeighborList");
        let mut packet = <crate::packets::AgentUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.body_rotation = libremetaverse_types::Quaternion::identity();
        packet.agent_data.head_rotation = libremetaverse_types::Quaternion::identity();
        packet.agent_data.state = 0xa5_u8;
        packet.agent_data.camera_center = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.camera_at_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.camera_left_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.camera_up_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.far = 1.5_f32;
        packet.agent_data.control_flags = 0x1122_3344_u32;
        packet.agent_data.flags = 0xa5_u8;
        assert_round_trip(&packet, "AgentUpdate");
        let mut packet = <crate::packets::AgentAnimationPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AgentAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
        block.anim_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.start_anim = true;
        packet.animation_list.push(block);
        let mut block = <crate::packets::AgentAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
        block.type_data = vec![0_u8, 1, 2, 0, 0xff];
        packet.physical_avatar_event_list.push(block);
        assert_round_trip(&packet, "AgentAnimation");
        let mut packet = <crate::packets::AgentRequestSitPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.target_object.target_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.target_object.offset = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        assert_round_trip(&packet, "AgentRequestSit");
        let mut packet = <crate::packets::AgentSitPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "AgentSit");
        let mut packet = <crate::packets::RequestImagePacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::RequestImagePacketRequestImageBlock as GeneratedBlock>::new_generated();
        block.image = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.discard_level = -37_i8;
        block.download_priority = 1.5_f32;
        block.packet = 0x1122_3344_u32;
        block.type_ = 0xa5_u8;
        packet.request_image.push(block);
        assert_round_trip(&packet, "RequestImage");
        let mut packet = <crate::packets::ImageDataPacket as GeneratedPacket>::new_generated();
        packet.image_id.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.image_id.codec = 0xa5_u8;
        packet.image_id.size = 0x1122_3344_u32;
        packet.image_id.packets = 0x1234_u16;
        packet.image_data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ImageData");
        let mut packet = <crate::packets::ImagePacketPacket as GeneratedPacket>::new_generated();
        packet.image_id.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.image_id.packet = 0x1234_u16;
        packet.image_data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "ImagePacket");
        let mut packet = <crate::packets::LayerDataPacket as GeneratedPacket>::new_generated();
        packet.layer_id.type_ = 0xa5_u8;
        packet.layer_data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "LayerData");
        let mut packet = <crate::packets::ObjectUpdatePacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.time_dilation = 0x1234_u16;
        let mut block = <crate::packets::ObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.id = 0x1122_3344_u32;
        block.state = 0xa5_u8;
        block.full_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.crc = 0x1122_3344_u32;
        block.p_code = 0xa5_u8;
        block.material = 0xa5_u8;
        block.click_action = 0xa5_u8;
        block.scale = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.object_data = vec![0_u8, 1, 2, 0, 0xff];
        block.parent_id = 0x1122_3344_u32;
        block.update_flags = 0x1122_3344_u32;
        block.path_curve = 0xa5_u8;
        block.profile_curve = 0xa5_u8;
        block.path_begin = 0x1234_u16;
        block.path_end = 0x1234_u16;
        block.path_scale_x = 0xa5_u8;
        block.path_scale_y = 0xa5_u8;
        block.path_shear_x = 0xa5_u8;
        block.path_shear_y = 0xa5_u8;
        block.path_twist = -37_i8;
        block.path_twist_begin = -37_i8;
        block.path_radius_offset = -37_i8;
        block.path_taper_x = -37_i8;
        block.path_taper_y = -37_i8;
        block.path_revolutions = 0xa5_u8;
        block.path_skew = -37_i8;
        block.profile_begin = 0x1234_u16;
        block.profile_end = 0x1234_u16;
        block.profile_hollow = 0x1234_u16;
        block.texture_entry = vec![0_u8, 1, 2, 0, 0xff];
        block.texture_anim = vec![0_u8, 1, 2, 0, 0xff];
        block.name_value = vec![0_u8, 1, 2, 0, 0xff];
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        block.text = vec![0_u8, 1, 2, 0, 0xff];
        block.text_color = vec![0xa5_u8; 4];
        block.media_url = vec![0_u8, 1, 2, 0, 0xff];
        block.ps_block = vec![0_u8, 1, 2, 0, 0xff];
        block.extra_params = vec![0_u8, 1, 2, 0, 0xff];
        block.sound = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.gain = 1.5_f32;
        block.flags = 0xa5_u8;
        block.radius = 1.5_f32;
        block.joint_type = 0xa5_u8;
        block.joint_pivot = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        block.joint_axis_or_anchor = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectUpdate");
        let mut packet = <crate::packets::ObjectUpdateCompressedPacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.time_dilation = 0x1234_u16;
        let mut block = <crate::packets::ObjectUpdateCompressedPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.update_flags = 0x1122_3344_u32;
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectUpdateCompressed");
        let mut packet = <crate::packets::ObjectUpdateCachedPacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.time_dilation = 0x1234_u16;
        let mut block = <crate::packets::ObjectUpdateCachedPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.id = 0x1122_3344_u32;
        block.crc = 0x1122_3344_u32;
        block.update_flags = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "ObjectUpdateCached");
        let mut packet = <crate::packets::ImprovedTerseObjectUpdatePacket as GeneratedPacket>::new_generated();
        packet.region_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.region_data.time_dilation = 0x1234_u16;
        let mut block = <crate::packets::ImprovedTerseObjectUpdatePacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        block.texture_entry = vec![0_u8, 1, 2, 0, 0xff];
        packet.object_data.push(block);
        assert_round_trip(&packet, "ImprovedTerseObjectUpdate");
        let mut packet = <crate::packets::KillObjectPacket as GeneratedPacket>::new_generated();
        let mut block = <crate::packets::KillObjectPacketObjectDataBlock as GeneratedBlock>::new_generated();
        block.id = 0x1122_3344_u32;
        packet.object_data.push(block);
        assert_round_trip(&packet, "KillObject");
        let mut packet = <crate::packets::TransferPacketPacket as GeneratedPacket>::new_generated();
        packet.transfer_data.transfer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.transfer_data.channel_type = -0x1122_3344_i32;
        packet.transfer_data.packet = -0x1122_3344_i32;
        packet.transfer_data.status = -0x1122_3344_i32;
        packet.transfer_data.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "TransferPacket");
        let mut packet = <crate::packets::SendXferPacketPacket as GeneratedPacket>::new_generated();
        packet.xfer_id.id = 0x0102_0304_0506_0708_u64;
        packet.xfer_id.packet = 0x1122_3344_u32;
        packet.data_packet.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "SendXferPacket");
        let mut packet = <crate::packets::ConfirmXferPacketPacket as GeneratedPacket>::new_generated();
        packet.xfer_id.id = 0x0102_0304_0506_0708_u64;
        packet.xfer_id.packet = 0x1122_3344_u32;
        assert_round_trip(&packet, "ConfirmXferPacket");
        let mut packet = <crate::packets::AvatarAnimationPacket as GeneratedPacket>::new_generated();
        packet.sender.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::AvatarAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
        block.anim_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.anim_sequence_id = -0x1122_3344_i32;
        packet.animation_list.push(block);
        let mut block = <crate::packets::AvatarAnimationPacketAnimationSourceListBlock as GeneratedBlock>::new_generated();
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.animation_source_list.push(block);
        let mut block = <crate::packets::AvatarAnimationPacketPhysicalAvatarEventListBlock as GeneratedBlock>::new_generated();
        block.type_data = vec![0_u8, 1, 2, 0, 0xff];
        packet.physical_avatar_event_list.push(block);
        assert_round_trip(&packet, "AvatarAnimation");
        let mut packet = <crate::packets::AvatarSitResponsePacket as GeneratedPacket>::new_generated();
        packet.sit_object.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sit_transform.auto_pilot = true;
        packet.sit_transform.sit_position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.sit_transform.sit_rotation = libremetaverse_types::Quaternion::identity();
        packet.sit_transform.camera_eye_offset = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.sit_transform.camera_at_offset = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.sit_transform.force_mouselook = true;
        assert_round_trip(&packet, "AvatarSitResponse");
        let mut packet = <crate::packets::CameraConstraintPacket as GeneratedPacket>::new_generated();
        packet.camera_collide_plane.plane = libremetaverse_types::Vector4 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
            w: -4.5,
        };
        assert_round_trip(&packet, "CameraConstraint");
        let mut packet = <crate::packets::ParcelPropertiesPacket as GeneratedPacket>::new_generated();
        packet.parcel_data.request_result = -0x1122_3344_i32;
        packet.parcel_data.sequence_id = -0x1122_3344_i32;
        packet.parcel_data.snap_selection = true;
        packet.parcel_data.self_count = -0x1122_3344_i32;
        packet.parcel_data.other_count = -0x1122_3344_i32;
        packet.parcel_data.public_count = -0x1122_3344_i32;
        packet.parcel_data.local_id = -0x1122_3344_i32;
        packet.parcel_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.is_group_owned = true;
        packet.parcel_data.auction_id = 0x1122_3344_u32;
        packet.parcel_data.claim_date = -0x1122_3344_i32;
        packet.parcel_data.claim_price = -0x1122_3344_i32;
        packet.parcel_data.rent_price = -0x1122_3344_i32;
        packet.parcel_data.aabb_min = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.aabb_max = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.bitmap = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.area = -0x1122_3344_i32;
        packet.parcel_data.status = 0xa5_u8;
        packet.parcel_data.sim_wide_max_prims = -0x1122_3344_i32;
        packet.parcel_data.sim_wide_total_prims = -0x1122_3344_i32;
        packet.parcel_data.max_prims = -0x1122_3344_i32;
        packet.parcel_data.total_prims = -0x1122_3344_i32;
        packet.parcel_data.owner_prims = -0x1122_3344_i32;
        packet.parcel_data.group_prims = -0x1122_3344_i32;
        packet.parcel_data.other_prims = -0x1122_3344_i32;
        packet.parcel_data.selected_prims = -0x1122_3344_i32;
        packet.parcel_data.parcel_prim_bonus = 1.5_f32;
        packet.parcel_data.other_clean_time = -0x1122_3344_i32;
        packet.parcel_data.parcel_flags = 0x1122_3344_u32;
        packet.parcel_data.sale_price = -0x1122_3344_i32;
        packet.parcel_data.name = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.desc = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.music_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.media_url = vec![0_u8, 1, 2, 0, 0xff];
        packet.parcel_data.media_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.media_auto_scale = 0xa5_u8;
        packet.parcel_data.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.pass_price = -0x1122_3344_i32;
        packet.parcel_data.pass_hours = 1.5_f32;
        packet.parcel_data.category = 0xa5_u8;
        packet.parcel_data.auth_buyer_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.snapshot_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.parcel_data.user_location = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.user_look_at = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.parcel_data.landing_type = 0xa5_u8;
        packet.parcel_data.region_push_override = true;
        packet.parcel_data.region_deny_anonymous = true;
        packet.parcel_data.region_deny_identified = true;
        packet.parcel_data.region_deny_transacted = true;
        packet.age_verification_block.region_deny_age_unverified = true;
        packet.region_allow_access_block.region_allow_access_override = true;
        packet.parcel_environment_block.parcel_environment_version = -0x1122_3344_i32;
        packet.parcel_environment_block.region_allow_environment_override = true;
        assert_round_trip(&packet, "ParcelProperties");
        let mut packet = <crate::packets::EdgeDataPacketPacket as GeneratedPacket>::new_generated();
        packet.edge_data.layer_type = 0xa5_u8;
        packet.edge_data.direction = 0xa5_u8;
        packet.edge_data.layer_data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "EdgeDataPacket");
        let mut packet = <crate::packets::ChildAgentUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.agent_data.viewer_circuit_code = 0x1122_3344_u32;
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.agent_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.agent_vel = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.center = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.size = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.at_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.left_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.up_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.changed_grid = true;
        packet.agent_data.far = 1.5_f32;
        packet.agent_data.aspect = 1.5_f32;
        packet.agent_data.throttles = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.locomotion_state = 0x1122_3344_u32;
        packet.agent_data.head_rotation = libremetaverse_types::Quaternion::identity();
        packet.agent_data.body_rotation = libremetaverse_types::Quaternion::identity();
        packet.agent_data.control_flags = 0x1122_3344_u32;
        packet.agent_data.energy_level = 1.5_f32;
        packet.agent_data.god_level = 0xa5_u8;
        packet.agent_data.always_run = true;
        packet.agent_data.prey_agent = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.agent_access = 0xa5_u8;
        packet.agent_data.agent_textures = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_data.active_group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ChildAgentUpdatePacketGroupDataBlock as GeneratedBlock>::new_generated();
        block.group_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.group_powers = 0x0102_0304_0506_0708_u64;
        block.accept_notices = true;
        packet.group_data.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketAnimationDataBlock as GeneratedBlock>::new_generated();
        block.animation = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.animation_data.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketGranterBlockBlock as GeneratedBlock>::new_generated();
        block.granter_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.granter_block.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketNVPairDataBlock as GeneratedBlock>::new_generated();
        block.nv_pairs = vec![0_u8, 1, 2, 0, 0xff];
        packet.nv_pair_data.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketVisualParamBlock as GeneratedBlock>::new_generated();
        block.param_value = 0xa5_u8;
        packet.visual_param.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketAgentAccessBlock as GeneratedBlock>::new_generated();
        block.agent_legacy_access = 0xa5_u8;
        block.agent_max_access = 0xa5_u8;
        packet.agent_access.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketAgentInfoBlock as GeneratedBlock>::new_generated();
        block.flags = 0x1122_3344_u32;
        packet.agent_info.push(block);
        let mut block = <crate::packets::ChildAgentUpdatePacketAgentInventoryHostBlock as GeneratedBlock>::new_generated();
        block.inventory_host = vec![0_u8, 1, 2, 0, 0xff];
        packet.agent_inventory_host.push(block);
        assert_round_trip(&packet, "ChildAgentUpdate");
        let mut packet = <crate::packets::ChildAgentAlivePacket as GeneratedPacket>::new_generated();
        packet.agent_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.agent_data.viewer_circuit_code = 0x1122_3344_u32;
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        assert_round_trip(&packet, "ChildAgentAlive");
        let mut packet = <crate::packets::ChildAgentPositionUpdatePacket as GeneratedPacket>::new_generated();
        packet.agent_data.region_handle = 0x0102_0304_0506_0708_u64;
        packet.agent_data.viewer_circuit_code = 0x1122_3344_u32;
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.agent_pos = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.agent_vel = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.center = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.size = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.at_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.left_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.up_axis = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.agent_data.changed_grid = true;
        assert_round_trip(&packet, "ChildAgentPositionUpdate");
        let mut packet = <crate::packets::AtomicPassObjectPacket as GeneratedPacket>::new_generated();
        packet.task_data.task_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.task_data.attachment_needs_save = true;
        assert_round_trip(&packet, "AtomicPassObject");
        let mut packet = <crate::packets::GenericStreamingMessagePacket as GeneratedPacket>::new_generated();
        packet.method_data.method = 0x1234_u16;
        packet.data_block.data = vec![0_u8, 1, 2, 0, 0xff];
        assert_round_trip(&packet, "GenericStreamingMessage");
        let mut packet = <crate::packets::SoundTriggerPacket as GeneratedPacket>::new_generated();
        packet.sound_data.sound_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sound_data.owner_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sound_data.object_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sound_data.parent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.sound_data.handle = 0x0102_0304_0506_0708_u64;
        packet.sound_data.position = libremetaverse_types::Vector3 {
            x: 1.25,
            y: -2.5,
            z: 3.75,
        };
        packet.sound_data.gain = 1.5_f32;
        assert_round_trip(&packet, "SoundTrigger");
        let mut packet = <crate::packets::ObjectAnimationPacket as GeneratedPacket>::new_generated();
        packet.sender.id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::ObjectAnimationPacketAnimationListBlock as GeneratedBlock>::new_generated();
        block.anim_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        block.anim_sequence_id = -0x1122_3344_i32;
        packet.animation_list.push(block);
        assert_round_trip(&packet, "ObjectAnimation");
        let mut packet = <crate::packets::GameControlInputPacket as GeneratedPacket>::new_generated();
        packet.agent_data.agent_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        packet.agent_data.session_id = libremetaverse_types::UUID::new_with_bytes_int32(
                (0_u8..16).collect(),
                0,
            )
            .expect("sample UUID");
        let mut block = <crate::packets::GameControlInputPacketAxisDataBlock as GeneratedBlock>::new_generated();
        block.index = 0xa5_u8;
        block.value = -0x1234_i16;
        packet.axis_data.push(block);
        let mut block = <crate::packets::GameControlInputPacketButtonDataBlock as GeneratedBlock>::new_generated();
        block.data = vec![0_u8, 1, 2, 0, 0xff];
        packet.button_data.push(block);
        assert_round_trip(&packet, "GameControlInput");
    }
}
