Phase 28: diplomatic mail UI (work in progress) #11
@@ -0,0 +1,56 @@
|
|||||||
|
// Package diplomail defines the public typed command identifiers
|
||||||
|
// exposed at the authenticated Gateway -> Diplomatic Mail boundary.
|
||||||
|
//
|
||||||
|
// The gateway routes each `user.games.mail.*` ExecuteCommand into the
|
||||||
|
// matching `/api/v1/user/games/{game_id}/mail/*` REST endpoint on the
|
||||||
|
// backend; the wire envelopes and payload tables live in
|
||||||
|
// `pkg/schema/fbs/diplomail.fbs`.
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
const (
|
||||||
|
// MessageTypeUserGamesMailInbox is the authenticated gateway
|
||||||
|
// message type used to read the caller's diplomatic-mail inbox
|
||||||
|
// for one game. Backend filters out rows whose `available_at` is
|
||||||
|
// still nil (translation in flight).
|
||||||
|
MessageTypeUserGamesMailInbox = "user.games.mail.inbox"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailSent is the authenticated gateway
|
||||||
|
// message type used to read the caller's outgoing personal
|
||||||
|
// messages for one game. Admin and system rows are not included.
|
||||||
|
MessageTypeUserGamesMailSent = "user.games.mail.sent"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailMessageGet is the authenticated
|
||||||
|
// gateway message type used to read a single message detail
|
||||||
|
// addressed to the caller. The response carries the translation
|
||||||
|
// rendering when one is cached for the caller's preferred
|
||||||
|
// language.
|
||||||
|
MessageTypeUserGamesMailMessageGet = "user.games.mail.message.get"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailSend is the authenticated gateway
|
||||||
|
// message type used to send a single-recipient personal message.
|
||||||
|
// Exactly one of `recipient_user_id` and `recipient_race_name`
|
||||||
|
// must be supplied; the backend resolves the race-name shortcut
|
||||||
|
// through `Memberships.ListMembers(gameID, "active")`.
|
||||||
|
MessageTypeUserGamesMailSend = "user.games.mail.send"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailBroadcast is the authenticated gateway
|
||||||
|
// message type used by paid-tier callers to broadcast a personal
|
||||||
|
// message to every other active member of the game.
|
||||||
|
MessageTypeUserGamesMailBroadcast = "user.games.mail.broadcast"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailAdmin is the authenticated gateway
|
||||||
|
// message type used by the game owner to compose an admin-kind
|
||||||
|
// notification. The wire shape is target-discriminated: `user`
|
||||||
|
// addresses a single recipient (by id or race name); `all`
|
||||||
|
// broadcasts to every member matching the requested scope.
|
||||||
|
MessageTypeUserGamesMailAdmin = "user.games.mail.admin"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailRead is the authenticated gateway
|
||||||
|
// message type used to mark a single message as read. Idempotent.
|
||||||
|
MessageTypeUserGamesMailRead = "user.games.mail.read"
|
||||||
|
|
||||||
|
// MessageTypeUserGamesMailDelete is the authenticated gateway
|
||||||
|
// message type used to soft-delete a single message. The
|
||||||
|
// recipient row must already be marked read.
|
||||||
|
MessageTypeUserGamesMailDelete = "user.games.mail.delete"
|
||||||
|
)
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
// diplomail contains FlatBuffers payloads used by the authenticated
|
||||||
|
// gateway boundary for the in-game diplomatic-mail subsystem. The
|
||||||
|
// wire shapes here mirror the trusted internal
|
||||||
|
// `/api/v1/user/games/{game_id}/mail/*` REST surface; gateway derives
|
||||||
|
// the calling `user_id` from the verified session and forwards it as
|
||||||
|
// `X-User-Id` to backend.
|
||||||
|
|
||||||
|
include "common.fbs";
|
||||||
|
|
||||||
|
namespace diplomail;
|
||||||
|
|
||||||
|
// MailMessage stores one inbox / sent-list / message-detail row. The
|
||||||
|
// fields mirror `UserMailMessageDetail` in `backend/openapi.yaml`
|
||||||
|
// with the following encoding rules:
|
||||||
|
//
|
||||||
|
// - `*_user_id` fields are RFC 4122 string UUIDs ("" means absent
|
||||||
|
// for nullable fields such as `sender_user_id`).
|
||||||
|
// - `*_at_ms` fields carry Unix milliseconds; `0` means the
|
||||||
|
// timestamp is absent (e.g. an unread message has
|
||||||
|
// `read_at_ms == 0`).
|
||||||
|
// - `translated_*`, `translation_lang`, and `translator` are set
|
||||||
|
// when the backend served a cached rendering into the caller's
|
||||||
|
// preferred language; empty otherwise.
|
||||||
|
// - `sender_race_name` is the snapshot of the sender's race name
|
||||||
|
// in this game at send time. Present for `sender_kind="player"`
|
||||||
|
// messages when the sender had an active membership; absent for
|
||||||
|
// admin and system messages. The in-game UI keys per-race
|
||||||
|
// threading on this field.
|
||||||
|
table MailMessage {
|
||||||
|
message_id:string;
|
||||||
|
game_id:string;
|
||||||
|
game_name:string;
|
||||||
|
kind:string;
|
||||||
|
sender_kind:string;
|
||||||
|
sender_user_id:string;
|
||||||
|
sender_username:string;
|
||||||
|
sender_race_name:string;
|
||||||
|
subject:string;
|
||||||
|
body:string;
|
||||||
|
body_lang:string;
|
||||||
|
broadcast_scope:string;
|
||||||
|
created_at_ms:int64;
|
||||||
|
recipient_user_id:string;
|
||||||
|
recipient_user_name:string;
|
||||||
|
recipient_race_name:string;
|
||||||
|
read_at_ms:int64;
|
||||||
|
deleted_at_ms:int64;
|
||||||
|
translated_subject:string;
|
||||||
|
translated_body:string;
|
||||||
|
translation_lang:string;
|
||||||
|
translator:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MailRecipientState mirrors the `UserMailRecipientState` payload
|
||||||
|
// returned from mark-read and soft-delete endpoints. Same timestamp
|
||||||
|
// conventions as `MailMessage`.
|
||||||
|
table MailRecipientState {
|
||||||
|
message_id:string;
|
||||||
|
read_at_ms:int64;
|
||||||
|
deleted_at_ms:int64;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MailBroadcastReceipt mirrors `UserMailBroadcastReceipt`. Returned
|
||||||
|
// from broadcast sends (paid-tier and admin); `recipient_count` is
|
||||||
|
// the number of recipient rows the server materialised.
|
||||||
|
table MailBroadcastReceipt {
|
||||||
|
message_id:string;
|
||||||
|
game_id:string;
|
||||||
|
game_name:string;
|
||||||
|
kind:string;
|
||||||
|
sender_kind:string;
|
||||||
|
subject:string;
|
||||||
|
body:string;
|
||||||
|
body_lang:string;
|
||||||
|
broadcast_scope:string;
|
||||||
|
created_at_ms:int64;
|
||||||
|
recipient_count:int32;
|
||||||
|
}
|
||||||
|
|
||||||
|
// InboxRequest stores the read-side request for the caller's inbox
|
||||||
|
// in `game_id`. Backend filters to messages with `available_at` set
|
||||||
|
// (translation completed when the recipient's preferred language
|
||||||
|
// differs from the body language).
|
||||||
|
table InboxRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
}
|
||||||
|
|
||||||
|
// InboxResponse stores the resulting inbox list, newest first.
|
||||||
|
// `items` is empty when the caller has no available messages in
|
||||||
|
// this game.
|
||||||
|
table InboxResponse {
|
||||||
|
items:[MailMessage];
|
||||||
|
}
|
||||||
|
|
||||||
|
// SentRequest stores the read-side request for the caller's sent
|
||||||
|
// personal messages in `game_id`. Admin / system rows are not
|
||||||
|
// included.
|
||||||
|
table SentRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SentResponse stores the caller's outgoing personal-message list.
|
||||||
|
// Each `MailMessage` carries the original recipient snapshot.
|
||||||
|
table SentResponse {
|
||||||
|
items:[MailMessage];
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageGetRequest stores the read-side request for a single
|
||||||
|
// message detail. The caller must be a recipient of the message.
|
||||||
|
table MessageGetRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
message_id:common.UUID (required);
|
||||||
|
}
|
||||||
|
|
||||||
|
// MessageGetResponse stores the fully decorated message detail
|
||||||
|
// including any cached translation into the caller's preferred
|
||||||
|
// language.
|
||||||
|
table MessageGetResponse {
|
||||||
|
message:MailMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SendRequest stores the write-side request for a single-recipient
|
||||||
|
// personal send. Exactly one of `recipient_user_id` /
|
||||||
|
// `recipient_race_name` must be supplied; the empty string means
|
||||||
|
// "use the other field".
|
||||||
|
table SendRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
recipient_user_id:string;
|
||||||
|
recipient_race_name:string;
|
||||||
|
subject:string;
|
||||||
|
body:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SendResponse echoes the freshly inserted message detail.
|
||||||
|
table SendResponse {
|
||||||
|
message:MailMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BroadcastRequest stores the paid-tier player broadcast. The
|
||||||
|
// recipient set is always "every other active member of the game".
|
||||||
|
table BroadcastRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
subject:string;
|
||||||
|
body:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BroadcastResponse stores the receipt returned by the server.
|
||||||
|
table BroadcastResponse {
|
||||||
|
receipt:MailBroadcastReceipt;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AdminRequest stores the owner-only admin send. `target="user"`
|
||||||
|
// requires exactly one of `recipient_user_id` / `recipient_race_name`;
|
||||||
|
// `target="all"` accepts the optional `recipients` scope (default
|
||||||
|
// `active`).
|
||||||
|
table AdminRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
target:string;
|
||||||
|
recipient_user_id:string;
|
||||||
|
recipient_race_name:string;
|
||||||
|
recipients:string;
|
||||||
|
subject:string;
|
||||||
|
body:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// AdminResponse carries the result of an admin send. When the
|
||||||
|
// request had `target="user"`, `message` is set; when `target="all"`,
|
||||||
|
// `receipt` is set. Callers branch on which field is present.
|
||||||
|
table AdminResponse {
|
||||||
|
message:MailMessage;
|
||||||
|
receipt:MailBroadcastReceipt;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadRequest stores the mark-read intent for a single message. The
|
||||||
|
// caller must be a recipient. Idempotent.
|
||||||
|
table ReadRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
message_id:common.UUID (required);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse echoes the recipient state after the operation.
|
||||||
|
table ReadResponse {
|
||||||
|
state:MailRecipientState;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteRequest stores the soft-delete intent for a single message.
|
||||||
|
// The message must already be marked read (HTTP 409 otherwise).
|
||||||
|
table DeleteRequest {
|
||||||
|
game_id:common.UUID (required);
|
||||||
|
message_id:common.UUID (required);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteResponse echoes the recipient state after the operation.
|
||||||
|
table DeleteResponse {
|
||||||
|
state:MailRecipientState;
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AdminRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsAdminRequest(buf []byte, offset flatbuffers.UOffsetT) *AdminRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &AdminRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishAdminRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsAdminRequest(buf []byte, offset flatbuffers.UOffsetT) *AdminRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &AdminRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedAdminRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Target() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) RecipientUserId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) RecipientRaceName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Recipients() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Subject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminRequest) Body() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func AdminRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(7)
|
||||||
|
}
|
||||||
|
func AdminRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddTarget(builder *flatbuffers.Builder, target flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(target), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddRecipientUserId(builder *flatbuffers.Builder, recipientUserId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(recipientUserId), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddRecipientRaceName(builder *flatbuffers.Builder, recipientRaceName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(recipientRaceName), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddRecipients(builder *flatbuffers.Builder, recipients flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(recipients), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddSubject(builder *flatbuffers.Builder, subject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(subject), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(body), 0)
|
||||||
|
}
|
||||||
|
func AdminRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AdminResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsAdminResponse(buf []byte, offset flatbuffers.UOffsetT) *AdminResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &AdminResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishAdminResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsAdminResponse(buf []byte, offset flatbuffers.UOffsetT) *AdminResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &AdminResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedAdminResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminResponse) Message(obj *MailMessage) *MailMessage {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailMessage)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *AdminResponse) Receipt(obj *MailBroadcastReceipt) *MailBroadcastReceipt {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailBroadcastReceipt)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func AdminResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(2)
|
||||||
|
}
|
||||||
|
func AdminResponseAddMessage(builder *flatbuffers.Builder, message flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(message), 0)
|
||||||
|
}
|
||||||
|
func AdminResponseAddReceipt(builder *flatbuffers.Builder, receipt flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(receipt), 0)
|
||||||
|
}
|
||||||
|
func AdminResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BroadcastRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsBroadcastRequest(buf []byte, offset flatbuffers.UOffsetT) *BroadcastRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &BroadcastRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishBroadcastRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsBroadcastRequest(buf []byte, offset flatbuffers.UOffsetT) *BroadcastRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &BroadcastRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedBroadcastRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastRequest) Subject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastRequest) Body() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func BroadcastRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(3)
|
||||||
|
}
|
||||||
|
func BroadcastRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func BroadcastRequestAddSubject(builder *flatbuffers.Builder, subject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(subject), 0)
|
||||||
|
}
|
||||||
|
func BroadcastRequestAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(body), 0)
|
||||||
|
}
|
||||||
|
func BroadcastRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type BroadcastResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsBroadcastResponse(buf []byte, offset flatbuffers.UOffsetT) *BroadcastResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &BroadcastResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishBroadcastResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsBroadcastResponse(buf []byte, offset flatbuffers.UOffsetT) *BroadcastResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &BroadcastResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedBroadcastResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *BroadcastResponse) Receipt(obj *MailBroadcastReceipt) *MailBroadcastReceipt {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailBroadcastReceipt)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func BroadcastResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func BroadcastResponseAddReceipt(builder *flatbuffers.Builder, receipt flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(receipt), 0)
|
||||||
|
}
|
||||||
|
func BroadcastResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DeleteRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsDeleteRequest(buf []byte, offset flatbuffers.UOffsetT) *DeleteRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &DeleteRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishDeleteRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsDeleteRequest(buf []byte, offset flatbuffers.UOffsetT) *DeleteRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &DeleteRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedDeleteRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteRequest) MessageId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeleteRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(2)
|
||||||
|
}
|
||||||
|
func DeleteRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func DeleteRequestAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(1, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func DeleteRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DeleteResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsDeleteResponse(buf []byte, offset flatbuffers.UOffsetT) *DeleteResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &DeleteResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishDeleteResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsDeleteResponse(buf []byte, offset flatbuffers.UOffsetT) *DeleteResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &DeleteResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedDeleteResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *DeleteResponse) State(obj *MailRecipientState) *MailRecipientState {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailRecipientState)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeleteResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func DeleteResponseAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(state), 0)
|
||||||
|
}
|
||||||
|
func DeleteResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type InboxRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsInboxRequest(buf []byte, offset flatbuffers.UOffsetT) *InboxRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &InboxRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishInboxRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsInboxRequest(buf []byte, offset flatbuffers.UOffsetT) *InboxRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &InboxRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedInboxRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func InboxRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func InboxRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func InboxRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type InboxResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsInboxResponse(buf []byte, offset flatbuffers.UOffsetT) *InboxResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &InboxResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishInboxResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsInboxResponse(buf []byte, offset flatbuffers.UOffsetT) *InboxResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &InboxResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedInboxResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxResponse) Items(obj *MailMessage, j int) bool {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Vector(o)
|
||||||
|
x += flatbuffers.UOffsetT(j) * 4
|
||||||
|
x = rcv._tab.Indirect(x)
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *InboxResponse) ItemsLength() int {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.VectorLen(o)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func InboxResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func InboxResponseAddItems(builder *flatbuffers.Builder, items flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(items), 0)
|
||||||
|
}
|
||||||
|
func InboxResponseStartItemsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
|
||||||
|
return builder.StartVector(4, numElems, 4)
|
||||||
|
}
|
||||||
|
func InboxResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MailBroadcastReceipt struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsMailBroadcastReceipt(buf []byte, offset flatbuffers.UOffsetT) *MailBroadcastReceipt {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &MailBroadcastReceipt{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishMailBroadcastReceiptBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsMailBroadcastReceipt(buf []byte, offset flatbuffers.UOffsetT) *MailBroadcastReceipt {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &MailBroadcastReceipt{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedMailBroadcastReceiptBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) MessageId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) GameId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) GameName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) Kind() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) SenderKind() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) Subject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) Body() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) BodyLang() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) BroadcastScope() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) CreatedAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) MutateCreatedAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(22, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) RecipientCount() int32 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailBroadcastReceipt) MutateRecipientCount(n int32) bool {
|
||||||
|
return rcv._tab.MutateInt32Slot(24, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func MailBroadcastReceiptStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(11)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddGameName(builder *flatbuffers.Builder, gameName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(gameName), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddKind(builder *flatbuffers.Builder, kind flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(kind), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddSenderKind(builder *flatbuffers.Builder, senderKind flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(senderKind), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddSubject(builder *flatbuffers.Builder, subject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(subject), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(body), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddBodyLang(builder *flatbuffers.Builder, bodyLang flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(7, flatbuffers.UOffsetT(bodyLang), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddBroadcastScope(builder *flatbuffers.Builder, broadcastScope flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(broadcastScope), 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddCreatedAtMs(builder *flatbuffers.Builder, createdAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(9, createdAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptAddRecipientCount(builder *flatbuffers.Builder, recipientCount int32) {
|
||||||
|
builder.PrependInt32Slot(10, recipientCount, 0)
|
||||||
|
}
|
||||||
|
func MailBroadcastReceiptEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,303 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MailMessage struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsMailMessage(buf []byte, offset flatbuffers.UOffsetT) *MailMessage {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &MailMessage{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishMailMessageBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsMailMessage(buf []byte, offset flatbuffers.UOffsetT) *MailMessage {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &MailMessage{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedMailMessageBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) MessageId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) GameId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) GameName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Kind() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) SenderKind() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) SenderUserId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) SenderUsername() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) SenderRaceName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Subject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Body() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) BodyLang() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) BroadcastScope() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(26))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) CreatedAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(28))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) MutateCreatedAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(28, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) RecipientUserId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(30))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) RecipientUserName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(32))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) RecipientRaceName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(34))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) ReadAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(36))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) MutateReadAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(36, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) DeletedAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(38))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) MutateDeletedAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(38, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) TranslatedSubject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(40))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) TranslatedBody() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(42))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) TranslationLang() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(44))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailMessage) Translator() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(46))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func MailMessageStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(22)
|
||||||
|
}
|
||||||
|
func MailMessageAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddGameName(builder *flatbuffers.Builder, gameName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(gameName), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddKind(builder *flatbuffers.Builder, kind flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(kind), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddSenderKind(builder *flatbuffers.Builder, senderKind flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(senderKind), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddSenderUserId(builder *flatbuffers.Builder, senderUserId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(senderUserId), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddSenderUsername(builder *flatbuffers.Builder, senderUsername flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(6, flatbuffers.UOffsetT(senderUsername), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddSenderRaceName(builder *flatbuffers.Builder, senderRaceName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(7, flatbuffers.UOffsetT(senderRaceName), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddSubject(builder *flatbuffers.Builder, subject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(subject), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(9, flatbuffers.UOffsetT(body), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddBodyLang(builder *flatbuffers.Builder, bodyLang flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(10, flatbuffers.UOffsetT(bodyLang), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddBroadcastScope(builder *flatbuffers.Builder, broadcastScope flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(11, flatbuffers.UOffsetT(broadcastScope), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddCreatedAtMs(builder *flatbuffers.Builder, createdAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(12, createdAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddRecipientUserId(builder *flatbuffers.Builder, recipientUserId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(13, flatbuffers.UOffsetT(recipientUserId), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddRecipientUserName(builder *flatbuffers.Builder, recipientUserName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(14, flatbuffers.UOffsetT(recipientUserName), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddRecipientRaceName(builder *flatbuffers.Builder, recipientRaceName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(15, flatbuffers.UOffsetT(recipientRaceName), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddReadAtMs(builder *flatbuffers.Builder, readAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(16, readAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddDeletedAtMs(builder *flatbuffers.Builder, deletedAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(17, deletedAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddTranslatedSubject(builder *flatbuffers.Builder, translatedSubject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(18, flatbuffers.UOffsetT(translatedSubject), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddTranslatedBody(builder *flatbuffers.Builder, translatedBody flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(19, flatbuffers.UOffsetT(translatedBody), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddTranslationLang(builder *flatbuffers.Builder, translationLang flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(20, flatbuffers.UOffsetT(translationLang), 0)
|
||||||
|
}
|
||||||
|
func MailMessageAddTranslator(builder *flatbuffers.Builder, translator flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(21, flatbuffers.UOffsetT(translator), 0)
|
||||||
|
}
|
||||||
|
func MailMessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MailRecipientState struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsMailRecipientState(buf []byte, offset flatbuffers.UOffsetT) *MailRecipientState {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &MailRecipientState{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishMailRecipientStateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsMailRecipientState(buf []byte, offset flatbuffers.UOffsetT) *MailRecipientState {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &MailRecipientState{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedMailRecipientStateBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) MessageId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) ReadAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) MutateReadAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(6, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) DeletedAtMs() int64 {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MailRecipientState) MutateDeletedAtMs(n int64) bool {
|
||||||
|
return rcv._tab.MutateInt64Slot(8, n)
|
||||||
|
}
|
||||||
|
|
||||||
|
func MailRecipientStateStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(3)
|
||||||
|
}
|
||||||
|
func MailRecipientStateAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func MailRecipientStateAddReadAtMs(builder *flatbuffers.Builder, readAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(1, readAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailRecipientStateAddDeletedAtMs(builder *flatbuffers.Builder, deletedAtMs int64) {
|
||||||
|
builder.PrependInt64Slot(2, deletedAtMs, 0)
|
||||||
|
}
|
||||||
|
func MailRecipientStateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MessageGetRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsMessageGetRequest(buf []byte, offset flatbuffers.UOffsetT) *MessageGetRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &MessageGetRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishMessageGetRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsMessageGetRequest(buf []byte, offset flatbuffers.UOffsetT) *MessageGetRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &MessageGetRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedMessageGetRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetRequest) MessageId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func MessageGetRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(2)
|
||||||
|
}
|
||||||
|
func MessageGetRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func MessageGetRequestAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(1, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func MessageGetRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MessageGetResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsMessageGetResponse(buf []byte, offset flatbuffers.UOffsetT) *MessageGetResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &MessageGetResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishMessageGetResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsMessageGetResponse(buf []byte, offset flatbuffers.UOffsetT) *MessageGetResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &MessageGetResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedMessageGetResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *MessageGetResponse) Message(obj *MailMessage) *MailMessage {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailMessage)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func MessageGetResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func MessageGetResponseAddMessage(builder *flatbuffers.Builder, message flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(message), 0)
|
||||||
|
}
|
||||||
|
func MessageGetResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ReadRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsReadRequest(buf []byte, offset flatbuffers.UOffsetT) *ReadRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &ReadRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishReadRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsReadRequest(buf []byte, offset flatbuffers.UOffsetT) *ReadRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &ReadRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedReadRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadRequest) MessageId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ReadRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(2)
|
||||||
|
}
|
||||||
|
func ReadRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func ReadRequestAddMessageId(builder *flatbuffers.Builder, messageId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(1, flatbuffers.UOffsetT(messageId), 0)
|
||||||
|
}
|
||||||
|
func ReadRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ReadResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsReadResponse(buf []byte, offset flatbuffers.UOffsetT) *ReadResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &ReadResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishReadResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsReadResponse(buf []byte, offset flatbuffers.UOffsetT) *ReadResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &ReadResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedReadResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *ReadResponse) State(obj *MailRecipientState) *MailRecipientState {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailRecipientState)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func ReadResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func ReadResponseAddState(builder *flatbuffers.Builder, state flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(state), 0)
|
||||||
|
}
|
||||||
|
func ReadResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SendRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsSendRequest(buf []byte, offset flatbuffers.UOffsetT) *SendRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &SendRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSendRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsSendRequest(buf []byte, offset flatbuffers.UOffsetT) *SendRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &SendRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedSendRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) RecipientUserId() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) RecipientRaceName() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) Subject() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendRequest) Body() []byte {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SendRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(5)
|
||||||
|
}
|
||||||
|
func SendRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func SendRequestAddRecipientUserId(builder *flatbuffers.Builder, recipientUserId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(recipientUserId), 0)
|
||||||
|
}
|
||||||
|
func SendRequestAddRecipientRaceName(builder *flatbuffers.Builder, recipientRaceName flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(recipientRaceName), 0)
|
||||||
|
}
|
||||||
|
func SendRequestAddSubject(builder *flatbuffers.Builder, subject flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(subject), 0)
|
||||||
|
}
|
||||||
|
func SendRequestAddBody(builder *flatbuffers.Builder, body flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(body), 0)
|
||||||
|
}
|
||||||
|
func SendRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SendResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsSendResponse(buf []byte, offset flatbuffers.UOffsetT) *SendResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &SendResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSendResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsSendResponse(buf []byte, offset flatbuffers.UOffsetT) *SendResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &SendResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedSendResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SendResponse) Message(obj *MailMessage) *MailMessage {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(MailMessage)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SendResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func SendResponseAddMessage(builder *flatbuffers.Builder, message flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(message), 0)
|
||||||
|
}
|
||||||
|
func SendResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
|
||||||
|
common "galaxy/schema/fbs/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SentRequest struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsSentRequest(buf []byte, offset flatbuffers.UOffsetT) *SentRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &SentRequest{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSentRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsSentRequest(buf []byte, offset flatbuffers.UOffsetT) *SentRequest {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &SentRequest{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedSentRequestBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentRequest) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentRequest) GameId(obj *common.UUID) *common.UUID {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := o + rcv._tab.Pos
|
||||||
|
if obj == nil {
|
||||||
|
obj = new(common.UUID)
|
||||||
|
}
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func SentRequestStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func SentRequestAddGameId(builder *flatbuffers.Builder, gameId flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependStructSlot(0, flatbuffers.UOffsetT(gameId), 0)
|
||||||
|
}
|
||||||
|
func SentRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
|
package diplomail
|
||||||
|
|
||||||
|
import (
|
||||||
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
|
)
|
||||||
|
|
||||||
|
type SentResponse struct {
|
||||||
|
_tab flatbuffers.Table
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetRootAsSentResponse(buf []byte, offset flatbuffers.UOffsetT) *SentResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||||
|
x := &SentResponse{}
|
||||||
|
x.Init(buf, n+offset)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSentResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.Finish(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetSizePrefixedRootAsSentResponse(buf []byte, offset flatbuffers.UOffsetT) *SentResponse {
|
||||||
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||||
|
x := &SentResponse{}
|
||||||
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
func FinishSizePrefixedSentResponseBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
||||||
|
builder.FinishSizePrefixed(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentResponse) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||||
|
rcv._tab.Bytes = buf
|
||||||
|
rcv._tab.Pos = i
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentResponse) Table() flatbuffers.Table {
|
||||||
|
return rcv._tab
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentResponse) Items(obj *MailMessage, j int) bool {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
x := rcv._tab.Vector(o)
|
||||||
|
x += flatbuffers.UOffsetT(j) * 4
|
||||||
|
x = rcv._tab.Indirect(x)
|
||||||
|
obj.Init(rcv._tab.Bytes, x)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rcv *SentResponse) ItemsLength() int {
|
||||||
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||||
|
if o != 0 {
|
||||||
|
return rcv._tab.VectorLen(o)
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func SentResponseStart(builder *flatbuffers.Builder) {
|
||||||
|
builder.StartObject(1)
|
||||||
|
}
|
||||||
|
func SentResponseAddItems(builder *flatbuffers.Builder, items flatbuffers.UOffsetT) {
|
||||||
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(items), 0)
|
||||||
|
}
|
||||||
|
func SentResponseStartItemsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
|
||||||
|
return builder.StartVector(4, numElems, 4)
|
||||||
|
}
|
||||||
|
func SentResponseEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||||
|
return builder.EndObject()
|
||||||
|
}
|
||||||
+1
-1
@@ -6,7 +6,7 @@ WASM_OUT := frontend/static/core.wasm
|
|||||||
WASM_EXEC := frontend/static/wasm_exec.js
|
WASM_EXEC := frontend/static/wasm_exec.js
|
||||||
TINYGO_ROOT := $(shell tinygo env TINYGOROOT 2>/dev/null)
|
TINYGO_ROOT := $(shell tinygo env TINYGOROOT 2>/dev/null)
|
||||||
FBS_OUT := frontend/src/proto/galaxy/fbs
|
FBS_OUT := frontend/src/proto/galaxy/fbs
|
||||||
FBS_INPUTS := ../pkg/schema/fbs/common.fbs ../pkg/schema/fbs/lobby.fbs ../pkg/schema/fbs/user.fbs ../pkg/schema/fbs/report.fbs ../pkg/schema/fbs/order.fbs
|
FBS_INPUTS := ../pkg/schema/fbs/common.fbs ../pkg/schema/fbs/lobby.fbs ../pkg/schema/fbs/user.fbs ../pkg/schema/fbs/report.fbs ../pkg/schema/fbs/order.fbs ../pkg/schema/fbs/diplomail.fbs
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "ui targets:"
|
@echo "ui targets:"
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
export { AdminRequest, AdminRequestT } from './diplomail/admin-request.js';
|
||||||
|
export { AdminResponse, AdminResponseT } from './diplomail/admin-response.js';
|
||||||
|
export { BroadcastRequest, BroadcastRequestT } from './diplomail/broadcast-request.js';
|
||||||
|
export { BroadcastResponse, BroadcastResponseT } from './diplomail/broadcast-response.js';
|
||||||
|
export { DeleteRequest, DeleteRequestT } from './diplomail/delete-request.js';
|
||||||
|
export { DeleteResponse, DeleteResponseT } from './diplomail/delete-response.js';
|
||||||
|
export { InboxRequest, InboxRequestT } from './diplomail/inbox-request.js';
|
||||||
|
export { InboxResponse, InboxResponseT } from './diplomail/inbox-response.js';
|
||||||
|
export { MailBroadcastReceipt, MailBroadcastReceiptT } from './diplomail/mail-broadcast-receipt.js';
|
||||||
|
export { MailMessage, MailMessageT } from './diplomail/mail-message.js';
|
||||||
|
export { MailRecipientState, MailRecipientStateT } from './diplomail/mail-recipient-state.js';
|
||||||
|
export { MessageGetRequest, MessageGetRequestT } from './diplomail/message-get-request.js';
|
||||||
|
export { MessageGetResponse, MessageGetResponseT } from './diplomail/message-get-response.js';
|
||||||
|
export { ReadRequest, ReadRequestT } from './diplomail/read-request.js';
|
||||||
|
export { ReadResponse, ReadResponseT } from './diplomail/read-response.js';
|
||||||
|
export { SendRequest, SendRequestT } from './diplomail/send-request.js';
|
||||||
|
export { SendResponse, SendResponseT } from './diplomail/send-response.js';
|
||||||
|
export { SentRequest, SentRequestT } from './diplomail/sent-request.js';
|
||||||
|
export { SentResponse, SentResponseT } from './diplomail/sent-response.js';
|
||||||
@@ -0,0 +1,179 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class AdminRequest implements flatbuffers.IUnpackableObject<AdminRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):AdminRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsAdminRequest(bb:flatbuffers.ByteBuffer, obj?:AdminRequest):AdminRequest {
|
||||||
|
return (obj || new AdminRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsAdminRequest(bb:flatbuffers.ByteBuffer, obj?:AdminRequest):AdminRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new AdminRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
target():string|null
|
||||||
|
target(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
target(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientUserId():string|null
|
||||||
|
recipientUserId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientUserId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientRaceName():string|null
|
||||||
|
recipientRaceName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientRaceName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipients():string|null
|
||||||
|
recipients(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipients(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
subject():string|null
|
||||||
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
body():string|null
|
||||||
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 16);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startAdminRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(7);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addTarget(builder:flatbuffers.Builder, targetOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, targetOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientUserId(builder:flatbuffers.Builder, recipientUserIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(2, recipientUserIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientRaceName(builder:flatbuffers.Builder, recipientRaceNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(3, recipientRaceNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipients(builder:flatbuffers.Builder, recipientsOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(4, recipientsOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(5, subjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(6, bodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endAdminRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createAdminRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, targetOffset:flatbuffers.Offset, recipientUserIdOffset:flatbuffers.Offset, recipientRaceNameOffset:flatbuffers.Offset, recipientsOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
AdminRequest.startAdminRequest(builder);
|
||||||
|
AdminRequest.addGameId(builder, gameIdOffset);
|
||||||
|
AdminRequest.addTarget(builder, targetOffset);
|
||||||
|
AdminRequest.addRecipientUserId(builder, recipientUserIdOffset);
|
||||||
|
AdminRequest.addRecipientRaceName(builder, recipientRaceNameOffset);
|
||||||
|
AdminRequest.addRecipients(builder, recipientsOffset);
|
||||||
|
AdminRequest.addSubject(builder, subjectOffset);
|
||||||
|
AdminRequest.addBody(builder, bodyOffset);
|
||||||
|
return AdminRequest.endAdminRequest(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): AdminRequestT {
|
||||||
|
return new AdminRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
this.target(),
|
||||||
|
this.recipientUserId(),
|
||||||
|
this.recipientRaceName(),
|
||||||
|
this.recipients(),
|
||||||
|
this.subject(),
|
||||||
|
this.body()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: AdminRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.target = this.target();
|
||||||
|
_o.recipientUserId = this.recipientUserId();
|
||||||
|
_o.recipientRaceName = this.recipientRaceName();
|
||||||
|
_o.recipients = this.recipients();
|
||||||
|
_o.subject = this.subject();
|
||||||
|
_o.body = this.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class AdminRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public target: string|Uint8Array|null = null,
|
||||||
|
public recipientUserId: string|Uint8Array|null = null,
|
||||||
|
public recipientRaceName: string|Uint8Array|null = null,
|
||||||
|
public recipients: string|Uint8Array|null = null,
|
||||||
|
public subject: string|Uint8Array|null = null,
|
||||||
|
public body: string|Uint8Array|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const target = (this.target !== null ? builder.createString(this.target!) : 0);
|
||||||
|
const recipientUserId = (this.recipientUserId !== null ? builder.createString(this.recipientUserId!) : 0);
|
||||||
|
const recipientRaceName = (this.recipientRaceName !== null ? builder.createString(this.recipientRaceName!) : 0);
|
||||||
|
const recipients = (this.recipients !== null ? builder.createString(this.recipients!) : 0);
|
||||||
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
||||||
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
||||||
|
|
||||||
|
return AdminRequest.createAdminRequest(builder,
|
||||||
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
|
||||||
|
target,
|
||||||
|
recipientUserId,
|
||||||
|
recipientRaceName,
|
||||||
|
recipients,
|
||||||
|
subject,
|
||||||
|
body
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailBroadcastReceipt, MailBroadcastReceiptT } from '../diplomail/mail-broadcast-receipt.js';
|
||||||
|
import { MailMessage, MailMessageT } from '../diplomail/mail-message.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class AdminResponse implements flatbuffers.IUnpackableObject<AdminResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):AdminResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsAdminResponse(bb:flatbuffers.ByteBuffer, obj?:AdminResponse):AdminResponse {
|
||||||
|
return (obj || new AdminResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsAdminResponse(bb:flatbuffers.ByteBuffer, obj?:AdminResponse):AdminResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new AdminResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
message(obj?:MailMessage):MailMessage|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailMessage()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
receipt(obj?:MailBroadcastReceipt):MailBroadcastReceipt|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? (obj || new MailBroadcastReceipt()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startAdminResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addReceipt(builder:flatbuffers.Builder, receiptOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, receiptOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endAdminResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpack(): AdminResponseT {
|
||||||
|
return new AdminResponseT(
|
||||||
|
(this.message() !== null ? this.message()!.unpack() : null),
|
||||||
|
(this.receipt() !== null ? this.receipt()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: AdminResponseT): void {
|
||||||
|
_o.message = (this.message() !== null ? this.message()!.unpack() : null);
|
||||||
|
_o.receipt = (this.receipt() !== null ? this.receipt()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class AdminResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public message: MailMessageT|null = null,
|
||||||
|
public receipt: MailBroadcastReceiptT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const message = (this.message !== null ? this.message!.pack(builder) : 0);
|
||||||
|
const receipt = (this.receipt !== null ? this.receipt!.pack(builder) : 0);
|
||||||
|
|
||||||
|
AdminResponse.startAdminResponse(builder);
|
||||||
|
AdminResponse.addMessage(builder, message);
|
||||||
|
AdminResponse.addReceipt(builder, receipt);
|
||||||
|
|
||||||
|
return AdminResponse.endAdminResponse(builder);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class BroadcastRequest implements flatbuffers.IUnpackableObject<BroadcastRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):BroadcastRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsBroadcastRequest(bb:flatbuffers.ByteBuffer, obj?:BroadcastRequest):BroadcastRequest {
|
||||||
|
return (obj || new BroadcastRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsBroadcastRequest(bb:flatbuffers.ByteBuffer, obj?:BroadcastRequest):BroadcastRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new BroadcastRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
subject():string|null
|
||||||
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
body():string|null
|
||||||
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startBroadcastRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, subjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(2, bodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endBroadcastRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createBroadcastRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
BroadcastRequest.startBroadcastRequest(builder);
|
||||||
|
BroadcastRequest.addGameId(builder, gameIdOffset);
|
||||||
|
BroadcastRequest.addSubject(builder, subjectOffset);
|
||||||
|
BroadcastRequest.addBody(builder, bodyOffset);
|
||||||
|
return BroadcastRequest.endBroadcastRequest(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): BroadcastRequestT {
|
||||||
|
return new BroadcastRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
this.subject(),
|
||||||
|
this.body()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: BroadcastRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.subject = this.subject();
|
||||||
|
_o.body = this.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BroadcastRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public subject: string|Uint8Array|null = null,
|
||||||
|
public body: string|Uint8Array|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
||||||
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
||||||
|
|
||||||
|
return BroadcastRequest.createBroadcastRequest(builder,
|
||||||
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
|
||||||
|
subject,
|
||||||
|
body
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailBroadcastReceipt, MailBroadcastReceiptT } from '../diplomail/mail-broadcast-receipt.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class BroadcastResponse implements flatbuffers.IUnpackableObject<BroadcastResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):BroadcastResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsBroadcastResponse(bb:flatbuffers.ByteBuffer, obj?:BroadcastResponse):BroadcastResponse {
|
||||||
|
return (obj || new BroadcastResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsBroadcastResponse(bb:flatbuffers.ByteBuffer, obj?:BroadcastResponse):BroadcastResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new BroadcastResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
receipt(obj?:MailBroadcastReceipt):MailBroadcastReceipt|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailBroadcastReceipt()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startBroadcastResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addReceipt(builder:flatbuffers.Builder, receiptOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, receiptOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endBroadcastResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createBroadcastResponse(builder:flatbuffers.Builder, receiptOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
BroadcastResponse.startBroadcastResponse(builder);
|
||||||
|
BroadcastResponse.addReceipt(builder, receiptOffset);
|
||||||
|
return BroadcastResponse.endBroadcastResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): BroadcastResponseT {
|
||||||
|
return new BroadcastResponseT(
|
||||||
|
(this.receipt() !== null ? this.receipt()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: BroadcastResponseT): void {
|
||||||
|
_o.receipt = (this.receipt() !== null ? this.receipt()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BroadcastResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public receipt: MailBroadcastReceiptT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const receipt = (this.receipt !== null ? this.receipt!.pack(builder) : 0);
|
||||||
|
|
||||||
|
return BroadcastResponse.createBroadcastResponse(builder,
|
||||||
|
receipt
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class DeleteRequest implements flatbuffers.IUnpackableObject<DeleteRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):DeleteRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsDeleteRequest(bb:flatbuffers.ByteBuffer, obj?:DeleteRequest):DeleteRequest {
|
||||||
|
return (obj || new DeleteRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsDeleteRequest(bb:flatbuffers.ByteBuffer, obj?:DeleteRequest):DeleteRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new DeleteRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startDeleteRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(1, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endDeleteRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
builder.requiredField(offset, 6) // message_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpack(): DeleteRequestT {
|
||||||
|
return new DeleteRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
(this.messageId() !== null ? this.messageId()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: DeleteRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.messageId = (this.messageId() !== null ? this.messageId()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DeleteRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public messageId: UUIDT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
DeleteRequest.startDeleteRequest(builder);
|
||||||
|
DeleteRequest.addGameId(builder, (this.gameId !== null ? this.gameId!.pack(builder) : 0));
|
||||||
|
DeleteRequest.addMessageId(builder, (this.messageId !== null ? this.messageId!.pack(builder) : 0));
|
||||||
|
|
||||||
|
return DeleteRequest.endDeleteRequest(builder);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailRecipientState, MailRecipientStateT } from '../diplomail/mail-recipient-state.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class DeleteResponse implements flatbuffers.IUnpackableObject<DeleteResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):DeleteResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsDeleteResponse(bb:flatbuffers.ByteBuffer, obj?:DeleteResponse):DeleteResponse {
|
||||||
|
return (obj || new DeleteResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsDeleteResponse(bb:flatbuffers.ByteBuffer, obj?:DeleteResponse):DeleteResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new DeleteResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
state(obj?:MailRecipientState):MailRecipientState|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailRecipientState()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startDeleteResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addState(builder:flatbuffers.Builder, stateOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, stateOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endDeleteResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createDeleteResponse(builder:flatbuffers.Builder, stateOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
DeleteResponse.startDeleteResponse(builder);
|
||||||
|
DeleteResponse.addState(builder, stateOffset);
|
||||||
|
return DeleteResponse.endDeleteResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): DeleteResponseT {
|
||||||
|
return new DeleteResponseT(
|
||||||
|
(this.state() !== null ? this.state()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: DeleteResponseT): void {
|
||||||
|
_o.state = (this.state() !== null ? this.state()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DeleteResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public state: MailRecipientStateT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const state = (this.state !== null ? this.state!.pack(builder) : 0);
|
||||||
|
|
||||||
|
return DeleteResponse.createDeleteResponse(builder,
|
||||||
|
state
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class InboxRequest implements flatbuffers.IUnpackableObject<InboxRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):InboxRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsInboxRequest(bb:flatbuffers.ByteBuffer, obj?:InboxRequest):InboxRequest {
|
||||||
|
return (obj || new InboxRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsInboxRequest(bb:flatbuffers.ByteBuffer, obj?:InboxRequest):InboxRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new InboxRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startInboxRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endInboxRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createInboxRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
InboxRequest.startInboxRequest(builder);
|
||||||
|
InboxRequest.addGameId(builder, gameIdOffset);
|
||||||
|
return InboxRequest.endInboxRequest(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): InboxRequestT {
|
||||||
|
return new InboxRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: InboxRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class InboxRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
return InboxRequest.createInboxRequest(builder,
|
||||||
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailMessage, MailMessageT } from '../diplomail/mail-message.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class InboxResponse implements flatbuffers.IUnpackableObject<InboxResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):InboxResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsInboxResponse(bb:flatbuffers.ByteBuffer, obj?:InboxResponse):InboxResponse {
|
||||||
|
return (obj || new InboxResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsInboxResponse(bb:flatbuffers.ByteBuffer, obj?:InboxResponse):InboxResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new InboxResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
items(index: number, obj?:MailMessage):MailMessage|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailMessage()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
itemsLength():number {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startInboxResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addItems(builder:flatbuffers.Builder, itemsOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, itemsOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static createItemsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
||||||
|
builder.startVector(4, data.length, 4);
|
||||||
|
for (let i = data.length - 1; i >= 0; i--) {
|
||||||
|
builder.addOffset(data[i]!);
|
||||||
|
}
|
||||||
|
return builder.endVector();
|
||||||
|
}
|
||||||
|
|
||||||
|
static startItemsVector(builder:flatbuffers.Builder, numElems:number) {
|
||||||
|
builder.startVector(4, numElems, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endInboxResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createInboxResponse(builder:flatbuffers.Builder, itemsOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
InboxResponse.startInboxResponse(builder);
|
||||||
|
InboxResponse.addItems(builder, itemsOffset);
|
||||||
|
return InboxResponse.endInboxResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): InboxResponseT {
|
||||||
|
return new InboxResponseT(
|
||||||
|
this.bb!.createObjList<MailMessage, MailMessageT>(this.items.bind(this), this.itemsLength())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: InboxResponseT): void {
|
||||||
|
_o.items = this.bb!.createObjList<MailMessage, MailMessageT>(this.items.bind(this), this.itemsLength());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class InboxResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public items: (MailMessageT)[] = []
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const items = InboxResponse.createItemsVector(builder, builder.createObjectOffsetList(this.items));
|
||||||
|
|
||||||
|
return InboxResponse.createInboxResponse(builder,
|
||||||
|
items
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,242 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class MailBroadcastReceipt implements flatbuffers.IUnpackableObject<MailBroadcastReceiptT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):MailBroadcastReceipt {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsMailBroadcastReceipt(bb:flatbuffers.ByteBuffer, obj?:MailBroadcastReceipt):MailBroadcastReceipt {
|
||||||
|
return (obj || new MailBroadcastReceipt()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsMailBroadcastReceipt(bb:flatbuffers.ByteBuffer, obj?:MailBroadcastReceipt):MailBroadcastReceipt {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new MailBroadcastReceipt()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId():string|null
|
||||||
|
messageId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
messageId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId():string|null
|
||||||
|
gameId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
gameId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
gameName():string|null
|
||||||
|
gameName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
gameName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
kind():string|null
|
||||||
|
kind(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
kind(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderKind():string|null
|
||||||
|
senderKind(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
senderKind(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
subject():string|null
|
||||||
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
body():string|null
|
||||||
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 16);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
bodyLang():string|null
|
||||||
|
bodyLang(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
bodyLang(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 18);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcastScope():string|null
|
||||||
|
broadcastScope(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
broadcastScope(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 20);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
createdAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 22);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientCount():number {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 24);
|
||||||
|
return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startMailBroadcastReceipt(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(11);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameName(builder:flatbuffers.Builder, gameNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(2, gameNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addKind(builder:flatbuffers.Builder, kindOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(3, kindOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSenderKind(builder:flatbuffers.Builder, senderKindOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(4, senderKindOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(5, subjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(6, bodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBodyLang(builder:flatbuffers.Builder, bodyLangOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(7, bodyLangOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBroadcastScope(builder:flatbuffers.Builder, broadcastScopeOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(8, broadcastScopeOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addCreatedAtMs(builder:flatbuffers.Builder, createdAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(9, createdAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientCount(builder:flatbuffers.Builder, recipientCount:number) {
|
||||||
|
builder.addFieldInt32(10, recipientCount, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endMailBroadcastReceipt(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createMailBroadcastReceipt(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset, gameIdOffset:flatbuffers.Offset, gameNameOffset:flatbuffers.Offset, kindOffset:flatbuffers.Offset, senderKindOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset, bodyLangOffset:flatbuffers.Offset, broadcastScopeOffset:flatbuffers.Offset, createdAtMs:bigint, recipientCount:number):flatbuffers.Offset {
|
||||||
|
MailBroadcastReceipt.startMailBroadcastReceipt(builder);
|
||||||
|
MailBroadcastReceipt.addMessageId(builder, messageIdOffset);
|
||||||
|
MailBroadcastReceipt.addGameId(builder, gameIdOffset);
|
||||||
|
MailBroadcastReceipt.addGameName(builder, gameNameOffset);
|
||||||
|
MailBroadcastReceipt.addKind(builder, kindOffset);
|
||||||
|
MailBroadcastReceipt.addSenderKind(builder, senderKindOffset);
|
||||||
|
MailBroadcastReceipt.addSubject(builder, subjectOffset);
|
||||||
|
MailBroadcastReceipt.addBody(builder, bodyOffset);
|
||||||
|
MailBroadcastReceipt.addBodyLang(builder, bodyLangOffset);
|
||||||
|
MailBroadcastReceipt.addBroadcastScope(builder, broadcastScopeOffset);
|
||||||
|
MailBroadcastReceipt.addCreatedAtMs(builder, createdAtMs);
|
||||||
|
MailBroadcastReceipt.addRecipientCount(builder, recipientCount);
|
||||||
|
return MailBroadcastReceipt.endMailBroadcastReceipt(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): MailBroadcastReceiptT {
|
||||||
|
return new MailBroadcastReceiptT(
|
||||||
|
this.messageId(),
|
||||||
|
this.gameId(),
|
||||||
|
this.gameName(),
|
||||||
|
this.kind(),
|
||||||
|
this.senderKind(),
|
||||||
|
this.subject(),
|
||||||
|
this.body(),
|
||||||
|
this.bodyLang(),
|
||||||
|
this.broadcastScope(),
|
||||||
|
this.createdAtMs(),
|
||||||
|
this.recipientCount()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: MailBroadcastReceiptT): void {
|
||||||
|
_o.messageId = this.messageId();
|
||||||
|
_o.gameId = this.gameId();
|
||||||
|
_o.gameName = this.gameName();
|
||||||
|
_o.kind = this.kind();
|
||||||
|
_o.senderKind = this.senderKind();
|
||||||
|
_o.subject = this.subject();
|
||||||
|
_o.body = this.body();
|
||||||
|
_o.bodyLang = this.bodyLang();
|
||||||
|
_o.broadcastScope = this.broadcastScope();
|
||||||
|
_o.createdAtMs = this.createdAtMs();
|
||||||
|
_o.recipientCount = this.recipientCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MailBroadcastReceiptT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public messageId: string|Uint8Array|null = null,
|
||||||
|
public gameId: string|Uint8Array|null = null,
|
||||||
|
public gameName: string|Uint8Array|null = null,
|
||||||
|
public kind: string|Uint8Array|null = null,
|
||||||
|
public senderKind: string|Uint8Array|null = null,
|
||||||
|
public subject: string|Uint8Array|null = null,
|
||||||
|
public body: string|Uint8Array|null = null,
|
||||||
|
public bodyLang: string|Uint8Array|null = null,
|
||||||
|
public broadcastScope: string|Uint8Array|null = null,
|
||||||
|
public createdAtMs: bigint = BigInt('0'),
|
||||||
|
public recipientCount: number = 0
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const messageId = (this.messageId !== null ? builder.createString(this.messageId!) : 0);
|
||||||
|
const gameId = (this.gameId !== null ? builder.createString(this.gameId!) : 0);
|
||||||
|
const gameName = (this.gameName !== null ? builder.createString(this.gameName!) : 0);
|
||||||
|
const kind = (this.kind !== null ? builder.createString(this.kind!) : 0);
|
||||||
|
const senderKind = (this.senderKind !== null ? builder.createString(this.senderKind!) : 0);
|
||||||
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
||||||
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
||||||
|
const bodyLang = (this.bodyLang !== null ? builder.createString(this.bodyLang!) : 0);
|
||||||
|
const broadcastScope = (this.broadcastScope !== null ? builder.createString(this.broadcastScope!) : 0);
|
||||||
|
|
||||||
|
return MailBroadcastReceipt.createMailBroadcastReceipt(builder,
|
||||||
|
messageId,
|
||||||
|
gameId,
|
||||||
|
gameName,
|
||||||
|
kind,
|
||||||
|
senderKind,
|
||||||
|
subject,
|
||||||
|
body,
|
||||||
|
bodyLang,
|
||||||
|
broadcastScope,
|
||||||
|
this.createdAtMs,
|
||||||
|
this.recipientCount
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,426 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class MailMessage implements flatbuffers.IUnpackableObject<MailMessageT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):MailMessage {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsMailMessage(bb:flatbuffers.ByteBuffer, obj?:MailMessage):MailMessage {
|
||||||
|
return (obj || new MailMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsMailMessage(bb:flatbuffers.ByteBuffer, obj?:MailMessage):MailMessage {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new MailMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId():string|null
|
||||||
|
messageId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
messageId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId():string|null
|
||||||
|
gameId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
gameId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
gameName():string|null
|
||||||
|
gameName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
gameName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
kind():string|null
|
||||||
|
kind(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
kind(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderKind():string|null
|
||||||
|
senderKind(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
senderKind(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderUserId():string|null
|
||||||
|
senderUserId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
senderUserId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderUsername():string|null
|
||||||
|
senderUsername(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
senderUsername(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 16);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderRaceName():string|null
|
||||||
|
senderRaceName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
senderRaceName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 18);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
subject():string|null
|
||||||
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 20);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
body():string|null
|
||||||
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 22);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
bodyLang():string|null
|
||||||
|
bodyLang(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
bodyLang(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 24);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcastScope():string|null
|
||||||
|
broadcastScope(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
broadcastScope(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 26);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
createdAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 28);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientUserId():string|null
|
||||||
|
recipientUserId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientUserId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 30);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientUserName():string|null
|
||||||
|
recipientUserName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientUserName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 32);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientRaceName():string|null
|
||||||
|
recipientRaceName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientRaceName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 34);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
readAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 36);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
deletedAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 38);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
translatedSubject():string|null
|
||||||
|
translatedSubject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
translatedSubject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 40);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
translatedBody():string|null
|
||||||
|
translatedBody(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
translatedBody(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 42);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
translationLang():string|null
|
||||||
|
translationLang(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
translationLang(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 44);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
translator():string|null
|
||||||
|
translator(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
translator(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 46);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startMailMessage(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(22);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameName(builder:flatbuffers.Builder, gameNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(2, gameNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addKind(builder:flatbuffers.Builder, kindOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(3, kindOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSenderKind(builder:flatbuffers.Builder, senderKindOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(4, senderKindOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSenderUserId(builder:flatbuffers.Builder, senderUserIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(5, senderUserIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSenderUsername(builder:flatbuffers.Builder, senderUsernameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(6, senderUsernameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSenderRaceName(builder:flatbuffers.Builder, senderRaceNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(7, senderRaceNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(8, subjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(9, bodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBodyLang(builder:flatbuffers.Builder, bodyLangOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(10, bodyLangOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBroadcastScope(builder:flatbuffers.Builder, broadcastScopeOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(11, broadcastScopeOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addCreatedAtMs(builder:flatbuffers.Builder, createdAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(12, createdAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientUserId(builder:flatbuffers.Builder, recipientUserIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(13, recipientUserIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientUserName(builder:flatbuffers.Builder, recipientUserNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(14, recipientUserNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientRaceName(builder:flatbuffers.Builder, recipientRaceNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(15, recipientRaceNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addReadAtMs(builder:flatbuffers.Builder, readAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(16, readAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static addDeletedAtMs(builder:flatbuffers.Builder, deletedAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(17, deletedAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static addTranslatedSubject(builder:flatbuffers.Builder, translatedSubjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(18, translatedSubjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addTranslatedBody(builder:flatbuffers.Builder, translatedBodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(19, translatedBodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addTranslationLang(builder:flatbuffers.Builder, translationLangOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(20, translationLangOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addTranslator(builder:flatbuffers.Builder, translatorOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(21, translatorOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endMailMessage(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createMailMessage(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset, gameIdOffset:flatbuffers.Offset, gameNameOffset:flatbuffers.Offset, kindOffset:flatbuffers.Offset, senderKindOffset:flatbuffers.Offset, senderUserIdOffset:flatbuffers.Offset, senderUsernameOffset:flatbuffers.Offset, senderRaceNameOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset, bodyLangOffset:flatbuffers.Offset, broadcastScopeOffset:flatbuffers.Offset, createdAtMs:bigint, recipientUserIdOffset:flatbuffers.Offset, recipientUserNameOffset:flatbuffers.Offset, recipientRaceNameOffset:flatbuffers.Offset, readAtMs:bigint, deletedAtMs:bigint, translatedSubjectOffset:flatbuffers.Offset, translatedBodyOffset:flatbuffers.Offset, translationLangOffset:flatbuffers.Offset, translatorOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
MailMessage.startMailMessage(builder);
|
||||||
|
MailMessage.addMessageId(builder, messageIdOffset);
|
||||||
|
MailMessage.addGameId(builder, gameIdOffset);
|
||||||
|
MailMessage.addGameName(builder, gameNameOffset);
|
||||||
|
MailMessage.addKind(builder, kindOffset);
|
||||||
|
MailMessage.addSenderKind(builder, senderKindOffset);
|
||||||
|
MailMessage.addSenderUserId(builder, senderUserIdOffset);
|
||||||
|
MailMessage.addSenderUsername(builder, senderUsernameOffset);
|
||||||
|
MailMessage.addSenderRaceName(builder, senderRaceNameOffset);
|
||||||
|
MailMessage.addSubject(builder, subjectOffset);
|
||||||
|
MailMessage.addBody(builder, bodyOffset);
|
||||||
|
MailMessage.addBodyLang(builder, bodyLangOffset);
|
||||||
|
MailMessage.addBroadcastScope(builder, broadcastScopeOffset);
|
||||||
|
MailMessage.addCreatedAtMs(builder, createdAtMs);
|
||||||
|
MailMessage.addRecipientUserId(builder, recipientUserIdOffset);
|
||||||
|
MailMessage.addRecipientUserName(builder, recipientUserNameOffset);
|
||||||
|
MailMessage.addRecipientRaceName(builder, recipientRaceNameOffset);
|
||||||
|
MailMessage.addReadAtMs(builder, readAtMs);
|
||||||
|
MailMessage.addDeletedAtMs(builder, deletedAtMs);
|
||||||
|
MailMessage.addTranslatedSubject(builder, translatedSubjectOffset);
|
||||||
|
MailMessage.addTranslatedBody(builder, translatedBodyOffset);
|
||||||
|
MailMessage.addTranslationLang(builder, translationLangOffset);
|
||||||
|
MailMessage.addTranslator(builder, translatorOffset);
|
||||||
|
return MailMessage.endMailMessage(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): MailMessageT {
|
||||||
|
return new MailMessageT(
|
||||||
|
this.messageId(),
|
||||||
|
this.gameId(),
|
||||||
|
this.gameName(),
|
||||||
|
this.kind(),
|
||||||
|
this.senderKind(),
|
||||||
|
this.senderUserId(),
|
||||||
|
this.senderUsername(),
|
||||||
|
this.senderRaceName(),
|
||||||
|
this.subject(),
|
||||||
|
this.body(),
|
||||||
|
this.bodyLang(),
|
||||||
|
this.broadcastScope(),
|
||||||
|
this.createdAtMs(),
|
||||||
|
this.recipientUserId(),
|
||||||
|
this.recipientUserName(),
|
||||||
|
this.recipientRaceName(),
|
||||||
|
this.readAtMs(),
|
||||||
|
this.deletedAtMs(),
|
||||||
|
this.translatedSubject(),
|
||||||
|
this.translatedBody(),
|
||||||
|
this.translationLang(),
|
||||||
|
this.translator()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: MailMessageT): void {
|
||||||
|
_o.messageId = this.messageId();
|
||||||
|
_o.gameId = this.gameId();
|
||||||
|
_o.gameName = this.gameName();
|
||||||
|
_o.kind = this.kind();
|
||||||
|
_o.senderKind = this.senderKind();
|
||||||
|
_o.senderUserId = this.senderUserId();
|
||||||
|
_o.senderUsername = this.senderUsername();
|
||||||
|
_o.senderRaceName = this.senderRaceName();
|
||||||
|
_o.subject = this.subject();
|
||||||
|
_o.body = this.body();
|
||||||
|
_o.bodyLang = this.bodyLang();
|
||||||
|
_o.broadcastScope = this.broadcastScope();
|
||||||
|
_o.createdAtMs = this.createdAtMs();
|
||||||
|
_o.recipientUserId = this.recipientUserId();
|
||||||
|
_o.recipientUserName = this.recipientUserName();
|
||||||
|
_o.recipientRaceName = this.recipientRaceName();
|
||||||
|
_o.readAtMs = this.readAtMs();
|
||||||
|
_o.deletedAtMs = this.deletedAtMs();
|
||||||
|
_o.translatedSubject = this.translatedSubject();
|
||||||
|
_o.translatedBody = this.translatedBody();
|
||||||
|
_o.translationLang = this.translationLang();
|
||||||
|
_o.translator = this.translator();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MailMessageT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public messageId: string|Uint8Array|null = null,
|
||||||
|
public gameId: string|Uint8Array|null = null,
|
||||||
|
public gameName: string|Uint8Array|null = null,
|
||||||
|
public kind: string|Uint8Array|null = null,
|
||||||
|
public senderKind: string|Uint8Array|null = null,
|
||||||
|
public senderUserId: string|Uint8Array|null = null,
|
||||||
|
public senderUsername: string|Uint8Array|null = null,
|
||||||
|
public senderRaceName: string|Uint8Array|null = null,
|
||||||
|
public subject: string|Uint8Array|null = null,
|
||||||
|
public body: string|Uint8Array|null = null,
|
||||||
|
public bodyLang: string|Uint8Array|null = null,
|
||||||
|
public broadcastScope: string|Uint8Array|null = null,
|
||||||
|
public createdAtMs: bigint = BigInt('0'),
|
||||||
|
public recipientUserId: string|Uint8Array|null = null,
|
||||||
|
public recipientUserName: string|Uint8Array|null = null,
|
||||||
|
public recipientRaceName: string|Uint8Array|null = null,
|
||||||
|
public readAtMs: bigint = BigInt('0'),
|
||||||
|
public deletedAtMs: bigint = BigInt('0'),
|
||||||
|
public translatedSubject: string|Uint8Array|null = null,
|
||||||
|
public translatedBody: string|Uint8Array|null = null,
|
||||||
|
public translationLang: string|Uint8Array|null = null,
|
||||||
|
public translator: string|Uint8Array|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const messageId = (this.messageId !== null ? builder.createString(this.messageId!) : 0);
|
||||||
|
const gameId = (this.gameId !== null ? builder.createString(this.gameId!) : 0);
|
||||||
|
const gameName = (this.gameName !== null ? builder.createString(this.gameName!) : 0);
|
||||||
|
const kind = (this.kind !== null ? builder.createString(this.kind!) : 0);
|
||||||
|
const senderKind = (this.senderKind !== null ? builder.createString(this.senderKind!) : 0);
|
||||||
|
const senderUserId = (this.senderUserId !== null ? builder.createString(this.senderUserId!) : 0);
|
||||||
|
const senderUsername = (this.senderUsername !== null ? builder.createString(this.senderUsername!) : 0);
|
||||||
|
const senderRaceName = (this.senderRaceName !== null ? builder.createString(this.senderRaceName!) : 0);
|
||||||
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
||||||
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
||||||
|
const bodyLang = (this.bodyLang !== null ? builder.createString(this.bodyLang!) : 0);
|
||||||
|
const broadcastScope = (this.broadcastScope !== null ? builder.createString(this.broadcastScope!) : 0);
|
||||||
|
const recipientUserId = (this.recipientUserId !== null ? builder.createString(this.recipientUserId!) : 0);
|
||||||
|
const recipientUserName = (this.recipientUserName !== null ? builder.createString(this.recipientUserName!) : 0);
|
||||||
|
const recipientRaceName = (this.recipientRaceName !== null ? builder.createString(this.recipientRaceName!) : 0);
|
||||||
|
const translatedSubject = (this.translatedSubject !== null ? builder.createString(this.translatedSubject!) : 0);
|
||||||
|
const translatedBody = (this.translatedBody !== null ? builder.createString(this.translatedBody!) : 0);
|
||||||
|
const translationLang = (this.translationLang !== null ? builder.createString(this.translationLang!) : 0);
|
||||||
|
const translator = (this.translator !== null ? builder.createString(this.translator!) : 0);
|
||||||
|
|
||||||
|
return MailMessage.createMailMessage(builder,
|
||||||
|
messageId,
|
||||||
|
gameId,
|
||||||
|
gameName,
|
||||||
|
kind,
|
||||||
|
senderKind,
|
||||||
|
senderUserId,
|
||||||
|
senderUsername,
|
||||||
|
senderRaceName,
|
||||||
|
subject,
|
||||||
|
body,
|
||||||
|
bodyLang,
|
||||||
|
broadcastScope,
|
||||||
|
this.createdAtMs,
|
||||||
|
recipientUserId,
|
||||||
|
recipientUserName,
|
||||||
|
recipientRaceName,
|
||||||
|
this.readAtMs,
|
||||||
|
this.deletedAtMs,
|
||||||
|
translatedSubject,
|
||||||
|
translatedBody,
|
||||||
|
translationLang,
|
||||||
|
translator
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class MailRecipientState implements flatbuffers.IUnpackableObject<MailRecipientStateT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):MailRecipientState {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsMailRecipientState(bb:flatbuffers.ByteBuffer, obj?:MailRecipientState):MailRecipientState {
|
||||||
|
return (obj || new MailRecipientState()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsMailRecipientState(bb:flatbuffers.ByteBuffer, obj?:MailRecipientState):MailRecipientState {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new MailRecipientState()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId():string|null
|
||||||
|
messageId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
messageId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
readAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
deletedAtMs():bigint {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||||
|
}
|
||||||
|
|
||||||
|
static startMailRecipientState(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addReadAtMs(builder:flatbuffers.Builder, readAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(1, readAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static addDeletedAtMs(builder:flatbuffers.Builder, deletedAtMs:bigint) {
|
||||||
|
builder.addFieldInt64(2, deletedAtMs, BigInt('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
static endMailRecipientState(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createMailRecipientState(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset, readAtMs:bigint, deletedAtMs:bigint):flatbuffers.Offset {
|
||||||
|
MailRecipientState.startMailRecipientState(builder);
|
||||||
|
MailRecipientState.addMessageId(builder, messageIdOffset);
|
||||||
|
MailRecipientState.addReadAtMs(builder, readAtMs);
|
||||||
|
MailRecipientState.addDeletedAtMs(builder, deletedAtMs);
|
||||||
|
return MailRecipientState.endMailRecipientState(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): MailRecipientStateT {
|
||||||
|
return new MailRecipientStateT(
|
||||||
|
this.messageId(),
|
||||||
|
this.readAtMs(),
|
||||||
|
this.deletedAtMs()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: MailRecipientStateT): void {
|
||||||
|
_o.messageId = this.messageId();
|
||||||
|
_o.readAtMs = this.readAtMs();
|
||||||
|
_o.deletedAtMs = this.deletedAtMs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MailRecipientStateT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public messageId: string|Uint8Array|null = null,
|
||||||
|
public readAtMs: bigint = BigInt('0'),
|
||||||
|
public deletedAtMs: bigint = BigInt('0')
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const messageId = (this.messageId !== null ? builder.createString(this.messageId!) : 0);
|
||||||
|
|
||||||
|
return MailRecipientState.createMailRecipientState(builder,
|
||||||
|
messageId,
|
||||||
|
this.readAtMs,
|
||||||
|
this.deletedAtMs
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class MessageGetRequest implements flatbuffers.IUnpackableObject<MessageGetRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):MessageGetRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsMessageGetRequest(bb:flatbuffers.ByteBuffer, obj?:MessageGetRequest):MessageGetRequest {
|
||||||
|
return (obj || new MessageGetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsMessageGetRequest(bb:flatbuffers.ByteBuffer, obj?:MessageGetRequest):MessageGetRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new MessageGetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startMessageGetRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(1, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endMessageGetRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
builder.requiredField(offset, 6) // message_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpack(): MessageGetRequestT {
|
||||||
|
return new MessageGetRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
(this.messageId() !== null ? this.messageId()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: MessageGetRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.messageId = (this.messageId() !== null ? this.messageId()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MessageGetRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public messageId: UUIDT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
MessageGetRequest.startMessageGetRequest(builder);
|
||||||
|
MessageGetRequest.addGameId(builder, (this.gameId !== null ? this.gameId!.pack(builder) : 0));
|
||||||
|
MessageGetRequest.addMessageId(builder, (this.messageId !== null ? this.messageId!.pack(builder) : 0));
|
||||||
|
|
||||||
|
return MessageGetRequest.endMessageGetRequest(builder);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailMessage, MailMessageT } from '../diplomail/mail-message.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class MessageGetResponse implements flatbuffers.IUnpackableObject<MessageGetResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):MessageGetResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsMessageGetResponse(bb:flatbuffers.ByteBuffer, obj?:MessageGetResponse):MessageGetResponse {
|
||||||
|
return (obj || new MessageGetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsMessageGetResponse(bb:flatbuffers.ByteBuffer, obj?:MessageGetResponse):MessageGetResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new MessageGetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
message(obj?:MailMessage):MailMessage|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailMessage()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startMessageGetResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endMessageGetResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createMessageGetResponse(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
MessageGetResponse.startMessageGetResponse(builder);
|
||||||
|
MessageGetResponse.addMessage(builder, messageOffset);
|
||||||
|
return MessageGetResponse.endMessageGetResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): MessageGetResponseT {
|
||||||
|
return new MessageGetResponseT(
|
||||||
|
(this.message() !== null ? this.message()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: MessageGetResponseT): void {
|
||||||
|
_o.message = (this.message() !== null ? this.message()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MessageGetResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public message: MailMessageT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const message = (this.message !== null ? this.message!.pack(builder) : 0);
|
||||||
|
|
||||||
|
return MessageGetResponse.createMessageGetResponse(builder,
|
||||||
|
message
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class ReadRequest implements flatbuffers.IUnpackableObject<ReadRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):ReadRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsReadRequest(bb:flatbuffers.ByteBuffer, obj?:ReadRequest):ReadRequest {
|
||||||
|
return (obj || new ReadRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsReadRequest(bb:flatbuffers.ByteBuffer, obj?:ReadRequest):ReadRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new ReadRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startReadRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessageId(builder:flatbuffers.Builder, messageIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(1, messageIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endReadRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
builder.requiredField(offset, 6) // message_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpack(): ReadRequestT {
|
||||||
|
return new ReadRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
(this.messageId() !== null ? this.messageId()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: ReadRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.messageId = (this.messageId() !== null ? this.messageId()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReadRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public messageId: UUIDT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
ReadRequest.startReadRequest(builder);
|
||||||
|
ReadRequest.addGameId(builder, (this.gameId !== null ? this.gameId!.pack(builder) : 0));
|
||||||
|
ReadRequest.addMessageId(builder, (this.messageId !== null ? this.messageId!.pack(builder) : 0));
|
||||||
|
|
||||||
|
return ReadRequest.endReadRequest(builder);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailRecipientState, MailRecipientStateT } from '../diplomail/mail-recipient-state.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class ReadResponse implements flatbuffers.IUnpackableObject<ReadResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):ReadResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsReadResponse(bb:flatbuffers.ByteBuffer, obj?:ReadResponse):ReadResponse {
|
||||||
|
return (obj || new ReadResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsReadResponse(bb:flatbuffers.ByteBuffer, obj?:ReadResponse):ReadResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new ReadResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
state(obj?:MailRecipientState):MailRecipientState|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailRecipientState()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startReadResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addState(builder:flatbuffers.Builder, stateOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, stateOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endReadResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createReadResponse(builder:flatbuffers.Builder, stateOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
ReadResponse.startReadResponse(builder);
|
||||||
|
ReadResponse.addState(builder, stateOffset);
|
||||||
|
return ReadResponse.endReadResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): ReadResponseT {
|
||||||
|
return new ReadResponseT(
|
||||||
|
(this.state() !== null ? this.state()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: ReadResponseT): void {
|
||||||
|
_o.state = (this.state() !== null ? this.state()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReadResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public state: MailRecipientStateT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const state = (this.state !== null ? this.state!.pack(builder) : 0);
|
||||||
|
|
||||||
|
return ReadResponse.createReadResponse(builder,
|
||||||
|
state
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class SendRequest implements flatbuffers.IUnpackableObject<SendRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):SendRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsSendRequest(bb:flatbuffers.ByteBuffer, obj?:SendRequest):SendRequest {
|
||||||
|
return (obj || new SendRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsSendRequest(bb:flatbuffers.ByteBuffer, obj?:SendRequest):SendRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new SendRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientUserId():string|null
|
||||||
|
recipientUserId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientUserId(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
recipientRaceName():string|null
|
||||||
|
recipientRaceName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
recipientRaceName(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
subject():string|null
|
||||||
|
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
subject(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
body():string|null
|
||||||
|
body(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||||
|
body(optionalEncoding?:any):string|Uint8Array|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startSendRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientUserId(builder:flatbuffers.Builder, recipientUserIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(1, recipientUserIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addRecipientRaceName(builder:flatbuffers.Builder, recipientRaceNameOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(2, recipientRaceNameOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(3, subjectOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addBody(builder:flatbuffers.Builder, bodyOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(4, bodyOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endSendRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createSendRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, recipientUserIdOffset:flatbuffers.Offset, recipientRaceNameOffset:flatbuffers.Offset, subjectOffset:flatbuffers.Offset, bodyOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
SendRequest.startSendRequest(builder);
|
||||||
|
SendRequest.addGameId(builder, gameIdOffset);
|
||||||
|
SendRequest.addRecipientUserId(builder, recipientUserIdOffset);
|
||||||
|
SendRequest.addRecipientRaceName(builder, recipientRaceNameOffset);
|
||||||
|
SendRequest.addSubject(builder, subjectOffset);
|
||||||
|
SendRequest.addBody(builder, bodyOffset);
|
||||||
|
return SendRequest.endSendRequest(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): SendRequestT {
|
||||||
|
return new SendRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null),
|
||||||
|
this.recipientUserId(),
|
||||||
|
this.recipientRaceName(),
|
||||||
|
this.subject(),
|
||||||
|
this.body()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: SendRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
_o.recipientUserId = this.recipientUserId();
|
||||||
|
_o.recipientRaceName = this.recipientRaceName();
|
||||||
|
_o.subject = this.subject();
|
||||||
|
_o.body = this.body();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SendRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null,
|
||||||
|
public recipientUserId: string|Uint8Array|null = null,
|
||||||
|
public recipientRaceName: string|Uint8Array|null = null,
|
||||||
|
public subject: string|Uint8Array|null = null,
|
||||||
|
public body: string|Uint8Array|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const recipientUserId = (this.recipientUserId !== null ? builder.createString(this.recipientUserId!) : 0);
|
||||||
|
const recipientRaceName = (this.recipientRaceName !== null ? builder.createString(this.recipientRaceName!) : 0);
|
||||||
|
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
|
||||||
|
const body = (this.body !== null ? builder.createString(this.body!) : 0);
|
||||||
|
|
||||||
|
return SendRequest.createSendRequest(builder,
|
||||||
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
|
||||||
|
recipientUserId,
|
||||||
|
recipientRaceName,
|
||||||
|
subject,
|
||||||
|
body
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailMessage, MailMessageT } from '../diplomail/mail-message.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class SendResponse implements flatbuffers.IUnpackableObject<SendResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):SendResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsSendResponse(bb:flatbuffers.ByteBuffer, obj?:SendResponse):SendResponse {
|
||||||
|
return (obj || new SendResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsSendResponse(bb:flatbuffers.ByteBuffer, obj?:SendResponse):SendResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new SendResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
message(obj?:MailMessage):MailMessage|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailMessage()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startSendResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, messageOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endSendResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createSendResponse(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
SendResponse.startSendResponse(builder);
|
||||||
|
SendResponse.addMessage(builder, messageOffset);
|
||||||
|
return SendResponse.endSendResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): SendResponseT {
|
||||||
|
return new SendResponseT(
|
||||||
|
(this.message() !== null ? this.message()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: SendResponseT): void {
|
||||||
|
_o.message = (this.message() !== null ? this.message()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SendResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public message: MailMessageT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const message = (this.message !== null ? this.message!.pack(builder) : 0);
|
||||||
|
|
||||||
|
return SendResponse.createSendResponse(builder,
|
||||||
|
message
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { UUID, UUIDT } from '../common/uuid.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class SentRequest implements flatbuffers.IUnpackableObject<SentRequestT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):SentRequest {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsSentRequest(bb:flatbuffers.ByteBuffer, obj?:SentRequest):SentRequest {
|
||||||
|
return (obj || new SentRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsSentRequest(bb:flatbuffers.ByteBuffer, obj?:SentRequest):SentRequest {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new SentRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
gameId(obj?:UUID):UUID|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startSentRequest(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldStruct(0, gameIdOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endSentRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
builder.requiredField(offset, 4) // game_id
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createSentRequest(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
SentRequest.startSentRequest(builder);
|
||||||
|
SentRequest.addGameId(builder, gameIdOffset);
|
||||||
|
return SentRequest.endSentRequest(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): SentRequestT {
|
||||||
|
return new SentRequestT(
|
||||||
|
(this.gameId() !== null ? this.gameId()!.unpack() : null)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: SentRequestT): void {
|
||||||
|
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SentRequestT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public gameId: UUIDT|null = null
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
return SentRequest.createSentRequest(builder,
|
||||||
|
(this.gameId !== null ? this.gameId!.pack(builder) : 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
|
import { MailMessage, MailMessageT } from '../diplomail/mail-message.js';
|
||||||
|
|
||||||
|
|
||||||
|
export class SentResponse implements flatbuffers.IUnpackableObject<SentResponseT> {
|
||||||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||||||
|
bb_pos = 0;
|
||||||
|
__init(i:number, bb:flatbuffers.ByteBuffer):SentResponse {
|
||||||
|
this.bb_pos = i;
|
||||||
|
this.bb = bb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRootAsSentResponse(bb:flatbuffers.ByteBuffer, obj?:SentResponse):SentResponse {
|
||||||
|
return (obj || new SentResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSizePrefixedRootAsSentResponse(bb:flatbuffers.ByteBuffer, obj?:SentResponse):SentResponse {
|
||||||
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||||
|
return (obj || new SentResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||||
|
}
|
||||||
|
|
||||||
|
items(index: number, obj?:MailMessage):MailMessage|null {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? (obj || new MailMessage()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
itemsLength():number {
|
||||||
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||||
|
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static startSentResponse(builder:flatbuffers.Builder) {
|
||||||
|
builder.startObject(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static addItems(builder:flatbuffers.Builder, itemsOffset:flatbuffers.Offset) {
|
||||||
|
builder.addFieldOffset(0, itemsOffset, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static createItemsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
||||||
|
builder.startVector(4, data.length, 4);
|
||||||
|
for (let i = data.length - 1; i >= 0; i--) {
|
||||||
|
builder.addOffset(data[i]!);
|
||||||
|
}
|
||||||
|
return builder.endVector();
|
||||||
|
}
|
||||||
|
|
||||||
|
static startItemsVector(builder:flatbuffers.Builder, numElems:number) {
|
||||||
|
builder.startVector(4, numElems, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static endSentResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||||
|
const offset = builder.endObject();
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
static createSentResponse(builder:flatbuffers.Builder, itemsOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||||
|
SentResponse.startSentResponse(builder);
|
||||||
|
SentResponse.addItems(builder, itemsOffset);
|
||||||
|
return SentResponse.endSentResponse(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack(): SentResponseT {
|
||||||
|
return new SentResponseT(
|
||||||
|
this.bb!.createObjList<MailMessage, MailMessageT>(this.items.bind(this), this.itemsLength())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unpackTo(_o: SentResponseT): void {
|
||||||
|
_o.items = this.bb!.createObjList<MailMessage, MailMessageT>(this.items.bind(this), this.itemsLength());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SentResponseT implements flatbuffers.IGeneratedObject {
|
||||||
|
constructor(
|
||||||
|
public items: (MailMessageT)[] = []
|
||||||
|
){}
|
||||||
|
|
||||||
|
|
||||||
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||||
|
const items = SentResponse.createItemsVector(builder, builder.createObjectOffsetList(this.items));
|
||||||
|
|
||||||
|
return SentResponse.createSentResponse(builder,
|
||||||
|
items
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user