import Login from "./Login" class LoginRequest { /** * user login info */ get Login() { return new Login({}, new Uint8Array(this._ptr.slice(0, 320))); } set Login(v) { this._data.set(v.bytes(), 0); } /** * get the struct representation of the object */ get bytes() { return new Uint8Array(this._ptr); } /** * constructor */ constructor(init = {}, ptr = undefined) { this._size = 320; this._ptr = ptr.buffer || new ArrayBuffer(this._size); this._data = new DataView(this._ptr); for (const key of Object.keys(init)) { this[key] = init[key]; } } } export default LoginRequest