// This file has been automatically generated by writeMessageClasses.js import {UUID} from '../UUID'; import {MessageFlags} from '../../enums/MessageFlags'; import {MessageBase} from '../MessageBase'; import {Message} from '../../enums/Message'; export class RequestInventoryAssetMessage implements MessageBase { name = 'RequestInventoryAsset'; messageFlags = MessageFlags.Trusted | MessageFlags.FrequencyLow; id = Message.RequestInventoryAsset; QueryData: { QueryID: UUID; AgentID: UUID; OwnerID: UUID; ItemID: UUID; }; getSize(): number { return 64; } writeToBuffer(buf: Buffer, pos: number): number { const startPos = pos; this.QueryData['QueryID'].writeToBuffer(buf, pos); pos += 16; this.QueryData['AgentID'].writeToBuffer(buf, pos); pos += 16; this.QueryData['OwnerID'].writeToBuffer(buf, pos); pos += 16; this.QueryData['ItemID'].writeToBuffer(buf, pos); pos += 16; return pos - startPos; } readFromBuffer(buf: Buffer, pos: number): number { const startPos = pos; let varLength = 0; const newObjQueryData: { QueryID: UUID, AgentID: UUID, OwnerID: UUID, ItemID: UUID } = { QueryID: UUID.zero(), AgentID: UUID.zero(), OwnerID: UUID.zero(), ItemID: UUID.zero() }; newObjQueryData['QueryID'] = new UUID(buf, pos); pos += 16; newObjQueryData['AgentID'] = new UUID(buf, pos); pos += 16; newObjQueryData['OwnerID'] = new UUID(buf, pos); pos += 16; newObjQueryData['ItemID'] = new UUID(buf, pos); pos += 16; this.QueryData = newObjQueryData; return pos - startPos; } }